mirror of
https://github.com/Ximi1970/systray-x.git
synced 2026-03-06 03:40:43 +01:00
Update minimize handling
This commit is contained in:
@@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>676</width>
|
||||
<height>278</height>
|
||||
<width>583</width>
|
||||
<height>261</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -20,6 +20,72 @@
|
||||
<layout class="QGridLayout" name="gridLayout_4">
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="1" column="1" rowspan="2" colspan="2">
|
||||
<widget class="QGroupBox" name="groupBox_3">
|
||||
<property name="title">
|
||||
<string>Number properties</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="showNumberCheckBox">
|
||||
<property name="text">
|
||||
<string>Display unread message count</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Text color</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="numberColorPushButton">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="title">
|
||||
@@ -73,66 +139,84 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" rowspan="2" colspan="2">
|
||||
<widget class="QGroupBox" name="groupBox_3">
|
||||
<item row="0" column="0" rowspan="2">
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Number properties</string>
|
||||
<string>Windows</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="showNumberCheckBox">
|
||||
<property name="text">
|
||||
<string>Display unread message count</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
<widget class="QGroupBox" name="groupBox_4">
|
||||
<property name="title">
|
||||
<string>Minimize</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<widget class="QRadioButton" name="defaultMinimizeRadioButton">
|
||||
<property name="text">
|
||||
<string>Default minimize</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">minimizeTypeGroup</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="minimizeMethod1RadioButton">
|
||||
<property name="text">
|
||||
<string>Minimize to tray, method 1</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">minimizeTypeGroup</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="minimizeMethod2RadioButton">
|
||||
<property name="text">
|
||||
<string>Minimize to tray, method 2</string>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">minimizeTypeGroup</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<widget class="QCheckBox" name="startMinimizedCheckBox">
|
||||
<property name="text">
|
||||
<string>Text color</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="numberColorPushButton">
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
<string>Start application minimized</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="debugWindowCheckBox">
|
||||
<property name="text">
|
||||
<string>Display debug window</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QGroupBox" name="iconTypeGroupBox">
|
||||
<property name="title">
|
||||
@@ -243,69 +327,11 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" rowspan="2">
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Windows</string>
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="debugWindowCheckBox">
|
||||
<property name="text">
|
||||
<string>Display debug window</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_4">
|
||||
<property name="title">
|
||||
<string>Minimize</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<widget class="QRadioButton" name="defaultMinimizeRadioButton">
|
||||
<property name="text">
|
||||
<string>Default minimize</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">minimizeTypeGroup</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="minimizeMethod1RadioButton">
|
||||
<property name="text">
|
||||
<string>Minimize to tray, method 1</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">minimizeTypeGroup</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="minimizeMethod2RadioButton">
|
||||
<property name="text">
|
||||
<string>Minimize to tray, method 2</string>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">minimizeTypeGroup</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="startMinimizedCheckBox">
|
||||
<property name="text">
|
||||
<string>Start application minimized</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user