]> vaikene.ee Git - evaf/blobdiff - src/plugins/SdiWindow/sdiwindow.h
Ported to Qt5
[evaf] / src / plugins / SdiWindow / sdiwindow.h
index 757ed28cfeaa51f452954cc7ee0c62992aa3a71d..4c46eea83617e083813905eae322f5e80cbcbe63 100644 (file)
@@ -31,7 +31,6 @@
 #include <QList>
 #include <QVector>
 #include <QHash>
-#include <QWeakPointer>
 
 class QVBoxLayout;
 
@@ -72,9 +71,6 @@ public:
 
 protected: // Methods
 
-    /// Garbage collector timer
-    virtual void timerEvent(QTimerEvent * e);
-
 
 private: // Methods
 
@@ -97,19 +93,16 @@ private: // Members
     QString mMainPanelName;
 
     /// List of GUI::Panel objects added to the manager
-    QList<QWeakPointer<Gui::Panel> > mPanels;
+    QList<Gui::Panel *> mPanels;
 
     /// List of minimized GUI::Panel objects
-    QVector<QWeakPointer<Gui::Panel> > mMinimizedPanels;
+    QVector<Gui::Panel *> mMinimizedPanels;
 
     /// Hash with panel names
-    QHash<QString, QWeakPointer<Gui::Panel> > mPanelNames;
+    QHash<QString, Gui::Panel *> mPanelNames;
 
     /// Current main panel added to this window
-    QWeakPointer<Gui::Panel> mMainPanel;
-
-    /// Garbage collector timer ID
-    int mTimerId;
+    Gui::Panel * mMainPanel;
 
 
 private: // Methods
@@ -117,6 +110,13 @@ private: // Methods
     /// Gets the main panel name from module attributes
     QString getMainPanelName(QString const & args) const;
 
+
+private slots:
+
+    /// Panel destroyed signal. We need to remove the panel from all the
+    /// lists.
+    void panelDestroyed(QObject * obj = 0);
+
 };
 
 /**