QCAD
Open Source 2D CAD
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
RMdiChildQt.h
Go to the documentation of this file.
1 
20 #ifndef RMDICHILDQT_H
21 #define RMDICHILDQT_H
22 
23 #include "gui_global.h"
24 
25 #include <QMdiSubWindow>
26 
27 #include "RDebug.h"
28 #include "RModifiedListener.h"
29 
30 class RDocument;
31 class RDocumentInterface;
32 class RGraphicsViewQt;
33 
41 class QCADGUI_EXPORT RMdiChildQt: public QMdiSubWindow, public RModifiedListener {
42 Q_OBJECT
43 
44 public:
45  RMdiChildQt(QWidget* parent = NULL);
46  virtual ~RMdiChildQt();
47 
48  void setDocumentInterface(RDocumentInterface* di);
49 
50  RDocumentInterface* getDocumentInterface();
51  RDocument* getDocument();
52  RGraphicsViewQt* getLastKnownViewWithFocus();
53 
54  virtual void updateModifiedListener(const RStorage* storage);
55 
57  //userNotifiedAboutClosing = false;
58  closeEventAccepted = false;
59  }
60 
62  closeEventAccepted = true;
63  }
64 
65 // bool isInBackground() {
66 // return inBackground;
67 // }
68 
69 // void setInBackground(bool on) {
70 // inBackground = on;
71 // }
72 
73  //static RMdiChildQt* getMdiChild(QWidget* w);
74 
75 signals:
76  void closeRequested(RMdiChildQt* mdiChild);
77  void modifiedStatusChanged(RMdiChildQt* mdiChild);
78 
79 protected:
80  virtual void closeEvent(QCloseEvent* closeEvent);
81  virtual QSize sizeHint() const;
82 
83 private:
86  //bool userNotifiedAboutClosing;
88 // bool inBackground;
89 };
90 
92 
93 #endif