]> vaikene.ee Git - evaf/blobdiff - src/plugins/SdiWindow/sdiwindow.h
Replaced QPointer<> with QWeakPointer<>
[evaf] / src / plugins / SdiWindow / sdiwindow.h
index d886cca5d842914472e0e92b939abb7e7e04e78c..0032bc6dafd5986daabb74cc8b11d4f3e4800056 100644 (file)
 #include <QObject>
 #include <QString>
 #include <QWidget>
+#include <QList>
+#include <QWeakPointer>
+
+class QVBoxLayout;
 
 namespace eVaf {
 namespace SdiWindow {
@@ -49,6 +53,10 @@ public:
 
     void done();
 
+    void addWidget(QWidget * widget);
+
+    void addLayout(QLayout * layout);
+
 
 private: // Methods
 
@@ -57,6 +65,16 @@ private: // Methods
     void saveSettings();
 
     void restoreSettings();
+
+
+private: // Members
+
+    /// The layout of the window
+    QVBoxLayout * mLayout;
+
+    /// Widgets and layouts added to the main window
+    QList<QWeakPointer<QObject> > mItemsAdded;
+
 };
 
 /**
@@ -78,7 +96,9 @@ public:
 
     bool isReady() const { return mReady; }
 
-    virtual QWidget * widget() const { return wWindow; }
+    virtual void addWidget(QWidget * widget) { wWindow->addWidget(widget); }
+
+    virtual void addLayout(QLayout * layout) { wWindow->addLayout(layout); }
 
 
 private: // Members