mirror of
https://github.com/Ximi1970/systray-x.git
synced 2026-05-06 23:55:39 +02:00
Remove polling methods
This commit is contained in:
@@ -45,9 +45,6 @@ Preferences::Preferences( QObject *parent ) : QObject( parent )
|
||||
m_minimize_type = PREF_DEFAULT_MINIMIZE;
|
||||
m_start_minimized = false;
|
||||
|
||||
m_poll_startup_delay = 60;
|
||||
m_poll_interval = 60;
|
||||
|
||||
m_debug = false;
|
||||
|
||||
m_version_major = QLatin1String( APP_VERSION_MAJOR );
|
||||
@@ -344,58 +341,6 @@ void Preferences::setStartMinimized( bool state )
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Get the poll startup delay.
|
||||
*/
|
||||
int Preferences::getPollStartupDelay() const
|
||||
{
|
||||
return m_poll_startup_delay;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Set the startup poll delay.
|
||||
*/
|
||||
void Preferences::setPollStartupDelay( int val )
|
||||
{
|
||||
if( m_poll_startup_delay != val )
|
||||
{
|
||||
m_poll_startup_delay = val;
|
||||
|
||||
/*
|
||||
* Tell the world the new preference
|
||||
*/
|
||||
emit signalPollStartupDelayChange();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Get the poll interval.
|
||||
*/
|
||||
int Preferences::getPollInterval() const
|
||||
{
|
||||
return m_poll_interval;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Set the startup poll delay.
|
||||
*/
|
||||
void Preferences::setPollInterval( int val )
|
||||
{
|
||||
if( m_poll_interval != val )
|
||||
{
|
||||
m_poll_interval = val;
|
||||
|
||||
/*
|
||||
* Tell the world the new preference
|
||||
*/
|
||||
emit signalPollIntervalChange();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Get the debug state.
|
||||
*/
|
||||
|
||||
@@ -247,34 +247,6 @@ class Preferences : public QObject
|
||||
*/
|
||||
void setStartMinimized( bool state );
|
||||
|
||||
/**
|
||||
* @brief getPollStartupDelay. Get the poll startup delay.
|
||||
*
|
||||
* @return The poll startup delay.
|
||||
*/
|
||||
int getPollStartupDelay() const;
|
||||
|
||||
/**
|
||||
* @brief setPollStartupDelay. Set the poll startup delay.
|
||||
*
|
||||
* @param The poll startup delay.
|
||||
*/
|
||||
void setPollStartupDelay( int val );
|
||||
|
||||
/**
|
||||
* @brief getPollInterval. Get the poll interval.
|
||||
*
|
||||
* @return The poll interval.
|
||||
*/
|
||||
int getPollInterval() const;
|
||||
|
||||
/**
|
||||
* @brief setPollInterval. Set the poll interval.
|
||||
*
|
||||
* @param The poll interval.
|
||||
*/
|
||||
void setPollInterval( int val );
|
||||
|
||||
/**
|
||||
* @brief getDebug. Get the debug windows state.
|
||||
*
|
||||
@@ -361,16 +333,6 @@ class Preferences : public QObject
|
||||
*/
|
||||
void signalStartMinimizedChange();
|
||||
|
||||
/**
|
||||
* @brief signalPollStartupDelayChange. Signal a poll startup delay change.
|
||||
*/
|
||||
void signalPollStartupDelayChange();
|
||||
|
||||
/**
|
||||
* @brief signalPollIntervalChange. Signal a poll interval change.
|
||||
*/
|
||||
void signalPollIntervalChange();
|
||||
|
||||
/**
|
||||
* @brief signalDebugChange. Signal a debug state change.
|
||||
*/
|
||||
@@ -438,16 +400,6 @@ class Preferences : public QObject
|
||||
*/
|
||||
bool m_start_minimized;
|
||||
|
||||
/**
|
||||
* @brief m_poll_startup_delay. The startup poll delay.
|
||||
*/
|
||||
int m_poll_startup_delay;
|
||||
|
||||
/**
|
||||
* @brief m_poll_interval. The poll interval.
|
||||
*/
|
||||
int m_poll_interval;
|
||||
|
||||
/**
|
||||
* @brief m_debug. Display debug window.
|
||||
*/
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>676</width>
|
||||
<height>313</height>
|
||||
<width>482</width>
|
||||
<height>442</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -18,55 +18,273 @@
|
||||
<normaloff>:/files/icons/SysTray-X.png</normaloff>:/files/icons/SysTray-X.png</iconset>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0" rowspan="2" colspan="2">
|
||||
<item row="0" column="0" rowspan="2">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_9">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="iconTypeGroupBox">
|
||||
<property name="title">
|
||||
<string>Mail notification icon</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetFixedSize</enum>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="blankRadioButton">
|
||||
<property name="text">
|
||||
<string>Blank icon</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">iconTypeGroup</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<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>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetFixedSize</enum>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="newMailButton">
|
||||
<property name="text">
|
||||
<string>New mail icon</string>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">iconTypeGroup</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<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>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetMaximumSize</enum>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="customRadioButton">
|
||||
<property name="text">
|
||||
<string>Custom icon</string>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">iconTypeGroup</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="imageLabel">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="chooseCustomButton">
|
||||
<property name="text">
|
||||
<string>Choose</string>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_3">
|
||||
<property name="title">
|
||||
<string>Number properties</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_8">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_7">
|
||||
<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>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<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>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="countTypeGroupBox">
|
||||
<property name="title">
|
||||
<string>Count type</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_6">
|
||||
<item>
|
||||
<widget class="QRadioButton" name="unreadRadioButton">
|
||||
<property name="text">
|
||||
<string>Unread</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">countTypeGroup</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="newRadioButton">
|
||||
<property name="text">
|
||||
<string>New</string>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">countTypeGroup</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>17</width>
|
||||
<height>13</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="debugWindowCheckBox">
|
||||
<property name="text">
|
||||
<string>Display debug window</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Windows</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="0" column="0">
|
||||
<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>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<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>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
@@ -80,314 +298,23 @@
|
||||
</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="0" column="2">
|
||||
<widget class="QGroupBox" name="iconTypeGroupBox">
|
||||
<property name="title">
|
||||
<string>Mail notification icon</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetFixedSize</enum>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="blankRadioButton">
|
||||
<property name="text">
|
||||
<string>Blank icon</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">iconTypeGroup</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<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>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetFixedSize</enum>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="newMailButton">
|
||||
<property name="text">
|
||||
<string>New mail icon</string>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">iconTypeGroup</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<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>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetMaximumSize</enum>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="customRadioButton">
|
||||
<property name="text">
|
||||
<string>Custom icon</string>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">iconTypeGroup</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="imageLabel">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="chooseCustomButton">
|
||||
<property name="text">
|
||||
<string>Choose</string>
|
||||
</property>
|
||||
<property name="flat">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="title">
|
||||
<string>Mail actions</string>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QLabel" name="pollStartupDelayLabel">
|
||||
<property name="text">
|
||||
<string>Poll startup delay</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QSpinBox" name="pollStartupDelaySpinBox">
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>999</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>60</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="pollIntervalLabel">
|
||||
<property name="text">
|
||||
<string>Poll interval</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QSpinBox" name="pollIntervalSpinBox">
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>999</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>60</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2" colspan="2">
|
||||
<widget class="QGroupBox" name="groupBox_3">
|
||||
<property name="title">
|
||||
<string>Number properties</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_7">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_6">
|
||||
<item>
|
||||
<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>30</width>
|
||||
<height>37</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>31</width>
|
||||
<height>37</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<widget class="QLabel" name="countTypeLabel">
|
||||
<property name="text">
|
||||
<string>Message count type:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<widget class="QRadioButton" name="unreadRadioButton">
|
||||
<property name="text">
|
||||
<string>Unread</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">countTypeGroup</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="newRadioButton">
|
||||
<property name="text">
|
||||
<string>New</string>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">countTypeGroup</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</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="2" column="1" colspan="2">
|
||||
<spacer name="horizontalSpacer_5">
|
||||
<item row="1" column="1">
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
<width>20</width>
|
||||
<height>197</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="2" column="3">
|
||||
<item row="2" column="1">
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
|
||||
@@ -60,9 +60,9 @@ PreferencesDialog::PreferencesDialog( SysTrayXLink *link, Preferences *pref, QWi
|
||||
/*
|
||||
* Hide the count type for now
|
||||
*/
|
||||
m_ui->countTypeLabel->setVisible(false);
|
||||
m_ui->unreadRadioButton->setVisible(false);
|
||||
m_ui->newRadioButton->setVisible(false);
|
||||
m_ui->countTypeGroupBox->setVisible(false);
|
||||
// m_ui->unreadRadioButton->setVisible(false);
|
||||
// m_ui->newRadioButton->setVisible(false);
|
||||
|
||||
/*
|
||||
* Set defaults
|
||||
@@ -94,24 +94,6 @@ void PreferencesDialog::setDebug( bool state )
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Set the poll startup delay
|
||||
*/
|
||||
void PreferencesDialog::setPollStartupDelay( int val )
|
||||
{
|
||||
m_ui->pollStartupDelaySpinBox->setValue( val );
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Set the poll interval
|
||||
*/
|
||||
void PreferencesDialog::setPollInterval( int val )
|
||||
{
|
||||
m_ui->pollIntervalSpinBox->setValue( val );
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Set the minimize type
|
||||
*/
|
||||
@@ -226,9 +208,6 @@ void PreferencesDialog::slotAccept()
|
||||
m_pref->setMinimizeType( static_cast< Preferences::MinimizeType >( m_ui->minimizeTypeGroup->checkedId() ) );
|
||||
m_pref->setStartMinimized( m_ui->startMinimizedCheckBox->isChecked() );
|
||||
|
||||
m_pref->setPollStartupDelay(m_ui->pollStartupDelaySpinBox->value());
|
||||
m_pref->setPollInterval(m_ui->pollIntervalSpinBox->value());
|
||||
|
||||
m_pref->setShowNumber( m_ui->showNumberCheckBox->isChecked() );
|
||||
m_pref->setNumberColor( m_number_color );
|
||||
m_pref->setCountType( static_cast< Preferences::CountType >( m_ui->countTypeGroup->checkedId() ) );
|
||||
@@ -310,24 +289,6 @@ void PreferencesDialog::slotDebugChange()
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Handle the poll startup delay change signal
|
||||
*/
|
||||
void PreferencesDialog::slotPollStartupDelayChange()
|
||||
{
|
||||
setPollStartupDelay( m_pref->getPollStartupDelay() );
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Handle the poll interval change signal
|
||||
*/
|
||||
void PreferencesDialog::slotPollIntervalChange()
|
||||
{
|
||||
setPollInterval( m_pref->getPollInterval() );
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Handle the minimize type change signal
|
||||
*/
|
||||
|
||||
@@ -48,20 +48,6 @@ class PreferencesDialog : public QDialog
|
||||
*/
|
||||
void setDebug( bool state );
|
||||
|
||||
/**
|
||||
* @brief setPollStartupDelay. Set the poll startup delay.
|
||||
*
|
||||
* @param val The new value.
|
||||
*/
|
||||
void setPollStartupDelay( int val );
|
||||
|
||||
/**
|
||||
* @brief setPollInterval. Set the poll interval.
|
||||
*
|
||||
* @param val The new value.
|
||||
*/
|
||||
void setPollInterval( int val );
|
||||
|
||||
/**
|
||||
* @brief setMinimizeType. Set the minimize type.
|
||||
*
|
||||
@@ -138,16 +124,6 @@ class PreferencesDialog : public QDialog
|
||||
*/
|
||||
void slotDebugChange();
|
||||
|
||||
/**
|
||||
* @brief slotPollStartupDelayChange. Slot for handling poll startup delay signals.
|
||||
*/
|
||||
void slotPollStartupDelayChange();
|
||||
|
||||
/**
|
||||
* @brief slotPollIntervalChange. Slot for handling poll interval signals.
|
||||
*/
|
||||
void slotPollIntervalChange();
|
||||
|
||||
/**
|
||||
* @brief slotMinimizeTypeChange. Slot for handling minimize type change signals.
|
||||
*/
|
||||
|
||||
@@ -95,8 +95,6 @@ SysTrayX::SysTrayX( QObject *parent ) : QObject( parent )
|
||||
connect( m_preferences, &Preferences::signalCountTypeChange, m_pref_dialog, &PreferencesDialog::slotCountTypeChange );
|
||||
connect( m_preferences, &Preferences::signalMinimizeTypeChange, m_pref_dialog, &PreferencesDialog::slotMinimizeTypeChange );
|
||||
connect( m_preferences, &Preferences::signalStartMinimizedChange, m_pref_dialog, &PreferencesDialog::slotStartMinimizedChange );
|
||||
connect( m_preferences, &Preferences::signalPollStartupDelayChange, m_pref_dialog, &PreferencesDialog::slotPollStartupDelayChange );
|
||||
connect( m_preferences, &Preferences::signalPollIntervalChange, m_pref_dialog, &PreferencesDialog::slotPollIntervalChange );
|
||||
connect( m_preferences, &Preferences::signalDebugChange, m_pref_dialog, &PreferencesDialog::slotDebugChange );
|
||||
|
||||
connect( m_preferences, &Preferences::signalIconTypeChange, m_link, &SysTrayXLink::slotIconTypeChange );
|
||||
@@ -106,8 +104,6 @@ SysTrayX::SysTrayX( QObject *parent ) : QObject( parent )
|
||||
connect( m_preferences, &Preferences::signalCountTypeChange, m_link, &SysTrayXLink::slotCountTypeChange );
|
||||
connect( m_preferences, &Preferences::signalMinimizeTypeChange, m_link, &SysTrayXLink::slotMinimizeTypeChange );
|
||||
connect( m_preferences, &Preferences::signalStartMinimizedChange, m_link, &SysTrayXLink::slotStartMinimizedChange );
|
||||
connect( m_preferences, &Preferences::signalPollStartupDelayChange, m_link, &SysTrayXLink::slotPollStartupDelayChange );
|
||||
connect( m_preferences, &Preferences::signalPollIntervalChange, m_link, &SysTrayXLink::slotPollIntervalChange );
|
||||
connect( m_preferences, &Preferences::signalDebugChange, m_link, &SysTrayXLink::slotDebugChange );
|
||||
|
||||
connect( m_preferences, &Preferences::signalDebugChange, m_debug, &DebugWidget::slotDebugChange );
|
||||
|
||||
@@ -504,26 +504,6 @@ void SysTrayXLink::DecodePreferences( const QJsonObject& pref )
|
||||
m_pref->setStartMinimized( start_minimized );
|
||||
}
|
||||
|
||||
if( pref.contains( "pollStartupDelay" ) && pref[ "pollStartupDelay" ].isString() )
|
||||
{
|
||||
QString poll_startup_delay = pref[ "pollStartupDelay" ].toString();
|
||||
|
||||
/*
|
||||
* Store the new start minimized state
|
||||
*/
|
||||
m_pref->setPollStartupDelay( poll_startup_delay.toInt() );
|
||||
}
|
||||
|
||||
if( pref.contains( "pollInterval" ) && pref[ "pollInterval" ].isString() )
|
||||
{
|
||||
QString poll_interval = pref[ "pollInterval" ].toString();
|
||||
|
||||
/*
|
||||
* Store the new poll interval
|
||||
*/
|
||||
m_pref->setPollInterval( poll_interval.toInt() );
|
||||
}
|
||||
|
||||
if( pref.contains( "debug" ) && pref[ "debug" ].isString() )
|
||||
{
|
||||
bool debug = pref[ "debug" ].toString() == "true";
|
||||
@@ -546,8 +526,6 @@ void SysTrayXLink::EncodePreferences( const Preferences& pref )
|
||||
*/
|
||||
QJsonObject prefObject;
|
||||
prefObject.insert("debug", QJsonValue::fromVariant( QString( pref.getDebug() ? "true" : "false" ) ) );
|
||||
prefObject.insert("pollStartupDelay", QJsonValue::fromVariant( QString::number( pref.getPollStartupDelay() ) ) );
|
||||
prefObject.insert("pollInterval", QJsonValue::fromVariant( QString::number( pref.getPollInterval() ) ) );
|
||||
prefObject.insert("minimizeType", QJsonValue::fromVariant( QString::number( pref.getMinimizeType() ) ) );
|
||||
prefObject.insert("startMinimized", QJsonValue::fromVariant( QString( pref.getStartMinimized() ? "true" : "false" ) ) );
|
||||
prefObject.insert("iconType", QJsonValue::fromVariant( QString::number( pref.getIconType() ) ) );
|
||||
@@ -600,30 +578,6 @@ void SysTrayXLink::slotDebugChange()
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Handle a poll startup delay change signal
|
||||
*/
|
||||
void SysTrayXLink::slotPollStartupDelayChange()
|
||||
{
|
||||
if( m_pref->getAppPrefChanged() )
|
||||
{
|
||||
sendPreferences();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Handle a poll interval change signal
|
||||
*/
|
||||
void SysTrayXLink::slotPollIntervalChange()
|
||||
{
|
||||
if( m_pref->getAppPrefChanged() )
|
||||
{
|
||||
sendPreferences();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Handle the minimize type change signal
|
||||
*/
|
||||
|
||||
@@ -190,16 +190,6 @@ class SysTrayXLink : public QObject
|
||||
*/
|
||||
void slotDebugChange();
|
||||
|
||||
/**
|
||||
* @brief slotPollStartupDelayChange. Handle a change in poll startup delay.
|
||||
*/
|
||||
void slotPollStartupDelayChange();
|
||||
|
||||
/**
|
||||
* @brief slotPollIntervalChange. Handle a change in poll interval.
|
||||
*/
|
||||
void slotPollIntervalChange();
|
||||
|
||||
/**
|
||||
* @brief slotMinimizeTypeChange. Slot for handling minimize type change signals.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user