1 #ifndef __MDIWINDOW_H__
2 #define __MDIWINDOW_H__
6 #include "layerwidget.h"
7 #include "pentoolbar.h"
8 //#include "qg_graphicview.h"
14 * MDI document window. Contains a document and a view (window).
16 * @author Andrew Mustun
18 class MDIWindow: public QMdiSubWindow
19 //class MDIWindow: public QG_GraphicView
24 MDIWindow(Document * doc, QWidget * parent, const char * name = NULL,
25 Qt::WindowFlags wflags = Qt::SubWindow);
28 void initDoc(Document * doc = NULL);
31 void slotPenChanged(Pen p);
33 bool slotFileOpen(const QString & fileName, RS2::FormatType type);
34 bool slotFileSave(bool & cancelled);
35 bool slotFileSaveAs(bool & cancelled);
36 bool slotFileClose(void);
37 void slotFilePrint(void);
40 QG_GraphicView * getGraphicView();
41 Document * getDocument();
42 Drawing * GetDrawing();
43 EventHandler * getEventHandler();
44 void addChildWindow(MDIWindow * w);
45 void removeChildWindow(MDIWindow * w);
46 MDIWindow * getPrintPreview();
47 void setParentWindow(MDIWindow * p);
51 friend std::ostream & operator<<(std::ostream & os, MDIWindow & w);
57 void closeEvent(QCloseEvent *);
62 /** ID counter (class variable) */
65 //let's see if we can get rid of this...
66 QG_GraphicView * graphicView;
69 /** Does the window own the document? */
71 /** List of known child windows that show blocks of the same drawing. */
72 QList<MDIWindow *> childWindows;
74 * Pointer to parent window which needs to know if this window
77 MDIWindow * parentWindow;
80 #endif // __MDIWINDOW_H__