Ignition Gui

API Reference

5.0.0

The main window class creates a QQuickWindow and acts as an interface which provides properties and functions which can be called from MainWindow.qml. More...

#include <MainWindow.hh>

Public Slots

void OnAddPlugin (QString _plugin)
 Add a plugin to the window. More...
 
void OnLoadConfig (const QString &_path)
 Callback when load configuration is selected. More...
 
void OnSaveConfig ()
 Callback when "save configuration" is selected. More...
 
void OnSaveConfigAs (const QString &_path)
 Callback when "save configuration as" is selected. More...
 

Signals

void configChanged ()
 Notifies when the window config has changed. More...
 
void MaterialAccentChanged ()
 Notifies when the accent color has changed. More...
 
void MaterialPrimaryChanged ()
 Notifies when the primary color has changed. More...
 
void MaterialThemeChanged ()
 Notifies when the theme has changed. More...
 
void notify (const QString &_message)
 Displays a message to the user. More...
 
void PluginCountChanged ()
 Notifies when the number of plugins has changed. More...
 
void PluginToolBarColorDarkChanged ()
 Notifies when the toolbar color dark has changed. More...
 
void PluginToolBarColorLightChanged ()
 Notifies when the toolbar color light has changed. More...
 
void PluginToolBarTextColorDarkChanged ()
 Notifies when the toolbar text color dark has changed. More...
 
void PluginToolBarTextColorLightChanged ()
 Notifies when the toolbar text color light has changed. More...
 
void ShowDefaultDrawerOptsChanged ()
 Notifies when the show drawer default options flag has changed. More...
 
void ShowDrawerChanged ()
 Notifies when the show drawer flag has changed. More...
 
void ShowPluginMenuChanged ()
 Notifies when the show menu flag has changed. More...
 
void ToolBarColorDarkChanged ()
 Notifies when the toolbar color dark has changed. More...
 
void ToolBarColorLightChanged ()
 Notifies when the toolbar color light has changed. More...
 
void ToolBarTextColorDarkChanged ()
 Notifies when the toolbar text color dark has changed. More...
 
void ToolBarTextColorLightChanged ()
 Notifies when the toolbar text color light has changed. More...
 

Public Member Functions

 MainWindow ()
 Constructor. More...
 
virtual ~MainWindow ()
 Destructor. More...
 
bool ApplyConfig (const WindowConfig &_config)
 Apply a WindowConfig to this window and keep a copy of it. More...
 
WindowConfig CurrentWindowConfig () const
 Get the current window configuration. More...
 
Q_INVOKABLE QString MaterialAccent () const
 Returns the material accent color. More...
 
Q_INVOKABLE QString MaterialPrimary () const
 Returns the material primary color. More...
 
Q_INVOKABLE QString MaterialTheme () const
 Returns the material theme. More...
 
Q_INVOKABLE int PluginCount () const
 Returns the number of plugins current instantiated in the window. More...
 
Q_INVOKABLE QStringList PluginListModel () const
 Return a list of all plugin names found. More...
 
Q_INVOKABLE QString PluginToolBarColorDark () const
 Returns the plugin toolbar color for dark theme. More...
 
Q_INVOKABLE QString PluginToolBarColorLight () const
 Returns the plugin toolbar color for light theme. More...
 
Q_INVOKABLE QString PluginToolBarTextColorDark () const
 Returns the plugin toolbar text color for dark theme. More...
 
Q_INVOKABLE QString PluginToolBarTextColorLight () const
 Returns the plugin toolbar text color for light theme. More...
 
QQuickWindow * QuickWindow () const
 Get the QtQuick window created by this object. More...
 
void SaveConfig (const std::string &_path)
 Save current window and plugin configuration to a file on disk. Will open an error dialog in case it's not possible to write to the path. More...
 
Q_INVOKABLE void SetMaterialAccent (const QString &_materialAccent)
 Sets the material accent color. More...
 
Q_INVOKABLE void SetMaterialPrimary (const QString &_materialPrimary)
 Sets the material primary color. More...
 
Q_INVOKABLE void SetMaterialTheme (const QString &_materialTheme)
 Sets the material theme. More...
 
Q_INVOKABLE void SetPluginCount (const int _pluginCount)
 Sets the number of plugins current instantiated in the window. More...
 
Q_INVOKABLE void SetPluginToolBarColorDark (const QString &_pluginPluginToolBarColorDark)
 Sets the plugin toolbar color for dark theme. More...
 
Q_INVOKABLE void SetPluginToolBarColorLight (const QString &_pluginPluginToolBarColorLight)
 Sets the plugin toolbar color for light theme. More...
 
Q_INVOKABLE void SetPluginToolBarTextColorDark (const QString &_pluginPluginToolBarTextColorDark)
 Sets the plugin toolbar text color for dark theme. More...
 
Q_INVOKABLE void SetPluginToolBarTextColorLight (const QString &_pluginPluginToolBarTextColorLight)
 Sets the plugin toolbar text color for light theme. More...
 
Q_INVOKABLE void SetShowDefaultDrawerOpts (const bool _showDefaultDrawerOpts)
 Set the flag to show the side drawer's default options. More...
 
Q_INVOKABLE void SetShowDrawer (const bool _showDrawer)
 Set the flag to show the side drawer. More...
 
Q_INVOKABLE void SetShowPluginMenu (const bool _showPluginMenu)
 Set the flag to show the plugin menu. More...
 
Q_INVOKABLE void SetToolBarColorDark (const QString &_toolBarColorDark)
 Sets the top toolbar color for dark theme. More...
 
Q_INVOKABLE void SetToolBarColorLight (const QString &_toolBarColorLight)
 Sets the top toolbar color for light theme. More...
 
Q_INVOKABLE void SetToolBarTextColorDark (const QString &_toolBarTextColorDark)
 Sets the top toolbar text color for dark theme. More...
 
Q_INVOKABLE void SetToolBarTextColorLight (const QString &_toolBarTextColorLight)
 Sets the top toolbar text color for light theme. More...
 
Q_INVOKABLE bool ShowDefaultDrawerOpts () const
 Get the flag to show the side drawer's default options. More...
 
Q_INVOKABLE bool ShowDrawer () const
 Get the flag to show the side drawer. More...
 
Q_INVOKABLE bool ShowPluginMenu () const
 Get the flag to show the plugin menu. More...
 
Q_INVOKABLE QString ToolBarColorDark () const
 Returns the top toolbar color for dark theme. More...
 
Q_INVOKABLE QString ToolBarColorLight () const
 Returns the top toolbar color for light theme. More...
 
Q_INVOKABLE QString ToolBarTextColorDark () const
 Returns the top toolbar text color for dark theme. More...
 
Q_INVOKABLE QString ToolBarTextColorLight () const
 Returns the top toolbar text color for light theme. More...
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
 QObject (QObject *parent, const char *name)
 
virtual ~QObject ()
 
bool blockSignals (bool block)
 
QObjectchild (const char *objName, const char *inheritsClass, bool recursiveSearch) const
 
const QObjectList & children () const
 
const char * className () const
 
bool connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const QObject *receiver, const char *method)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method)
 
void dumpObjectInfo ()
 
void dumpObjectTree ()
 
QList< QByteArraydynamicPropertyNames () const
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
findChild (const QString &name) const
 
QList< T > findChildren (const QRegExp &regExp) const
 
QList< T > findChildren (const QString &name) const
 
bool inherits (const char *className) const
 
void insertChild (QObject *object)
 
void installEventFilter (QObject *filterObj)
 
bool isA (const char *className) const
 
bool isWidgetType () const
 
void killTimer (int id)
 
virtual const QMetaObjectmetaObject () const
 
void moveToThread (QThread *targetThread)
 
const char * name () const
 
const char * name (const char *defaultName) const
 
QString objectName () const
 
QObjectparent () const
 
QVariant property (const char *name) const
 
void removeChild (QObject *object)
 
void removeEventFilter (QObject *obj)
 
void setName (const char *name)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool signalsBlocked () const
 
int startTimer (int interval)
 
QThreadthread () const
 

Properties

QString materialAccent
 Material accent color (Pre-defined color name or hex value) More...
 
QString materialPrimary
 Material primary color (Pre-defined color name or hex value) More...
 
QString materialTheme
 Material theme (Light / Dark) More...
 
int pluginCount
 Number of plugins currently instantiated inside the window. More...
 
QString pluginToolBarColorDark
 Plugin toolbar color for dark theme (Pre-defined color name or hex value). Defaults to material accent. More...
 
QString pluginToolBarColorLight
 Plugin toolbar color for light theme (Pre-defined color name or hex value). Defaults to material accent. More...
 
QString pluginToolBarTextColorDark
 Plugin toolbar text color for dark theme (Pre-defined color name or hex value). Defaults to material foreground. More...
 
QString pluginToolBarTextColorLight
 Plugin toolbar text color for light theme (Pre-defined color name or hex value). Defaults to material foreground. More...
 
bool showDefaultDrawerOpts
 Flag to show side drawer's default options. More...
 
bool showDrawer
 Flag to show side drawer. More...
 
bool showPluginMenu
 Flag to show plugins menu. More...
 
QString toolBarColorDark
 Top toolbar color for dark theme (Pre-defined color name or hex value). Defaults to material primary. More...
 
QString toolBarColorLight
 Top toolbar color for light theme (Pre-defined color name or hex value). Defaults to material primary. More...
 
QString toolBarTextColorDark
 Top toolbar text color for dark theme (Pre-defined color name or hex value). Defaults to material background. More...
 
QString toolBarTextColorLight
 Top toolbar text color for light theme (Pre-defined color name or hex value). Defaults to material background. More...
 
- Properties inherited from QObject
 objectName
 

Additional Inherited Members

- Static Public Member Functions inherited from QObject
bool connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
bool connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 
- Protected Member Functions inherited from QObject
bool checkConnectArgs (const char *signal, const QObject *object, const char *method)
 
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const char *signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const char *signal)
 
int receivers (const char *signal) const
 
QObjectsender () const
 
int senderSignalIndex () const
 
virtual void timerEvent (QTimerEvent *event)
 
- Static Protected Member Functions inherited from QObject
QByteArray normalizeSignalSlot (const char *signalSlot)
 

Detailed Description

The main window class creates a QQuickWindow and acts as an interface which provides properties and functions which can be called from MainWindow.qml.

Constructor & Destructor Documentation

◆ MainWindow()

Constructor.

◆ ~MainWindow()

virtual ~MainWindow ( )
virtual

Destructor.

Member Function Documentation

◆ ApplyConfig()

bool ApplyConfig ( const WindowConfig _config)

Apply a WindowConfig to this window and keep a copy of it.

Parameters
[in]_configThe configuration to apply.
Returns
True if successful.

◆ configChanged

void configChanged ( )
signal

Notifies when the window config has changed.

◆ CurrentWindowConfig()

WindowConfig CurrentWindowConfig ( ) const

Get the current window configuration.

Returns
Updated window config

◆ MaterialAccent()

Q_INVOKABLE QString MaterialAccent ( ) const

Returns the material accent color.

Returns
Accent color

◆ MaterialAccentChanged

void MaterialAccentChanged ( )
signal

Notifies when the accent color has changed.

◆ MaterialPrimary()

Q_INVOKABLE QString MaterialPrimary ( ) const

Returns the material primary color.

Returns
Primary color

◆ MaterialPrimaryChanged

void MaterialPrimaryChanged ( )
signal

Notifies when the primary color has changed.

◆ MaterialTheme()

Q_INVOKABLE QString MaterialTheme ( ) const

Returns the material theme.

Returns
Theme (Light / Dark)

◆ MaterialThemeChanged

void MaterialThemeChanged ( )
signal

Notifies when the theme has changed.

◆ notify

void notify ( const QString _message)
signal

Displays a message to the user.

◆ OnAddPlugin

void OnAddPlugin ( QString  _plugin)
slot

Add a plugin to the window.

Parameters
[in]_pluginPlugin filename

◆ OnLoadConfig

void OnLoadConfig ( const QString _path)
slot

Callback when load configuration is selected.

◆ OnSaveConfig

void OnSaveConfig ( )
slot

Callback when "save configuration" is selected.

◆ OnSaveConfigAs

void OnSaveConfigAs ( const QString _path)
slot

Callback when "save configuration as" is selected.

◆ PluginCount()

Q_INVOKABLE int PluginCount ( ) const

Returns the number of plugins current instantiated in the window.

Returns
Number of plugins

◆ PluginCountChanged

void PluginCountChanged ( )
signal

Notifies when the number of plugins has changed.

◆ PluginListModel()

Q_INVOKABLE QStringList PluginListModel ( ) const

Return a list of all plugin names found.

Returns
List with plugin names

◆ PluginToolBarColorDark()

Q_INVOKABLE QString PluginToolBarColorDark ( ) const

Returns the plugin toolbar color for dark theme.

Returns
Toolbar color

◆ PluginToolBarColorDarkChanged

void PluginToolBarColorDarkChanged ( )
signal

Notifies when the toolbar color dark has changed.

◆ PluginToolBarColorLight()

Q_INVOKABLE QString PluginToolBarColorLight ( ) const

Returns the plugin toolbar color for light theme.

Returns
Toolbar color

◆ PluginToolBarColorLightChanged

void PluginToolBarColorLightChanged ( )
signal

Notifies when the toolbar color light has changed.

◆ PluginToolBarTextColorDark()

Q_INVOKABLE QString PluginToolBarTextColorDark ( ) const

Returns the plugin toolbar text color for dark theme.

Returns
Toolbar text color

◆ PluginToolBarTextColorDarkChanged

void PluginToolBarTextColorDarkChanged ( )
signal

Notifies when the toolbar text color dark has changed.

◆ PluginToolBarTextColorLight()

Q_INVOKABLE QString PluginToolBarTextColorLight ( ) const

Returns the plugin toolbar text color for light theme.

Returns
Toolbar text color

◆ PluginToolBarTextColorLightChanged

void PluginToolBarTextColorLightChanged ( )
signal

Notifies when the toolbar text color light has changed.

◆ QuickWindow()

QQuickWindow* QuickWindow ( ) const

Get the QtQuick window created by this object.

Returns
Pointer to the QtQuick window

◆ SaveConfig()

void SaveConfig ( const std::string _path)

Save current window and plugin configuration to a file on disk. Will open an error dialog in case it's not possible to write to the path.

Parameters
[in]_pathThe full destination path including filename.

◆ SetMaterialAccent()

Q_INVOKABLE void SetMaterialAccent ( const QString _materialAccent)

Sets the material accent color.

Parameters
[in]_materialAccentAccent color

◆ SetMaterialPrimary()

Q_INVOKABLE void SetMaterialPrimary ( const QString _materialPrimary)

Sets the material primary color.

Parameters
[in]_materialPrimaryPrimary color

◆ SetMaterialTheme()

Q_INVOKABLE void SetMaterialTheme ( const QString _materialTheme)

Sets the material theme.

Parameters
[in]_materialThemeTheme (Light / Dark)

◆ SetPluginCount()

Q_INVOKABLE void SetPluginCount ( const int  _pluginCount)

Sets the number of plugins current instantiated in the window.

Parameters
[in]_pluginCountNumber of plugins

◆ SetPluginToolBarColorDark()

Q_INVOKABLE void SetPluginToolBarColorDark ( const QString _pluginPluginToolBarColorDark)

Sets the plugin toolbar color for dark theme.

Parameters
[in]_pluginPluginToolBarColorDarkToolbar color

◆ SetPluginToolBarColorLight()

Q_INVOKABLE void SetPluginToolBarColorLight ( const QString _pluginPluginToolBarColorLight)

Sets the plugin toolbar color for light theme.

Parameters
[in]_pluginPluginToolBarColorLightToolbar color

◆ SetPluginToolBarTextColorDark()

Q_INVOKABLE void SetPluginToolBarTextColorDark ( const QString _pluginPluginToolBarTextColorDark)

Sets the plugin toolbar text color for dark theme.

Parameters
[in]_pluginPluginToolBarTextColorDarkToolbar text color

◆ SetPluginToolBarTextColorLight()

Q_INVOKABLE void SetPluginToolBarTextColorLight ( const QString _pluginPluginToolBarTextColorLight)

Sets the plugin toolbar text color for light theme.

Parameters
[in]_pluginPluginToolBarTextColorLightToolbar text color

◆ SetShowDefaultDrawerOpts()

Q_INVOKABLE void SetShowDefaultDrawerOpts ( const bool  _showDefaultDrawerOpts)

Set the flag to show the side drawer's default options.

Parameters
[in]_showDefaultDrawerOptsTrue to show.

◆ SetShowDrawer()

Q_INVOKABLE void SetShowDrawer ( const bool  _showDrawer)

Set the flag to show the side drawer.

Parameters
[in]_showDrawerTrue to show.

◆ SetShowPluginMenu()

Q_INVOKABLE void SetShowPluginMenu ( const bool  _showPluginMenu)

Set the flag to show the plugin menu.

Parameters
[in]_showPluginMenuTrue to show.

◆ SetToolBarColorDark()

Q_INVOKABLE void SetToolBarColorDark ( const QString _toolBarColorDark)

Sets the top toolbar color for dark theme.

Parameters
[in]_toolBarColorDarkToolbar color

◆ SetToolBarColorLight()

Q_INVOKABLE void SetToolBarColorLight ( const QString _toolBarColorLight)

Sets the top toolbar color for light theme.

Parameters
[in]_toolBarColorLightToolbar color

◆ SetToolBarTextColorDark()

Q_INVOKABLE void SetToolBarTextColorDark ( const QString _toolBarTextColorDark)

Sets the top toolbar text color for dark theme.

Parameters
[in]_toolBarTextColorDarkToolbar text color

◆ SetToolBarTextColorLight()

Q_INVOKABLE void SetToolBarTextColorLight ( const QString _toolBarTextColorLight)

Sets the top toolbar text color for light theme.

Parameters
[in]_toolBarTextColorLightToolbar text color

◆ ShowDefaultDrawerOpts()

Q_INVOKABLE bool ShowDefaultDrawerOpts ( ) const

Get the flag to show the side drawer's default options.

Returns
True to show.

◆ ShowDefaultDrawerOptsChanged

void ShowDefaultDrawerOptsChanged ( )
signal

Notifies when the show drawer default options flag has changed.

◆ ShowDrawer()

Q_INVOKABLE bool ShowDrawer ( ) const

Get the flag to show the side drawer.

Returns
True to show.

◆ ShowDrawerChanged

void ShowDrawerChanged ( )
signal

Notifies when the show drawer flag has changed.

◆ ShowPluginMenu()

Q_INVOKABLE bool ShowPluginMenu ( ) const

Get the flag to show the plugin menu.

Returns
True to show.

◆ ShowPluginMenuChanged

void ShowPluginMenuChanged ( )
signal

Notifies when the show menu flag has changed.

◆ ToolBarColorDark()

Q_INVOKABLE QString ToolBarColorDark ( ) const

Returns the top toolbar color for dark theme.

Returns
Toolbar color

◆ ToolBarColorDarkChanged

void ToolBarColorDarkChanged ( )
signal

Notifies when the toolbar color dark has changed.

◆ ToolBarColorLight()

Q_INVOKABLE QString ToolBarColorLight ( ) const

Returns the top toolbar color for light theme.

Returns
Toolbar color

◆ ToolBarColorLightChanged

void ToolBarColorLightChanged ( )
signal

Notifies when the toolbar color light has changed.

◆ ToolBarTextColorDark()

Q_INVOKABLE QString ToolBarTextColorDark ( ) const

Returns the top toolbar text color for dark theme.

Returns
Toolbar text color

◆ ToolBarTextColorDarkChanged

void ToolBarTextColorDarkChanged ( )
signal

Notifies when the toolbar text color dark has changed.

◆ ToolBarTextColorLight()

Q_INVOKABLE QString ToolBarTextColorLight ( ) const

Returns the top toolbar text color for light theme.

Returns
Toolbar text color

◆ ToolBarTextColorLightChanged

void ToolBarTextColorLightChanged ( )
signal

Notifies when the toolbar text color light has changed.

Property Documentation

◆ materialAccent

QString materialAccent
readwrite

Material accent color (Pre-defined color name or hex value)

◆ materialPrimary

QString materialPrimary
readwrite

Material primary color (Pre-defined color name or hex value)

◆ materialTheme

QString materialTheme
readwrite

Material theme (Light / Dark)

◆ pluginCount

int pluginCount
readwrite

Number of plugins currently instantiated inside the window.

◆ pluginToolBarColorDark

QString pluginToolBarColorDark
readwrite

Plugin toolbar color for dark theme (Pre-defined color name or hex value). Defaults to material accent.

◆ pluginToolBarColorLight

QString pluginToolBarColorLight
readwrite

Plugin toolbar color for light theme (Pre-defined color name or hex value). Defaults to material accent.

◆ pluginToolBarTextColorDark

QString pluginToolBarTextColorDark
readwrite

Plugin toolbar text color for dark theme (Pre-defined color name or hex value). Defaults to material foreground.

◆ pluginToolBarTextColorLight

QString pluginToolBarTextColorLight
readwrite

Plugin toolbar text color for light theme (Pre-defined color name or hex value). Defaults to material foreground.

◆ showDefaultDrawerOpts

bool showDefaultDrawerOpts
readwrite

Flag to show side drawer's default options.

◆ showDrawer

bool showDrawer
readwrite

Flag to show side drawer.

◆ showPluginMenu

bool showPluginMenu
readwrite

Flag to show plugins menu.

◆ toolBarColorDark

QString toolBarColorDark
readwrite

Top toolbar color for dark theme (Pre-defined color name or hex value). Defaults to material primary.

◆ toolBarColorLight

QString toolBarColorLight
readwrite

Top toolbar color for light theme (Pre-defined color name or hex value). Defaults to material primary.

◆ toolBarTextColorDark

QString toolBarTextColorDark
readwrite

Top toolbar text color for dark theme (Pre-defined color name or hex value). Defaults to material background.

◆ toolBarTextColorLight

QString toolBarTextColorLight
readwrite

Top toolbar text color for light theme (Pre-defined color name or hex value). Defaults to material background.


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