ACF $AcfVersion:0$
IGuiObject.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-2.1-or-later OR GPL-2.0-or-later OR GPL-3.0-or-later OR LicenseRef-ACF-Commercial
2#pragma once
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
18namespace iqtgui
19{
20
21
132class IGuiObject: virtual public istd::IPolymorphic
133{
134public:
146 virtual bool IsGuiCreated() const = 0;
147
166 virtual bool CreateGui(QWidget* parentPtr) = 0;
167
184 virtual bool DestroyGui() = 0;
185
201 virtual QWidget* GetWidget() const = 0;
202
246 virtual void OnTryClose(bool* ignoredPtr = NULL) = 0;
247};
248
249
252
253
254} // namespace iqtgui
255
256
257
258
Common interface for GUI objects used in ACF component context.
Definition IGuiObject.h:133
virtual void OnTryClose(bool *ignoredPtr=NULL)=0
Called when the application is attempting to close.
virtual bool CreateGui(QWidget *parentPtr)=0
Initializes the GUI and connects it to the parent widget.
virtual bool DestroyGui()=0
Releases GUI resources and disconnects from the parent.
virtual QWidget * GetWidget() const =0
Gets access to the internal QWidget object.
virtual bool IsGuiCreated() const =0
Checks if the GUI has been initialized and created.
Base interface for all used interfaces and implementations.
Shared ownership smart pointer for interface types.
Unique ownership smart pointer for interface types.
#define NULL
Definition istd.h:74
Standard GUI specific interfaces and components based on Qt.
istd::TUniqueInterfacePtr< IGuiObject > IGuiObjectUniquePtr
Definition IGuiObject.h:250
istd::TSharedInterfacePtr< IGuiObject > IGuiObjectSharedPtr
Definition IGuiObject.h:251