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)
41 class MainWindowPrivate;
68 NOTIFY PluginCountChanged
75 WRITE SetMaterialTheme
76 NOTIFY MaterialThemeChanged
83 WRITE SetMaterialPrimary
84 NOTIFY MaterialPrimaryChanged
91 WRITE SetMaterialAccent
92 NOTIFY MaterialAccentChanged
99 READ ToolBarColorLight
100 WRITE SetToolBarColorLight
101 NOTIFY ToolBarColorLightChanged
108 READ ToolBarTextColorLight
109 WRITE SetToolBarTextColorLight
110 NOTIFY ToolBarTextColorLightChanged
117 READ ToolBarColorDark
118 WRITE SetToolBarColorDark
119 NOTIFY ToolBarColorDarkChanged
126 READ ToolBarTextColorDark
127 WRITE SetToolBarTextColorDark
128 NOTIFY ToolBarTextColorDarkChanged
134 QString pluginToolBarColorLight
135 READ PluginToolBarColorLight
136 WRITE SetPluginToolBarColorLight
137 NOTIFY PluginToolBarColorLightChanged
143 QString pluginToolBarTextColorLight
144 READ PluginToolBarTextColorLight
145 WRITE SetPluginToolBarTextColorLight
146 NOTIFY PluginToolBarTextColorLightChanged
153 READ PluginToolBarColorDark
154 WRITE SetPluginToolBarColorDark
155 NOTIFY PluginToolBarColorDarkChanged
161 QString pluginToolBarTextColorDark
162 READ PluginToolBarTextColorDark
163 WRITE SetPluginToolBarTextColorDark
164 NOTIFY PluginToolBarTextColorDarkChanged
172 NOTIFY ShowDrawerChanged
177 bool showDefaultDrawerOpts
178 READ ShowDefaultDrawerOpts
179 WRITE SetShowDefaultDrawerOpts
180 NOTIFY ShowDefaultDrawerOptsChanged
187 WRITE SetShowPluginMenu
188 NOTIFY ShowPluginMenuChanged
194 READ DefaultExitAction
195 WRITE SetDefaultExitAction
196 NOTIFY DefaultExitActionChanged
201 bool showDialogOnExit
202 READ ShowDialogOnExit
203 WRITE SetShowDialogOnExit
204 NOTIFY ShowDialogOnExitChanged
210 READ DialogOnExitText
211 WRITE SetDialogOnExitText
212 NOTIFY DialogOnExitTextChanged
217 bool exitDialogShowShutdown
218 READ ExitDialogShowShutdown
219 WRITE SetExitDialogShowShutdown
220 NOTIFY ExitDialogShowShutdownChanged
225 bool exitDialogShowCloseGui
226 READ ExitDialogShowCloseGui
227 WRITE SetExitDialogShowCloseGui
228 NOTIFY ExitDialogShowCloseGuiChanged
234 READ ExitDialogShutdownText
235 WRITE SetExitDialogShutdownText
236 NOTIFY ExitDialogShutdownTextChanged
242 READ ExitDialogCloseGuiText
243 WRITE SetExitDialogCloseGuiText
244 NOTIFY ExitDialogCloseGuiTextChanged
255 public: QQuickWindow *QuickWindow() const;
261 public:
void SaveConfig(const
std::
string &_path);
274 public:
void SetRenderEngine(const
std::
string &_renderEngine);
278 public slots:
void OnAddPlugin(
QString _plugin);
287 public: Q_INVOKABLE
int PluginCount() const;
292 public: Q_INVOKABLE
void SetPluginCount(const
int _pluginCount);
296 public: Q_INVOKABLE
QString MaterialTheme() const;
300 public: Q_INVOKABLE
void SetMaterialTheme(
301 const
QString &_materialTheme);
305 public: Q_INVOKABLE
QString MaterialPrimary() const;
309 public: Q_INVOKABLE
void SetMaterialPrimary(
310 const
QString &_materialPrimary);
314 public: Q_INVOKABLE
QString MaterialAccent() const;
318 public: Q_INVOKABLE
void SetMaterialAccent(
319 const
QString &_materialAccent);
323 public: Q_INVOKABLE
QString ToolBarColorLight() const;
327 public: Q_INVOKABLE
void SetToolBarColorLight(
328 const
QString &_toolBarColorLight);
332 public: Q_INVOKABLE
QString ToolBarTextColorLight() const;
336 public: Q_INVOKABLE
void SetToolBarTextColorLight(
337 const
QString &_toolBarTextColorLight);
341 public: Q_INVOKABLE
QString ToolBarColorDark() const;
345 public: Q_INVOKABLE
void SetToolBarColorDark(
346 const
QString &_toolBarColorDark);
350 public: Q_INVOKABLE
QString ToolBarTextColorDark() const;
354 public: Q_INVOKABLE
void SetToolBarTextColorDark(
355 const
QString &_toolBarTextColorDark);
359 public: Q_INVOKABLE
QString PluginToolBarColorLight() const;
363 public: Q_INVOKABLE
void SetPluginToolBarColorLight(
364 const
QString &_pluginPluginToolBarColorLight);
368 public: Q_INVOKABLE
QString PluginToolBarTextColorLight() const;
372 public: Q_INVOKABLE
void SetPluginToolBarTextColorLight(
373 const
QString &_pluginPluginToolBarTextColorLight);
377 public: Q_INVOKABLE
QString PluginToolBarColorDark() const;
381 public: Q_INVOKABLE
void SetPluginToolBarColorDark(
382 const
QString &_pluginPluginToolBarColorDark);
386 public: Q_INVOKABLE
QString PluginToolBarTextColorDark() const;
390 public: Q_INVOKABLE
void SetPluginToolBarTextColorDark(
391 const
QString &_pluginPluginToolBarTextColorDark);
395 public: Q_INVOKABLE
bool ShowDrawer() const;
399 public: Q_INVOKABLE
void SetShowDrawer(const
bool _showDrawer);
403 public: Q_INVOKABLE
bool ShowDefaultDrawerOpts() const;
407 public: Q_INVOKABLE
void SetShowDefaultDrawerOpts(
408 const
bool _showDefaultDrawerOpts);
412 public: Q_INVOKABLE
bool ShowPluginMenu() const;
416 public: Q_INVOKABLE
void SetShowPluginMenu(const
bool _showPluginMenu);
424 public: Q_INVOKABLE
void SetDefaultExitAction(
429 public: Q_INVOKABLE
bool ShowDialogOnExit() const;
433 public: Q_INVOKABLE
void SetShowDialogOnExit(
bool _showDialogOnExit);
437 public: Q_INVOKABLE
QString DialogOnExitText() const;
441 public: Q_INVOKABLE
void SetDialogOnExitText(
442 const
QString &_dialogOnExitText);
446 public: Q_INVOKABLE
bool ExitDialogShowShutdown() const;
450 public: Q_INVOKABLE
void SetExitDialogShowShutdown(
451 bool _exitDialogShowShutdown);
455 public: Q_INVOKABLE
bool ExitDialogShowCloseGui() const;
459 public: Q_INVOKABLE
void SetExitDialogShowCloseGui(
460 bool _exitDialogShowCloseGui);
464 public: Q_INVOKABLE
QString ExitDialogShutdownText() const;
468 public: Q_INVOKABLE
void SetExitDialogShutdownText(
469 const
QString &_exitDialogShutdownText);
473 public: Q_INVOKABLE
QString ExitDialogCloseGuiText() const;
477 public: Q_INVOKABLE
void SetExitDialogCloseGuiText(
478 const
QString &_exitDialogCloseGuiText);
482 public: Q_INVOKABLE
std::
string ServerControlService() const;
486 public: Q_INVOKABLE
void SetServerControlService(
487 const
std::
string &_service);
490 public slots:
void OnLoadConfig(const
QString &_path);
493 public slots:
void OnSaveConfig();
496 public slots:
void OnSaveConfigAs(const
QString &_path);
499 public slots:
void OnStopServer();
502 signals:
void PluginCountChanged();
505 signals:
void MaterialThemeChanged();
508 signals:
void MaterialPrimaryChanged();
511 signals:
void MaterialAccentChanged();
514 signals:
void ToolBarColorLightChanged();
517 signals:
void ToolBarTextColorLightChanged();
520 signals:
void ToolBarColorDarkChanged();
523 signals:
void ToolBarTextColorDarkChanged();
526 signals:
void PluginToolBarColorLightChanged();
529 signals:
void PluginToolBarTextColorLightChanged();
532 signals:
void PluginToolBarColorDarkChanged();
535 signals:
void PluginToolBarTextColorDarkChanged();
538 signals:
void ShowDrawerChanged();
541 signals:
void ShowDefaultDrawerOptsChanged();
544 signals:
void ShowPluginMenuChanged();
547 signals:
void DefaultExitActionChanged();
550 signals:
void ShowDialogOnExitChanged();
553 signals:
void DialogOnExitTextChanged();
556 signals:
void ExitDialogShowShutdownChanged();
559 signals:
void ExitDialogShowCloseGuiChanged();
562 signals:
void ExitDialogShutdownTextChanged();
565 signals:
void ExitDialogCloseGuiTextChanged();
568 signals:
void configChanged();
573 signals:
void notify(const
QString &_message);
582 signals:
void notifyWithDuration(const
QString &_message,
int _duration);
586 private:
std::unique_ptr<MainWindowPrivate> dataPtr;
656 bool showDrawer{
true};
659 bool showDefaultDrawerOpts{
true};
662 bool showPluginMenu{
true};
666 bool pluginsFromPaths{
true};