17 #ifndef GZ_GUI_MAINWINDOW_HH_
18 #define GZ_GUI_MAINWINDOW_HH_
26 #include <gz/common/Console.hh>
29 #include "gz/gui/Export.hh"
35 #pragma warning(disable: 4251)
43 class MainWindowPrivate;
70 NOTIFY PluginCountChanged
77 WRITE SetMaterialTheme
78 NOTIFY MaterialThemeChanged
85 WRITE SetMaterialPrimary
86 NOTIFY MaterialPrimaryChanged
93 WRITE SetMaterialAccent
94 NOTIFY MaterialAccentChanged
101 READ ToolBarColorLight
102 WRITE SetToolBarColorLight
103 NOTIFY ToolBarColorLightChanged
110 READ ToolBarTextColorLight
111 WRITE SetToolBarTextColorLight
112 NOTIFY ToolBarTextColorLightChanged
119 READ ToolBarColorDark
120 WRITE SetToolBarColorDark
121 NOTIFY ToolBarColorDarkChanged
128 READ ToolBarTextColorDark
129 WRITE SetToolBarTextColorDark
130 NOTIFY ToolBarTextColorDarkChanged
136 QString pluginToolBarColorLight
137 READ PluginToolBarColorLight
138 WRITE SetPluginToolBarColorLight
139 NOTIFY PluginToolBarColorLightChanged
145 QString pluginToolBarTextColorLight
146 READ PluginToolBarTextColorLight
147 WRITE SetPluginToolBarTextColorLight
148 NOTIFY PluginToolBarTextColorLightChanged
155 READ PluginToolBarColorDark
156 WRITE SetPluginToolBarColorDark
157 NOTIFY PluginToolBarColorDarkChanged
163 QString pluginToolBarTextColorDark
164 READ PluginToolBarTextColorDark
165 WRITE SetPluginToolBarTextColorDark
166 NOTIFY PluginToolBarTextColorDarkChanged
174 NOTIFY ShowDrawerChanged
179 bool showDefaultDrawerOpts
180 READ ShowDefaultDrawerOpts
181 WRITE SetShowDefaultDrawerOpts
182 NOTIFY ShowDefaultDrawerOptsChanged
189 WRITE SetShowPluginMenu
190 NOTIFY ShowPluginMenuChanged
196 READ DefaultExitAction
197 WRITE SetDefaultExitAction
198 NOTIFY DefaultExitActionChanged
203 bool showDialogOnExit
204 READ ShowDialogOnExit
205 WRITE SetShowDialogOnExit
206 NOTIFY ShowDialogOnExitChanged
212 READ DialogOnExitText
213 WRITE SetDialogOnExitText
214 NOTIFY DialogOnExitTextChanged
219 bool exitDialogShowShutdown
220 READ ExitDialogShowShutdown
221 WRITE SetExitDialogShowShutdown
222 NOTIFY ExitDialogShowShutdownChanged
227 bool exitDialogShowCloseGui
228 READ ExitDialogShowCloseGui
229 WRITE SetExitDialogShowCloseGui
230 NOTIFY ExitDialogShowCloseGuiChanged
236 READ ExitDialogShutdownText
237 WRITE SetExitDialogShutdownText
238 NOTIFY ExitDialogShutdownTextChanged
244 READ ExitDialogCloseGuiText
245 WRITE SetExitDialogCloseGuiText
246 NOTIFY ExitDialogCloseGuiTextChanged
257 public: QQuickWindow *QuickWindow() const;
263 public:
void SaveConfig(const
std::
string &_path);
276 public slots:
void OnAddPlugin(
QString _plugin);
280 public: Q_INVOKABLE
QStringList PluginListModel() const;
285 public: Q_INVOKABLE
int PluginCount() const;
290 public: Q_INVOKABLE
void SetPluginCount(const
int _pluginCount);
294 public: Q_INVOKABLE
QString MaterialTheme() const;
298 public: Q_INVOKABLE
void SetMaterialTheme(
299 const
QString &_materialTheme);
303 public: Q_INVOKABLE
QString MaterialPrimary() const;
307 public: Q_INVOKABLE
void SetMaterialPrimary(
308 const
QString &_materialPrimary);
312 public: Q_INVOKABLE
QString MaterialAccent() const;
316 public: Q_INVOKABLE
void SetMaterialAccent(
317 const
QString &_materialAccent);
321 public: Q_INVOKABLE
QString ToolBarColorLight() const;
325 public: Q_INVOKABLE
void SetToolBarColorLight(
326 const
QString &_toolBarColorLight);
330 public: Q_INVOKABLE
QString ToolBarTextColorLight() const;
334 public: Q_INVOKABLE
void SetToolBarTextColorLight(
335 const
QString &_toolBarTextColorLight);
339 public: Q_INVOKABLE
QString ToolBarColorDark() const;
343 public: Q_INVOKABLE
void SetToolBarColorDark(
344 const
QString &_toolBarColorDark);
348 public: Q_INVOKABLE
QString ToolBarTextColorDark() const;
352 public: Q_INVOKABLE
void SetToolBarTextColorDark(
353 const
QString &_toolBarTextColorDark);
357 public: Q_INVOKABLE
QString PluginToolBarColorLight() const;
361 public: Q_INVOKABLE
void SetPluginToolBarColorLight(
362 const
QString &_pluginPluginToolBarColorLight);
366 public: Q_INVOKABLE
QString PluginToolBarTextColorLight() const;
370 public: Q_INVOKABLE
void SetPluginToolBarTextColorLight(
371 const
QString &_pluginPluginToolBarTextColorLight);
375 public: Q_INVOKABLE
QString PluginToolBarColorDark() const;
379 public: Q_INVOKABLE
void SetPluginToolBarColorDark(
380 const
QString &_pluginPluginToolBarColorDark);
384 public: Q_INVOKABLE
QString PluginToolBarTextColorDark() const;
388 public: Q_INVOKABLE
void SetPluginToolBarTextColorDark(
389 const
QString &_pluginPluginToolBarTextColorDark);
393 public: Q_INVOKABLE
bool ShowDrawer() const;
397 public: Q_INVOKABLE
void SetShowDrawer(const
bool _showDrawer);
401 public: Q_INVOKABLE
bool ShowDefaultDrawerOpts() const;
405 public: Q_INVOKABLE
void SetShowDefaultDrawerOpts(
406 const
bool _showDefaultDrawerOpts);
410 public: Q_INVOKABLE
bool ShowPluginMenu() const;
414 public: Q_INVOKABLE
void SetShowPluginMenu(const
bool _showPluginMenu);
418 public: Q_INVOKABLE
ExitAction DefaultExitAction() const;
422 public: Q_INVOKABLE
void SetDefaultExitAction(
427 public: Q_INVOKABLE
bool ShowDialogOnExit() const;
431 public: Q_INVOKABLE
void SetShowDialogOnExit(
bool _showDialogOnExit);
435 public: Q_INVOKABLE
QString DialogOnExitText() const;
439 public: Q_INVOKABLE
void SetDialogOnExitText(
440 const
QString &_dialogOnExitText);
444 public: Q_INVOKABLE
bool ExitDialogShowShutdown() const;
448 public: Q_INVOKABLE
void SetExitDialogShowShutdown(
449 bool _exitDialogShowShutdown);
453 public: Q_INVOKABLE
bool ExitDialogShowCloseGui() const;
457 public: Q_INVOKABLE
void SetExitDialogShowCloseGui(
458 bool _exitDialogShowCloseGui);
462 public: Q_INVOKABLE
QString ExitDialogShutdownText() const;
466 public: Q_INVOKABLE
void SetExitDialogShutdownText(
467 const
QString &_exitDialogShutdownText);
471 public: Q_INVOKABLE
QString ExitDialogCloseGuiText() const;
475 public: Q_INVOKABLE
void SetExitDialogCloseGuiText(
476 const
QString &_exitDialogCloseGuiText);
480 public: Q_INVOKABLE
std::
string ServerControlService() const;
484 public: Q_INVOKABLE
void SetServerControlService(
485 const
std::
string &_service);
488 public slots:
void OnLoadConfig(const
QString &_path);
491 public slots:
void OnSaveConfig();
494 public slots:
void OnSaveConfigAs(const
QString &_path);
497 public slots:
void OnStopServer();
500 signals:
void PluginCountChanged();
503 signals:
void MaterialThemeChanged();
506 signals:
void MaterialPrimaryChanged();
509 signals:
void MaterialAccentChanged();
512 signals:
void ToolBarColorLightChanged();
515 signals:
void ToolBarTextColorLightChanged();
518 signals:
void ToolBarColorDarkChanged();
521 signals:
void ToolBarTextColorDarkChanged();
524 signals:
void PluginToolBarColorLightChanged();
527 signals:
void PluginToolBarTextColorLightChanged();
530 signals:
void PluginToolBarColorDarkChanged();
533 signals:
void PluginToolBarTextColorDarkChanged();
536 signals:
void ShowDrawerChanged();
539 signals:
void ShowDefaultDrawerOptsChanged();
542 signals:
void ShowPluginMenuChanged();
545 signals:
void DefaultExitActionChanged();
548 signals:
void ShowDialogOnExitChanged();
551 signals:
void DialogOnExitTextChanged();
554 signals:
void ExitDialogShowShutdownChanged();
557 signals:
void ExitDialogShowCloseGuiChanged();
560 signals:
void ExitDialogShutdownTextChanged();
563 signals:
void ExitDialogCloseGuiTextChanged();
566 signals:
void configChanged();
571 signals:
void notify(const
QString &_message);
580 signals:
void notifyWithDuration(const
QString &_message,
int _duration);
584 private:
std::unique_ptr<MainWindowPrivate> dataPtr;
654 bool showDrawer{
true};
657 bool showDefaultDrawerOpts{
true};
660 bool showPluginMenu{
true};
664 bool pluginsFromPaths{
true};