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 | 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... | |
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... | |
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 | 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 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... | |
Public Member Functions inherited from QObject | |
QObject (QObject *parent) | |
QObject (QObject *parent, const char *name) | |
virtual | ~QObject () |
bool | blockSignals (bool block) |
QObject * | child (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< QByteArray > | dynamicPropertyNames () const |
virtual bool | event (QEvent *e) |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
T | findChild (const QString &name) const |
QList< T > | findChildren (const QRegExp ®Exp) 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 QMetaObject * | metaObject () const |
void | moveToThread (QThread *targetThread) |
const char * | name () const |
const char * | name (const char *defaultName) const |
QString | objectName () const |
QObject * | parent () 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) |
QThread * | thread () 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... | |
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... | |
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 |
QObject * | sender () 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()
MainWindow | ( | ) |
Constructor.
◆ ~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] _config The configuration to apply.
- Returns
- True if successful.
◆ 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
|
signal |
Notifies when the accent color has changed.
◆ MaterialPrimary()
Q_INVOKABLE QString MaterialPrimary | ( | ) | const |
Returns the material primary color.
- Returns
- Primary color
◆ MaterialPrimaryChanged
|
signal |
Notifies when the primary color has changed.
◆ MaterialTheme()
Q_INVOKABLE QString MaterialTheme | ( | ) | const |
Returns the material theme.
- Returns
- Theme (Light / Dark)
◆ MaterialThemeChanged
|
signal |
Notifies when the theme has changed.
◆ notify
|
signal |
Displays a message to the user.
◆ OnAddPlugin
|
slot |
Add a plugin to the window.
- Parameters
-
[in] _plugin Plugin filename
◆ OnLoadConfig
|
slot |
Callback when load configuration is selected.
◆ OnSaveConfig
|
slot |
Callback when "save configuration" is selected.
◆ OnSaveConfigAs
|
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
|
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
◆ 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] _path The full destination path including filename.
◆ SetMaterialAccent()
Q_INVOKABLE void SetMaterialAccent | ( | const QString & | _materialAccent | ) |
Sets the material accent color.
- Parameters
-
[in] _materialAccent Accent color
◆ SetMaterialPrimary()
Q_INVOKABLE void SetMaterialPrimary | ( | const QString & | _materialPrimary | ) |
Sets the material primary color.
- Parameters
-
[in] _materialPrimary Primary color
◆ SetMaterialTheme()
Q_INVOKABLE void SetMaterialTheme | ( | const QString & | _materialTheme | ) |
Sets the material theme.
- Parameters
-
[in] _materialTheme Theme (Light / Dark)
◆ SetPluginCount()
Q_INVOKABLE void SetPluginCount | ( | const int | _pluginCount | ) |
Sets the number of plugins current instantiated in the window.
- Parameters
-
[in] _pluginCount Number of plugins
◆ SetShowDefaultDrawerOpts()
Q_INVOKABLE void SetShowDefaultDrawerOpts | ( | const bool | _showDefaultDrawerOpts | ) |
Set the flag to show the side drawer's default options.
- Parameters
-
[in] _showDefaultDrawerOpts True to show.
◆ SetShowDrawer()
Q_INVOKABLE void SetShowDrawer | ( | const bool | _showDrawer | ) |
Set the flag to show the side drawer.
- Parameters
-
[in] _showDrawer True to show.
◆ SetShowPluginMenu()
Q_INVOKABLE void SetShowPluginMenu | ( | const bool | _showPluginMenu | ) |
Set the flag to show the plugin menu.
- Parameters
-
[in] _showPluginMenu True to show.
◆ ShowDefaultDrawerOpts()
Q_INVOKABLE bool ShowDefaultDrawerOpts | ( | ) | const |
Get the flag to show the side drawer's default options.
- Returns
- True to show.
◆ 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
|
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
|
signal |
Notifies when the show menu flag has changed.
Property Documentation
◆ materialAccent
|
readwrite |
Material accent color (Pre-defined color name or hex value)
◆ materialPrimary
|
readwrite |
Material primary color (Pre-defined color name or hex value)
◆ materialTheme
|
readwrite |
Material theme (Light / Dark)
◆ pluginCount
|
readwrite |
Number of plugins currently instantiated inside the window.
◆ showDefaultDrawerOpts
|
readwrite |
Flag to show side drawer's default options.
◆ showDrawer
|
readwrite |
Flag to show side drawer.
◆ showPluginMenu
|
readwrite |
Flag to show plugins menu.
The documentation for this class was generated from the following file: