5 #include "qc_graphicview.h"
6 #include "qg_layerwidget.h"
7 #include "qg_recentfiles.h"
8 #include "qg_pentoolbar.h"
9 #include "rs_document.h"
12 * MDI document window. Contains a document and a view (window).
14 * @author Andrew Mustun
16 //class QC_MDIWindow: public Q3MainWindow
17 class QC_MDIWindow: public QMdiSubWindow
22 QC_MDIWindow(RS_Document * doc, QWidget * parent, const char * name = NULL,
23 // Qt::WindowFlags wflags = Qt::WDestructiveClose);
24 Qt::WindowFlags wflags = Qt::SubWindow);
27 void initDoc(RS_Document * doc = NULL);
31 void slotPenChanged(RS_Pen p);
33 bool slotFileOpen(const QString & fileName, RS2::FormatType type);
34 bool slotFileSave(bool & cancelled);
35 bool slotFileSaveAs(bool & cancelled);
36 bool slotFileClose(bool force);
40 QC_GraphicView * getGraphicView();
41 RS_Document * getDocument();
42 RS_Graphic * getGraphic();
43 RS_EventHandler * getEventHandler();
45 void addChildWindow(QC_MDIWindow * w);
46 void removeChildWindow(QC_MDIWindow * w);
47 QC_MDIWindow * getPrintPreview();
48 void setParentWindow(QC_MDIWindow * p);
51 bool closeMDI(bool force, bool ask = true);
53 void setForceClosing(bool on);
55 friend std::ostream & operator<<(std::ostream & os, QC_MDIWindow & w);
61 void closeEvent(QCloseEvent *);
66 /** ID counter (class variable) */
69 QC_GraphicView * graphicView;
71 RS_Document * document;
72 /** Does the window own the document? */
75 * List of known child windows that show blocks of the same drawing.
77 // Q3PtrList<QC_MDIWindow> childWindows;
78 QList<QC_MDIWindow *> childWindows;
80 * Pointer to parent window which needs to know if this window
83 QC_MDIWindow * parentWindow;
86 * If flag is set, the user will not be asked about closing this file.