ACF $AcfVersion:0$
Classes | Public Types | Signals | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
iqtgui::CGuiApplicationComp Class Reference

Standard component for a Qt based GUI application. More...

#include <CGuiApplicationComp.h>

Inheritance diagram for iqtgui::CGuiApplicationComp:
iqtgui::CApplicationCompBase imod::TSingleModelObserverBase< iprm::IEnableableParam > iqtgui::IGuiApplication icomp::CComponentBase ibase::IApplication imod::CSingleModelObserverBase ibase::IApplication icomp::IComponent istd::IPolymorphic imod::IObserver istd::IPolymorphic istd::IPolymorphic istd::IPolymorphic

Classes

class  TrayMessages
 

Public Types

typedef CApplicationCompBase BaseClass
 
typedef imod::TSingleModelObserverBase< iprm::IEnableableParamBaseClass2
 
- Public Types inherited from iqtgui::CApplicationCompBase
typedef icomp::CComponentBase BaseClass
 

Signals

void OnEventLoopStartedSignal ()
 

Public Member Functions

 CGuiApplicationComp ()
 
virtual const iqtgui::IGuiObjectGetApplicationGui () const override
 Get the main UI object of the application.
 
virtual bool InitializeApplication (int argc, char **argv) override
 Initialize the application object.
 
virtual int Execute (int argc, char **argv) override
 Start execution loop of the application.
 
virtual QString GetHelpText () const override
 Get information about the possible command line arguments of this application.
 
- Public Member Functions inherited from iqtgui::CApplicationCompBase
 CApplicationCompBase ()
 
virtual QStringList GetApplicationArguments () const override
 Get the command line arguments of this application.
 
- Public Member Functions inherited from icomp::CComponentBase
 CComponentBase ()
 Create component and assign it to specific context.
 
virtual const icomp::IComponentGetParentComponent (bool ownerOnly=false) const override
 Get parent of this component.
 
virtual void * GetInterface (const istd::CClassInfo &interfaceType, const QByteArray &subId="") override
 Get access to specified component interface.
 
virtual IComponentContextSharedPtr GetComponentContext () const override
 Get access to component context describing all application-specified component information loaded from components registry.
 
virtual void SetComponentContext (const IComponentContextSharedPtr &contextPtr, const icomp::IComponent *parentPtr, bool isParentOwner) override
 Set component context of this component.
 
- Public Member Functions inherited from istd::IPolymorphic
virtual ~IPolymorphic ()
 

Protected Member Functions

virtual void OnUpdate (const istd::IChangeable::ChangeSet &changeSet) override
 Called on update of observed model.
 
virtual void OnComponentDestroyed () override
 
virtual bool eventFilter (QObject *obj, QEvent *ev) override
 
 I_TEXTATTR (m_trayIconToolTip)
 
- Protected Member Functions inherited from iqtgui::CApplicationCompBase
QApplication * GetQtApplication () const
 
bool TryShowSplashScreen ()
 
void HideSplashScreen ()
 
void InitializeComponentApplication ()
 
void ApplyStyleSheet ()
 
void InitializeComponents ()
 
virtual void OnComponentCreated () override
 
- Protected Member Functions inherited from icomp::CComponentBase
bool IsComponentActive () const
 Check if component is active.
 
virtual const icomp::IRealComponentStaticInfoGetComponentStaticInfo () const =0
 Get access to static info of this component.
 
- Protected Member Functions inherited from imod::TSingleModelObserverBase< iprm::IEnableableParam >
virtual iprm::IEnableableParamCastFromModel (imod::IModel *modelPtr) const
 
 TSingleModelObserverBase ()
 
iprm::IEnableableParamGetObservedObject () const
 Get instance of observed object.
 
iprm::IEnableableParamGetObjectPtr () const
 Get instance of observed object.
 
bool AttachOrSetObject (iprm::IEnableableParam *objectPtr)
 Attach to model of object or set object pointer, if no connection is possible.
 
virtual bool OnModelAttached (imod::IModel *modelPtr, istd::IChangeable::ChangeSet &changeMask) override
 Callback invoked when an observable model is about to be attached to this observer.
 
virtual bool OnModelDetached (imod::IModel *modelPtr) override
 Callback invoked when an observable model is about to be detached from this observer.
 
- Protected Member Functions inherited from imod::CSingleModelObserverBase
void SetModelPtr (imod::IModel *modelPtr)
 Set internal model pointer to specified value.
 
 CSingleModelObserverBase ()
 
virtual ~CSingleModelObserverBase ()
 
imod::IModelGetObservedModel () const
 Get access to observed model.
 
imod::IModelGetModelPtr () const
 Get access to observed model.
 
void EnsureModelDetached ()
 Make sure this observer is detached.
 
void SetObservedIds (const istd::IChangeable::ChangeSet &changeMask)
 Set list of ID's beeing observed.
 
virtual bool IsModelAttached (const imod::IModel *modelPtr=NULL) const override
 Checks if the specified model is currently attached to this observer.
 
virtual void BeforeUpdate (imod::IModel *modelPtr) override
 Callback invoked before an update of the observer's content occurs.
 
virtual void AfterUpdate (imod::IModel *modelPtr, const istd::IChangeable::ChangeSet &changeSet) override
 Callback invoked after an update of the observer's content occurs.
 

Static Protected Member Functions

template<class InterfaceType >
static InterfaceType * ExtractTrayMessages (CGuiApplicationComp &component)
 
- Static Protected Member Functions inherited from icomp::CComponentBase
static const icomp::IRealComponentStaticInfoInitStaticInfo (IComponent *componentPtr)
 
static QByteArray GetComponentId (const icomp::IComponentContext *componentContextPtr, const QByteArray &contextId=QByteArray())
 

Protected Attributes

istd::TDelPtr< QWidget > m_mainWidgetPtr
 
Qt::WindowFlags m_defaultWidgetFlags
 
QRect m_lastWidgetGeometry
 
TrayMessages m_trayMessages
 
istd::TDelPtr< QSystemTrayIcon > m_trayIconPtr
 
- Protected Attributes inherited from iqtgui::CApplicationCompBase
imod::TModelWrap< RuntimeStatus > m_runtimeStatus
 
bool m_useSplashScreen
 
istd::CGeneralTimeStamp m_splashScreenTimer
 
istd::TDelPtr< QApplication > m_applicationPtr
 
QStringList m_applicationArguments
 
QByteArray m_appStyle
 
QString m_styleSheetFile
 
QTimer m_splashTimer
 

Additional Inherited Members

- Protected Types inherited from imod::TSingleModelObserverBase< iprm::IEnableableParam >
typedef CSingleModelObserverBase BaseClass
 
typedef iprm::IEnableableParam ModelType
 
- Protected Types inherited from imod::CSingleModelObserverBase
typedef imod::IModel ModelType
 
- Static Protected Attributes inherited from imod::CSingleModelObserverBase
static const istd::IChangeable::ChangeSet s_undoChanges
 

Detailed Description

Standard component for a Qt based GUI application.

You have several attributes to control the appearance and decoration of the application window, you can define the splash screen and set some information about your application.

Some notes for using style sheets: To make using of different style sheets according to the operation system possible, this component sets the property 'OperatingSystem' to the application's main widget. Then you can you following syntax in your style sheet to to manage your content depend on currently running operation system:

QWidget[OperatingSystem=OSX] QLabel{
font-size: 13pt;
}
QWidget[OperatingSystem=Windows] QLabel{
font-size: 8pt;
}

Supported operation systems are: iOS, Unix, OSX and Windows.

See also
istd::CSystem::GetOperationSystemName

Definition at line 46 of file CGuiApplicationComp.h.

Member Typedef Documentation

◆ BaseClass

Definition at line 53 of file CGuiApplicationComp.h.

◆ BaseClass2

Definition at line 54 of file CGuiApplicationComp.h.

Constructor & Destructor Documentation

◆ CGuiApplicationComp()

iqtgui::CGuiApplicationComp::CGuiApplicationComp ( )

Member Function Documentation

◆ eventFilter()

virtual bool iqtgui::CGuiApplicationComp::eventFilter ( QObject *  obj,
QEvent *  ev 
)
overrideprotectedvirtual

◆ Execute()

virtual int iqtgui::CGuiApplicationComp::Execute ( int  argc,
char **  argv 
)
overridevirtual

Start execution loop of the application.

Implements ibase::IApplication.

◆ ExtractTrayMessages()

template<class InterfaceType >
static InterfaceType * iqtgui::CGuiApplicationComp::ExtractTrayMessages ( CGuiApplicationComp component)
inlinestaticprotected

Definition at line 94 of file CGuiApplicationComp.h.

References m_trayMessages.

◆ GetApplicationGui()

virtual const iqtgui::IGuiObject * iqtgui::CGuiApplicationComp::GetApplicationGui ( ) const
overridevirtual

Get the main UI object of the application.

Implements iqtgui::IGuiApplication.

◆ GetHelpText()

virtual QString iqtgui::CGuiApplicationComp::GetHelpText ( ) const
overridevirtual

Get information about the possible command line arguments of this application.

Implements ibase::IApplication.

◆ I_TEXTATTR()

iqtgui::CGuiApplicationComp::I_TEXTATTR ( m_trayIconToolTip  )
protected

◆ InitializeApplication()

virtual bool iqtgui::CGuiApplicationComp::InitializeApplication ( int  argc,
char **  argv 
)
overridevirtual

Initialize the application object.

Reimplemented from iqtgui::CApplicationCompBase.

◆ OnComponentDestroyed()

virtual void iqtgui::CGuiApplicationComp::OnComponentDestroyed ( )
overrideprotectedvirtual

Reimplemented from icomp::CComponentBase.

◆ OnEventLoopStartedSignal

void iqtgui::CGuiApplicationComp::OnEventLoopStartedSignal ( )
signal

◆ OnUpdate()

virtual void iqtgui::CGuiApplicationComp::OnUpdate ( const istd::IChangeable::ChangeSet changeSet)
overrideprotectedvirtual

Called on update of observed model.

This method is designed to be overload by derrived classes.

Reimplemented from imod::CSingleModelObserverBase.

Member Data Documentation

◆ m_defaultWidgetFlags

Qt::WindowFlags iqtgui::CGuiApplicationComp::m_defaultWidgetFlags
protected

Definition at line 150 of file CGuiApplicationComp.h.

◆ m_lastWidgetGeometry

QRect iqtgui::CGuiApplicationComp::m_lastWidgetGeometry
protected

Definition at line 151 of file CGuiApplicationComp.h.

◆ m_mainWidgetPtr

istd::TDelPtr<QWidget> iqtgui::CGuiApplicationComp::m_mainWidgetPtr
protected
Note
The main widget must be deleted manually. For the main widget the deffered deleting in CGuiComponentBase::DestroyGui doesn't work, because it is called after leaving the main loop.

Definition at line 149 of file CGuiApplicationComp.h.

◆ m_trayIconPtr

istd::TDelPtr<QSystemTrayIcon> iqtgui::CGuiApplicationComp::m_trayIconPtr
protected

Definition at line 155 of file CGuiApplicationComp.h.

◆ m_trayMessages

TrayMessages iqtgui::CGuiApplicationComp::m_trayMessages
protected

Definition at line 153 of file CGuiApplicationComp.h.

Referenced by ExtractTrayMessages().


The documentation for this class was generated from the following file: