]> Shamusworld >> Repos - architektonas/blobdiff - src/mainapp/mdiwindow.h
Fixed problem with MDI activation.
[architektonas] / src / mainapp / mdiwindow.h
index 6b66aef8fedd100544c1ab91c658e75c66b45dd6..e532cc4474642ca088cb49dfc9679623484eaa06 100644 (file)
@@ -1,12 +1,13 @@
-#ifndef QC_MDIWINDOW_H
-#define QC_MDIWINDOW_H
+#ifndef __MDIWINDOW_H__
+#define __MDIWINDOW_H__
 
 #include <QtGui>
-#include "rs_document.h"
+#include "document.h"
 #include "layerwidget.h"
 #include "pentoolbar.h"
+//#include "qg_graphicview.h"
 
-class RS_EventHandler;
+class EventHandler;
 class QG_GraphicView;
 
 /**
@@ -15,38 +16,37 @@ class QG_GraphicView;
  * @author Andrew Mustun
  */
 class MDIWindow: public QMdiSubWindow
+//class MDIWindow: public QG_GraphicView
 {
        Q_OBJECT
 
        public:
-               MDIWindow(RS_Document * doc, QWidget * parent, const char * name = NULL,
+               MDIWindow(Document * doc, QWidget * parent, const char * name = NULL,
                        Qt::WindowFlags wflags = Qt::SubWindow);
                ~MDIWindow();
 
-               void initDoc(RS_Document * doc = NULL);
-               void initView();
+               void initDoc(Document * doc = NULL);
 
        public slots:
-               void slotPenChanged(RS_Pen p);
+               void slotPenChanged(Pen p);
                void slotFileNew();
                bool slotFileOpen(const QString & fileName, RS2::FormatType type);
                bool slotFileSave(bool & cancelled);
                bool slotFileSaveAs(bool & cancelled);
-               bool slotFileClose(bool force);
-               void slotFilePrint();
+               bool slotFileClose(void);
+               void slotFilePrint(void);
 
        public:
                QG_GraphicView * getGraphicView();
-               RS_Document * getDocument();
-               Drawing * getGraphic();
-               RS_EventHandler * getEventHandler();
+               Document * getDocument();
+               Drawing * GetDrawing();
+               EventHandler * getEventHandler();
                void addChildWindow(MDIWindow * w);
                void removeChildWindow(MDIWindow * w);
                MDIWindow * getPrintPreview();
                void setParentWindow(MDIWindow * p);
                int getId();
-               bool closeMDI(bool force, bool ask = true);
-               void setForceClosing(bool on);
+               bool CloseMDI(void);
 
                friend std::ostream & operator<<(std::ostream & os, MDIWindow & w);
 
@@ -65,22 +65,16 @@ class MDIWindow: public QMdiSubWindow
 //let's see if we can get rid of this...
                QG_GraphicView * graphicView;
                /** Document */
-               RS_Document * document;
+               Document * document;
                /** Does the window own the document? */
                bool owner;
-               /**
-               * List of known child windows that show blocks of the same drawing.
-               */
+               /** List of known child windows that show blocks of the same drawing. */
                QList<MDIWindow *> childWindows;
                /**
                * Pointer to parent window which needs to know if this window
                * is closed or NULL.
                */
                MDIWindow * parentWindow;
-               /**
-               * If flag is set, the user will not be asked about closing this file.
-               */
-               bool forceClosing;
 };
 
-#endif
+#endif // __MDIWINDOW_H__