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:
parent
db6b488515
commit
f854d0e90f
|
@ -112,7 +112,9 @@ void GeneralForm::onStyleSelected(QString style)
|
||||||
|
|
||||||
void GeneralForm::onAutoAwayChanged()
|
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()
|
void GeneralForm::onSetStatusChange()
|
||||||
|
|
|
@ -294,6 +294,11 @@ QString Widget::askProfiles()
|
||||||
return profile;
|
return profile;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Widget::setIdleTimer(int minutes)
|
||||||
|
{
|
||||||
|
idleTimer->start(mins * 1000*60);
|
||||||
|
}
|
||||||
|
|
||||||
QString Widget::getUsername()
|
QString Widget::getUsername()
|
||||||
{
|
{
|
||||||
return core->getUsername();
|
return core->getUsername();
|
||||||
|
|
|
@ -59,6 +59,7 @@ public:
|
||||||
bool getIsWindowMinimized();
|
bool getIsWindowMinimized();
|
||||||
static QList<QString> searchProfiles();
|
static QList<QString> searchProfiles();
|
||||||
void clearContactsList();
|
void clearContactsList();
|
||||||
|
void setIdleTimer(int minutes);
|
||||||
~Widget();
|
~Widget();
|
||||||
|
|
||||||
virtual void closeEvent(QCloseEvent *event);
|
virtual void closeEvent(QCloseEvent *event);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user