Files
ResInsight/ApplicationLibCode/ProjectDataModel/RimDockWindowController.h
T

66 lines
2.0 KiB
C++
Raw Normal View History

2026-04-30 01:19:06 +02:00
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2026 Equinor ASA
//
// ResInsight is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#pragma once
#include "cafPdmChildField.h"
#include "cafPdmField.h"
#include "cafPdmObject.h"
2026-05-22 14:30:11 +02:00
#include "cafPdmPtrField.h"
2026-04-30 01:19:06 +02:00
2026-05-22 15:18:43 +02:00
#include "RiaDefines.h"
2026-04-30 01:19:06 +02:00
class RiuMainWindowBase;
class RimViewWindow;
//==================================================================================================
///
///
//==================================================================================================
class RimDockWindowController : public caf::PdmObject
{
CAF_PDM_HEADER_INIT;
public:
static constexpr int MAIN_WINDOW_ID_UNASSIGNED = -1;
static constexpr int MAIN_WINDOW_ID_3D = 0;
static constexpr int MAIN_WINDOW_ID_PLOTS = 1;
2026-04-30 01:19:06 +02:00
public:
RimDockWindowController();
~RimDockWindowController() override;
void setMainWindowId( int mainId );
void setViewToControl( RimViewWindow* view );
int mainWindowId() const;
2026-04-30 01:19:06 +02:00
void setAsActiveViewer( bool allowSelectionChange );
2026-05-19 02:26:59 +02:00
2026-04-30 01:19:06 +02:00
void updateViewerWidget();
void handleViewerDeletion();
void removeWindowFromDock();
protected:
RimViewWindow* viewPdmObject();
QWidget* viewWidget();
RiuMainWindowBase* getMainWindow();
private:
caf::PdmField<int> m_mainWindowID;
caf::PdmPtrField<RimViewWindow*> m_viewToControl;
2026-04-30 01:19:06 +02:00
};