Classes | Public Types | 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::IEnableableParam
BaseClass2
 
- Public Types inherited from iqtgui::CApplicationCompBase
typedef icomp::CComponentBase BaseClass
 

Public Member Functions

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

Protected Member Functions

virtual void OnUpdate (const istd::IChangeable::ChangeSet &changeSet)
 Called on update of observed model. More...
 
virtual void OnComponentDestroyed ()
 
- Protected Member Functions inherited from iqtgui::CApplicationCompBase
QApplication * GetQtApplication () const
 
bool TryShowSplashScreen ()
 
void HideSplashScreen ()
 
void InitializeComponentApplication ()
 
void ApplyStyleSheet ()
 
virtual void OnComponentCreated ()
 
- Protected Member Functions inherited from icomp::CComponentBase
bool IsComponentActive () const
 Check if component is active. More...
 
virtual const
icomp::IRealComponentStaticInfo
GetComponentStaticInfo () const =0
 Get access to static info of this component. More...
 
- 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. More...
 
iprm::IEnableableParamGetObjectPtr () const
 Get instance of observed object. More...
 
bool AttachOrSetObject (iprm::IEnableableParam *objectPtr)
 Attach to model of object or set object pointer, if no connection is possible. More...
 
virtual bool OnModelAttached (imod::IModel *modelPtr, istd::IChangeable::ChangeSet &changeMask)
 This call back function will be called, if an observable object is about to be attached. More...
 
virtual bool OnModelDetached (imod::IModel *modelPtr)
 This call back function will be called, if an observable object is about to be detached. More...
 
- Protected Member Functions inherited from imod::CSingleModelObserverBase
void SetModelPtr (imod::IModel *modelPtr)
 Set internal model pointer to specified value. More...
 
 CSingleModelObserverBase ()
 
virtual ~CSingleModelObserverBase ()
 
imod::IModelGetObservedModel () const
 Get access to observed model. More...
 
imod::IModelGetModelPtr () const
 Get access to observed model. More...
 
void EnsureModelDetached ()
 Make sure this observer is detached. More...
 
void SetObservedIds (const istd::IChangeable::ChangeSet &changeMask)
 Set list of ID's beeing observed. More...
 
virtual bool IsModelAttached (const imod::IModel *modelPtr=NULL) const
 Check if specified model is attached. More...
 
virtual void BeforeUpdate (imod::IModel *modelPtr)
 This function will be called before update of the observer contents occures. More...
 
virtual void AfterUpdate (imod::IModel *modelPtr, const istd::IChangeable::ChangeSet &changeSet)
 This function will be called after update of the observer contents occures. More...
 

Static Protected Member Functions

template<class InterfaceType >
static InterfaceType * ExtractTrayMessages (CGuiApplicationComp &component)
 
- Static Protected Member Functions inherited from icomp::CComponentBase
static const
icomp::IRealComponentStaticInfo
InitStaticInfo (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
 

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

Definition at line 54 of file CGuiApplicationComp.h.

Definition at line 55 of file CGuiApplicationComp.h.

Constructor & Destructor Documentation

iqtgui::CGuiApplicationComp::CGuiApplicationComp ( )

Member Function Documentation

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

Start execution loop of the application.

Implements ibase::IApplication.

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

Definition at line 90 of file CGuiApplicationComp.h.

References m_trayMessages.

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

Get the main UI object of the application.

Implements iqtgui::IGuiApplication.

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

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

Implements ibase::IApplication.

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

Initialize the application object.

Reimplemented from iqtgui::CApplicationCompBase.

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

Reimplemented from icomp::CComponentBase.

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

Called on update of observed model.

This method is designed to be overload by derrived classes.

Reimplemented from imod::CSingleModelObserverBase.

Member Data Documentation

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

Definition at line 134 of file CGuiApplicationComp.h.

QRect iqtgui::CGuiApplicationComp::m_lastWidgetGeometry
protected

Definition at line 135 of file CGuiApplicationComp.h.

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 133 of file CGuiApplicationComp.h.

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

Definition at line 139 of file CGuiApplicationComp.h.

TrayMessages iqtgui::CGuiApplicationComp::m_trayMessages
protected

Definition at line 137 of file CGuiApplicationComp.h.

Referenced by ExtractTrayMessages().


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

© 2007-2017 Witold Gantzke and Kirill Lepskiy