Skip to content

Commit

Permalink
Merge branch 'feature-issue-8' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Ximi1970 committed Apr 3, 2020
2 parents c6b66ad + bfcd30e commit daf5ece
Show file tree
Hide file tree
Showing 13 changed files with 625 additions and 148 deletions.
55 changes: 55 additions & 0 deletions app/SysTray-X/preferences.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ Preferences::Preferences( QObject *parent ) : QObject( parent )
m_hide_minimize = true;
m_start_minimized = false;

m_poll_startup_delay = 5;
m_poll_interval = 5;

m_debug = false;
}

Expand Down Expand Up @@ -178,6 +181,58 @@ 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.
*/
Expand Down
48 changes: 48 additions & 0 deletions app/SysTray-X/preferences.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,34 @@ 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.
*
Expand Down Expand Up @@ -157,6 +185,16 @@ 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.
*/
Expand Down Expand Up @@ -194,6 +232,16 @@ 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.
*/
Expand Down
Loading

0 comments on commit daf5ece

Please sign in to comment.