IGuiObject.h
Go to the documentation of this file.
1 #ifndef iqtgui_IGuiObject_included
2 #define iqtgui_IGuiObject_included
3 
4 
5 // Qt includes
6 #include <QtCore/QtGlobal>
7 #if QT_VERSION >= 0x050000
8 #include <QtWidgets/QWidget>
9 #else
10 #include <QtGui/QWidget>
11 #endif
12 
13 // ACF includes
14 #include <istd/IPolymorphic.h>
15 #include <iqtgui/iqtgui.h>
16 
17 
18 namespace iqtgui
19 {
20 
21 
25 class IGuiObject: virtual public istd::IPolymorphic
26 {
27 public:
31  virtual bool IsGuiCreated() const = 0;
36  virtual bool CreateGui(QWidget* parentPtr) = 0;
41  virtual bool DestroyGui() = 0;
45  virtual QWidget* GetWidget() const = 0;
51  virtual void OnTryClose(bool* ignoredPtr = NULL) = 0;
52 };
53 
54 
55 } // namespace iqtgui
56 
57 
58 #endif // !iqtgui_IGuiObject_included
59 
60 
virtual bool CreateGui(QWidget *parentPtr)=0
Initialize GUI and connect it to the parent.
virtual void OnTryClose(bool *ignoredPtr=NULL)=0
Called on trying to close application.
Base interface for all used interfaces and implementations.
Definition: IPolymorphic.h:17
Common interface for GUI objects using in component context.
Definition: IGuiObject.h:25
#define NULL
Definition: istd.h:64
virtual bool DestroyGui()=0
Release GUI and disconnect it from parent.
virtual QWidget * GetWidget() const =0
Get access to internal QWidget object.
virtual bool IsGuiCreated() const =0
Inform if GUI was initilized.

© 2007-2017 Witold Gantzke and Kirill Lepskiy