QCAD
Open Source 2D CAD
Loading...
Searching...
No Matches
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 "RModifiedListener.h"
28
29class RDocument;
32class RStorage;
33
41class QCADGUI_EXPORT RMdiChildQt: public QMdiSubWindow, public RModifiedListener {
42Q_OBJECT
43
44public:
45 RMdiChildQt(QWidget* parent = NULL);
46 virtual ~RMdiChildQt();
47
48 void setDocumentInterface(RDocumentInterface* di);
49
52 RGraphicsViewImage* getLastKnownViewWithFocus();
53
54 virtual void updateModifiedListener(const RStorage* storage);
55
57 closeEventAccepted = false;
58 }
59
61 closeEventAccepted = true;
62 }
63
65 return closeEventAccepted;
66 }
67
68 virtual QSize sizeHint() const;
69
70signals:
71 void closeRequested(RMdiChildQt* mdiChild);
72 void closeAccepted(RMdiChildQt* mdiChild);
74
75protected:
76 virtual void closeEvent(QCloseEvent* closeEvent);
77
78private:
82};
83
85
86#endif
Q_DECLARE_METATYPE(RMath *)
A graphics document contains and owns entities, layers, user coordinate systems, variables,...
Definition RDocument.h:78
Interface for interaction between a graphics document and a user.
Definition RDocumentInterface.h:97
QImage based 2d graphics view.
Definition RGraphicsViewImage.h:69
MDI child window.
Definition RMdiChildQt.h:41
void setCloseEventRejected()
Definition RMdiChildQt.h:56
RDocumentInterface * documentInterface
Definition RMdiChildQt.h:79
bool closeEventAccepted
Definition RMdiChildQt.h:81
void closeAccepted(RMdiChildQt *mdiChild)
void setCloseEventAccepted()
Definition RMdiChildQt.h:60
static RDocumentInterface * diLast
Copyright (c) 2011-2018 by Andrew Mustun.
Definition RMdiChildQt.h:80
void modifiedStatusChanged(RMdiChildQt *mdiChild)
void closeRequested(RMdiChildQt *mdiChild)
bool isCloseEventAccepted()
Definition RMdiChildQt.h:64
Abstract base class for classes that are interested in the current state of a storage (modified or un...
Definition RModifiedListener.h:34
virtual void updateModifiedListener(const RStorage *storage)=0
Called by the document whenever the current transaction stack changes.
This is the abstract base class for all storage implementations.
Definition RStorage.h:67
void getDocument()
Returns the current RDocument or undefined.
Definition simple.js:63
void getDocumentInterface()
Returns the current RDocumentInterface or undefined.
Definition simple.js:69
#define QCADGUI_EXPORT
Definition gui_global.h:10
#define NULL
Definition opennurbs_system.h:256