6 #include "layerwidget.h"
7 #include "pentoolbar.h"
13 * MDI document window. Contains a document and a view (window).
15 * @author Andrew Mustun
17 class MDIWindow: public QMdiSubWindow
22 MDIWindow(Document * doc, QWidget * parent, const char * name = NULL,
23 Qt::WindowFlags wflags = Qt::SubWindow);
26 void initDoc(Document * doc = NULL);
30 void slotPenChanged(Pen p);
32 bool slotFileOpen(const QString & fileName, RS2::FormatType type);
33 bool slotFileSave(bool & cancelled);
34 bool slotFileSaveAs(bool & cancelled);
35 //WAS: bool slotFileClose(bool force);
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);
49 //WAS: bool closeMDI(bool force, bool ask = true);
51 // void setForceClosing(bool on);
53 friend std::ostream & operator<<(std::ostream & os, MDIWindow & w);
59 void closeEvent(QCloseEvent *);
64 /** ID counter (class variable) */
67 //let's see if we can get rid of this...
68 QG_GraphicView * graphicView;
71 /** Does the window own the document? */
74 * List of known child windows that show blocks of the same drawing.
76 QList<MDIWindow *> childWindows;
78 * Pointer to parent window which needs to know if this window
81 MDIWindow * parentWindow;
83 * If flag is set, the user will not be asked about closing this file.