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:
void SetRenderEngine(const
std::
string &_renderEngine);
280 public slots:
void OnAddPlugin(
QString _plugin);
284 public: Q_INVOKABLE
QStringList PluginListModel() const;
289 public: Q_INVOKABLE
int PluginCount() const;
294 public: Q_INVOKABLE
void SetPluginCount(const
int _pluginCount);
298 public: Q_INVOKABLE
QString MaterialTheme() const;
302 public: Q_INVOKABLE
void SetMaterialTheme(
303 const
QString &_materialTheme);
307 public: Q_INVOKABLE
QString MaterialPrimary() const;
311 public: Q_INVOKABLE
void SetMaterialPrimary(
312 const
QString &_materialPrimary);
316 public: Q_INVOKABLE
QString MaterialAccent() const;
320 public: Q_INVOKABLE
void SetMaterialAccent(
321 const
QString &_materialAccent);
325 public: Q_INVOKABLE
QString ToolBarColorLight() const;
329 public: Q_INVOKABLE
void SetToolBarColorLight(
330 const
QString &_toolBarColorLight);
334 public: Q_INVOKABLE
QString ToolBarTextColorLight() const;
338 public: Q_INVOKABLE
void SetToolBarTextColorLight(
339 const
QString &_toolBarTextColorLight);
343 public: Q_INVOKABLE
QString ToolBarColorDark() const;
347 public: Q_INVOKABLE
void SetToolBarColorDark(
348 const
QString &_toolBarColorDark);
352 public: Q_INVOKABLE
QString ToolBarTextColorDark() const;
356 public: Q_INVOKABLE
void SetToolBarTextColorDark(
357 const
QString &_toolBarTextColorDark);
361 public: Q_INVOKABLE
QString PluginToolBarColorLight() const;
365 public: Q_INVOKABLE
void SetPluginToolBarColorLight(
366 const
QString &_pluginPluginToolBarColorLight);
370 public: Q_INVOKABLE
QString PluginToolBarTextColorLight() const;
374 public: Q_INVOKABLE
void SetPluginToolBarTextColorLight(
375 const
QString &_pluginPluginToolBarTextColorLight);
379 public: Q_INVOKABLE
QString PluginToolBarColorDark() const;
383 public: Q_INVOKABLE
void SetPluginToolBarColorDark(
384 const
QString &_pluginPluginToolBarColorDark);
388 public: Q_INVOKABLE
QString PluginToolBarTextColorDark() const;
392 public: Q_INVOKABLE
void SetPluginToolBarTextColorDark(
393 const
QString &_pluginPluginToolBarTextColorDark);
397 public: Q_INVOKABLE
bool ShowDrawer() const;
401 public: Q_INVOKABLE
void SetShowDrawer(const
bool _showDrawer);
405 public: Q_INVOKABLE
bool ShowDefaultDrawerOpts() const;
409 public: Q_INVOKABLE
void SetShowDefaultDrawerOpts(
410 const
bool _showDefaultDrawerOpts);
414 public: Q_INVOKABLE
bool ShowPluginMenu() const;
418 public: Q_INVOKABLE
void SetShowPluginMenu(const
bool _showPluginMenu);
422 public: Q_INVOKABLE
ExitAction DefaultExitAction() const;
426 public: Q_INVOKABLE
void SetDefaultExitAction(
431 public: Q_INVOKABLE
bool ShowDialogOnExit() const;
435 public: Q_INVOKABLE
void SetShowDialogOnExit(
bool _showDialogOnExit);
439 public: Q_INVOKABLE
QString DialogOnExitText() const;
443 public: Q_INVOKABLE
void SetDialogOnExitText(
444 const
QString &_dialogOnExitText);
448 public: Q_INVOKABLE
bool ExitDialogShowShutdown() const;
452 public: Q_INVOKABLE
void SetExitDialogShowShutdown(
453 bool _exitDialogShowShutdown);
457 public: Q_INVOKABLE
bool ExitDialogShowCloseGui() const;
461 public: Q_INVOKABLE
void SetExitDialogShowCloseGui(
462 bool _exitDialogShowCloseGui);
466 public: Q_INVOKABLE
QString ExitDialogShutdownText() const;
470 public: Q_INVOKABLE
void SetExitDialogShutdownText(
471 const
QString &_exitDialogShutdownText);
475 public: Q_INVOKABLE
QString ExitDialogCloseGuiText() const;
479 public: Q_INVOKABLE
void SetExitDialogCloseGuiText(
480 const
QString &_exitDialogCloseGuiText);
484 public: Q_INVOKABLE
std::
string ServerControlService() const;
488 public: Q_INVOKABLE
void SetServerControlService(
489 const
std::
string &_service);
492 public slots:
void OnLoadConfig(const
QString &_path);
495 public slots:
void OnSaveConfig();
498 public slots:
void OnSaveConfigAs(const
QString &_path);
501 public slots:
void OnStopServer();
504 signals:
void PluginCountChanged();
507 signals:
void MaterialThemeChanged();
510 signals:
void MaterialPrimaryChanged();
513 signals:
void MaterialAccentChanged();
516 signals:
void ToolBarColorLightChanged();
519 signals:
void ToolBarTextColorLightChanged();
522 signals:
void ToolBarColorDarkChanged();
525 signals:
void ToolBarTextColorDarkChanged();
528 signals:
void PluginToolBarColorLightChanged();
531 signals:
void PluginToolBarTextColorLightChanged();
534 signals:
void PluginToolBarColorDarkChanged();
537 signals:
void PluginToolBarTextColorDarkChanged();
540 signals:
void ShowDrawerChanged();
543 signals:
void ShowDefaultDrawerOptsChanged();
546 signals:
void ShowPluginMenuChanged();
549 signals:
void DefaultExitActionChanged();
552 signals:
void ShowDialogOnExitChanged();
555 signals:
void DialogOnExitTextChanged();
558 signals:
void ExitDialogShowShutdownChanged();
561 signals:
void ExitDialogShowCloseGuiChanged();
564 signals:
void ExitDialogShutdownTextChanged();
567 signals:
void ExitDialogCloseGuiTextChanged();
570 signals:
void configChanged();
575 signals:
void notify(const
QString &_message);
584 signals:
void notifyWithDuration(const
QString &_message,
int _duration);
588 private:
std::unique_ptr<MainWindowPrivate> dataPtr;
658 bool showDrawer{
true};
661 bool showDefaultDrawerOpts{
true};
664 bool showPluginMenu{
true};
668 bool pluginsFromPaths{
true};