diff --git a/app/SysTray-X/preferences.ui b/app/SysTray-X/preferences.ui index 8e7c6a3..7746ce8 100644 --- a/app/SysTray-X/preferences.ui +++ b/app/SysTray-X/preferences.ui @@ -6,8 +6,8 @@ 0 0 - 676 - 278 + 583 + 261 @@ -20,6 +20,72 @@ + + + + Number properties + + + + + + + + Display unread message count + + + true + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Text color + + + + + + + Qt::NoFocus + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + @@ -73,66 +139,84 @@ - - + + - Number properties + Windows - - - + + + - - - Display unread message count - - - true + + + Minimize + + + + + Default minimize + + + false + + + minimizeTypeGroup + + + + + + + Minimize to tray, method 1 + + + true + + + minimizeTypeGroup + + + + + + + Minimize to tray, method 2 + + + minimizeTypeGroup + + + + - - - Qt::Horizontal - - - - 40 - 20 - - - - - - + - Text color - - - - - - - Qt::NoFocus - - - + Start application minimized + + + + Qt::Vertical + + + + 20 + 40 + + + + - - - - Display debug window - - - @@ -243,69 +327,11 @@ - - - - Windows + + + + Display debug window - - - - - - - Minimize - - - - - - Default minimize - - - false - - - minimizeTypeGroup - - - - - - - Minimize to tray, method 1 - - - true - - - minimizeTypeGroup - - - - - - - Minimize to tray, method 2 - - - minimizeTypeGroup - - - - - - - - - - Start application minimized - - - - - - diff --git a/app/SysTray-X/windowctrl-win.cpp b/app/SysTray-X/windowctrl-win.cpp index 8d733df..dd41cd7 100644 --- a/app/SysTray-X/windowctrl-win.cpp +++ b/app/SysTray-X/windowctrl-win.cpp @@ -34,6 +34,24 @@ WindowCtrlWin::WindowCtrlWin( QObject *parent) : QObject( parent ) } +/* + * Set the minimize type + */ +void WindowCtrlWin::setMinimizeType( Preferences::MinimizeType type ) +{ + m_minimize_type = type; +} + + +/* + * Get the minimize type + */ +Preferences::MinimizeType WindowCtrlWin::getMinimizeType() const +{ + return m_minimize_type; +} + + /* * Get the parent pid of SysTray-X, TB hopefully */ diff --git a/app/SysTray-X/windowctrl-win.h b/app/SysTray-X/windowctrl-win.h index 67be41e..8a5d196 100644 --- a/app/SysTray-X/windowctrl-win.h +++ b/app/SysTray-X/windowctrl-win.h @@ -4,6 +4,11 @@ #ifndef WINDOWCTRLWIN_H #define WINDOWCTRLWIN_H +/* + * Local includes + */ +#include "preferences.h" + /* * System includes */ @@ -54,6 +59,20 @@ class WindowCtrlWin : public QObject */ explicit WindowCtrlWin( QObject *parent = nullptr ); + /** + * @brief setMinimizeType + * + * @param type Set the minimize type. + */ + void setMinimizeType( Preferences::MinimizeType type ); + + /** + * @brief getMinimizeType + * + * @return The minimize type. + */ + Preferences::MinimizeType getMinimizeType() const; + /** * @brief getPpid. Get the parent process id. * @@ -234,7 +253,7 @@ class WindowCtrlWin : public QObject /** * @brief m_minimize_type. Minimize type. */ - int m_minimize_type; + Preferences::MinimizeType m_minimize_type; }; #endif // WINDOWCTRLWIN_H