Hemera::GuiApplication Class Reference

The base class for Hemera Gui applications. More...

#include <HemeraGui/GuiApplication>

Inheritance diagram for Hemera::GuiApplication:

Public Slots

void setMainWindow (QWindow *window)
 
- Public Slots inherited from Hemera::Application
void start ()
 Triggers a safe start of the application. More...
 
void stop ()
 Triggers a safe stop of the application. More...
 
void quit ()
 Triggers a safe quit of the application. More...
 
Hemera::OperationrequestOrbitSwitchInhibition (const QString &reason=QString())
 Requests an inhibition for orbit switching. More...
 
Hemera::OperationreleaseOrbitSwitchInhibition ()
 Releases a previously set inhibition. More...
 
- Public Slots inherited from Hemera::AsyncInitObject
Hemera::Operationinit ()
 

Public Member Functions

 GuiApplication (ApplicationProperties *properties)
 
virtual ~GuiApplication ()
 

Additional Inherited Members

- Signals inherited from Hemera::Application
void applicationStatusChanged (Hemera::Application::ApplicationStatus status)
 Emitted when the application's status changes. More...
 
- Signals inherited from Hemera::AsyncInitObject
void ready ()
 
- Protected Types inherited from Hemera::Application
enum  OperationResult : quint8 { OperationResult::Success, OperationResult::Failed, OperationResult::Fatal }
 Defines the result of a state transition. More...
 
- Protected Slots inherited from Hemera::Application
virtual void startImpl ()=0
 Implementation of the start procedure. More...
 
virtual void stopImpl ()=0
 Implementation of the stop procedure. More...
 
virtual void prepareForShutdown ()
 Implementation of the shutdown procedure. More...
 
void setStarted (OperationResult result=OperationResult::Success, const QString &errorName=QString(), const QString &errorMessage=QString())
 Marks a start operation as finished and completes the transition. More...
 
void setStopped (OperationResult result=OperationResult::Success, const QString &errorName=QString(), const QString &errorMessage=QString())
 Marks a stop operation as finished and completes the transition. More...
 
void setReadyForShutdown (OperationResult result=OperationResult::Success, const QString &errorName=QString(), const QString &errorMessage=QString())
 Marks a prepareForShutdown operation as finished and completes the transition. More...
 
- Protected Slots inherited from Hemera::AsyncInitObject
virtual void initImpl ()=0
 
void setReady ()
 
void setInitError (const QString &errorName, const QString &message=QString())
 
void setOnePartIsReady ()
 
- Protected Member Functions inherited from Hemera::AsyncInitObject
void setParts (uint parts)
 

Detailed Description

The base class for Hemera Gui applications.

GuiApplication holds all the needed logic for applications based upon QWindow. This includes all QtQuick 2 applications.

It follows all of the paradigms of Application, and is meant to be subclassed when you have a specific need to handle all of the logic from QWindow up. If you are relying on Qt Quick/QML, you might be better off sublcassing QmlGuiApplication or SimpleQmlGuiApplication.

Note
GuiApplication requires your device to support a working 3D stack. Please enquire with your representative to find out if that is the case. Running a GuiApplication on an unsupported device is, besides unsupported, likely not to be working.

Constructor & Destructor Documentation

Hemera::GuiApplication::GuiApplication ( ApplicationProperties properties)
explicit

Default constructor

Hemera::GuiApplication::~GuiApplication ( )
virtual

Default destructor

Member Function Documentation

void Hemera::GuiApplication::setMainWindow ( QWindow *  window)
slot

Sets the main window for this application

GuiApplication manages the state of your application's window visibility and more. As such, you should provide your Window to be managed. You won't need and must not call show or any similar modifier method on your window, and instead let GuiApplication manage it.

Note
Usually, setMainWindow should be called during the initialization procedure of the application.
You should not use this function if you are using a higher level implementation of GuiApplication such as QmlGuiApplication. Use the higher level alternatives instead.