1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

set idle timer in widget.cpp

This commit is contained in:
agilob 2014-10-16 19:48:45 +01:00
parent db6b488515
commit f854d0e90f
No known key found for this signature in database
GPG Key ID: 2CACF3EEF598C663
3 changed files with 9 additions and 1 deletions

View File

@ -112,7 +112,9 @@ void GeneralForm::onStyleSelected(QString style)
void GeneralForm::onAutoAwayChanged()
{
Settings::getInstance().setAutoAwayTime(bodyUI->autoAwaySpinBox->value());
int minutes = bodyUI->autoAwaySpinBox->value();
Settings::getInstance().setAutoAwayTime(minutes);
Widget::getInstance()->setIdleTimer(minutes);
}
void GeneralForm::onSetStatusChange()

View File

@ -294,6 +294,11 @@ QString Widget::askProfiles()
return profile;
}
void Widget::setIdleTimer(int minutes)
{
idleTimer->start(mins * 1000*60);
}
QString Widget::getUsername()
{
return core->getUsername();

View File

@ -59,6 +59,7 @@ public:
bool getIsWindowMinimized();
static QList<QString> searchProfiles();
void clearContactsList();
void setIdleTimer(int minutes);
~Widget();
virtual void closeEvent(QCloseEvent *event);