Add ScreenSaver.
This commit is contained in:
@@ -16,6 +16,11 @@
|
||||
#include "components/ULineEdit.h"
|
||||
#include "components/ListBox.h"
|
||||
|
||||
namespace
|
||||
{
|
||||
const int MINIMUM_LOCKTIME = 30;
|
||||
}
|
||||
|
||||
GeneralForm::GeneralForm(QWidget* aParent)
|
||||
: QWidget(aParent)
|
||||
, mLayout(new QVBoxLayout(this))
|
||||
@@ -86,8 +91,12 @@ GeneralForm::GeneralForm(QWidget* aParent)
|
||||
connect(lockTime, &QLineEdit::textChanged, [=](const QString& str)
|
||||
{
|
||||
//take effect
|
||||
JsonObject::Instance()->setLockScreenTimeout(str);
|
||||
Locker::getInstance()->setTimer(JsonObject::Instance()->lockerCount());
|
||||
int time = str.toInt();
|
||||
if (MINIMUM_LOCKTIME < time)
|
||||
{
|
||||
JsonObject::Instance()->setLockScreenTimeout(str);
|
||||
Locker::getInstance()->setTimer(str.toInt() * 1000);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user