#739 Moved windowsGeometry data to the RimViewWindow base class

Introduced an interface for setting and getting mdiWindow Geometry
Changed file keywords from GraphPlot etc to SummaryPlot
Added a summary plot QwtPlot descendant
Added handling of delete of the MDI window
This commit is contained in:
Jacob Støren
2016-05-26 13:17:26 +02:00
parent 38c15f57f2
commit ae615901b8
17 changed files with 311 additions and 67 deletions

View File

@@ -22,6 +22,18 @@
#include "cafPdmField.h"
#include "QPointer"
struct RimMdiWindowGeometry
{
RimMdiWindowGeometry() : x(0), y(0), width(-1), height(-1) {}
bool isValid() const { return (width >= 0 && height >= 0);}
int x;
int y;
int width;
int height;
bool isMaximized;
};
class RimViewWindow : public caf::PdmObject
{
CAF_PDM_HEADER_INIT;
@@ -29,19 +41,20 @@ public:
RimViewWindow(void);
virtual ~RimViewWindow(void);
void setMdiWindowGeometry(const RimMdiWindowGeometry& windowGeometry);
RimMdiWindowGeometry mdiWindowGeometry();
protected:
void setViewWidget(QWidget* viewWidget);
void setViewWidget(QWidget* viewWidget);
// Possible abilities of this class
//caf::PdmField< std::vector<int> > windowGeometry;
//virtual QImage snapshotWindowContent() = 0;
//caf::PdmField<QString> name;
//caf::PdmField<bool> showWindow;
private:
QPointer<QWidget> m_viewWidget;
caf::PdmField< std::vector<int> > m_windowGeometry;
QPointer<QWidget> m_viewWidget;
};