#1107 Moved showWindow field to RimViewWindow and removed showWindow field from derived classes

This commit is contained in:
Magne Sjaastad
2017-01-20 16:25:05 +01:00
parent 94f94af325
commit cebe5428be
15 changed files with 74 additions and 205 deletions

View File

@@ -60,29 +60,36 @@ public:
virtual QImage snapshotWindowContent() = 0;
virtual void zoomAll() = 0;
protected:
// Derived classes are not supposed to override this function. The intention is to always use m_showWindow
// as the objectToggleField for this class. This way the visibility of a widget being part of a composite widget
// can be controlled from the project tree using check box toggles
virtual caf::PdmFieldHandle* objectToggleField() override final;
protected:
void removeMdiWindowFromMdiArea();
void updateMdiWindowVisibility();
///////// Interface for the Window controller
friend class RimMdiWindowController;
virtual caf::PdmField<bool>* getShowWindowField() = 0;
virtual QWidget* createViewWidget(QWidget* mainWindowParent) = 0;
virtual void updateViewWidgetAfterCreation() {};
virtual void updateMdiWindowTitle(); // Has real default implementation
virtual void deleteViewWidget() = 0;
virtual void deleteViewWidget() = 0;
virtual void loadDataAndUpdate() = 0;
//////////
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
virtual void initAfterRead() override;
caf::PdmField<bool> m_showWindow;
private:
void setAsMdiWindow(int mainWindowID);
caf::PdmChildField<RimMdiWindowController*> m_windowController;
// Obsoleted field
caf::PdmField< std::vector<int> > obsoleteField_windowGeometry;
};