mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
UI for autoaway
This commit is contained in:
parent
a3beb991e1
commit
db6b488515
|
@ -52,6 +52,8 @@ GeneralForm::GeneralForm(SettingsWidget *myParent) :
|
|||
else
|
||||
bodyUI->styleBrowser->setCurrentText("None");
|
||||
|
||||
bodyUI->autoAwaySpinBox->setValue(Settings::getInstance().getAutoAwayTime());
|
||||
|
||||
bodyUI->cbUDPDisabled->setChecked(Settings::getInstance().getForceTCP());
|
||||
bodyUI->proxyAddr->setText(Settings::getInstance().getProxyAddr());
|
||||
int port = Settings::getInstance().getProxyPort();
|
||||
|
@ -73,6 +75,7 @@ GeneralForm::GeneralForm(SettingsWidget *myParent) :
|
|||
connect(bodyUI->proxyPort, SIGNAL(valueChanged(int)), this, SLOT(onProxyPortEdited(int)));
|
||||
connect(bodyUI->cbUseProxy, &QCheckBox::stateChanged, this, &GeneralForm::onUseProxyUpdated);
|
||||
connect(bodyUI->styleBrowser, SIGNAL(currentTextChanged(QString)), this, SLOT(onStyleSelected(QString)));
|
||||
connect(bodyUI->autoAwaySpinBox, SIGNAL(editingFinished()), this, SLOT(onAutoAwayChanged()));
|
||||
}
|
||||
|
||||
GeneralForm::~GeneralForm()
|
||||
|
@ -107,6 +110,11 @@ void GeneralForm::onStyleSelected(QString style)
|
|||
parent->setStyle(style);
|
||||
}
|
||||
|
||||
void GeneralForm::onAutoAwayChanged()
|
||||
{
|
||||
Settings::getInstance().setAutoAwayTime(bodyUI->autoAwaySpinBox->value());
|
||||
}
|
||||
|
||||
void GeneralForm::onSetStatusChange()
|
||||
{
|
||||
Settings::getInstance().setStatusChangeNotificationEnabled(bodyUI->statusChangesCheckbox->isChecked());
|
||||
|
|
|
@ -42,6 +42,8 @@ private slots:
|
|||
void onUseProxyUpdated();
|
||||
void onStyleSelected(QString style);
|
||||
void onSetStatusChange();
|
||||
void onAutoAwayChanged();
|
||||
|
||||
|
||||
private:
|
||||
Ui::GeneralSettings *bodyUI;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>527</width>
|
||||
<height>397</height>
|
||||
<height>500</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -60,6 +60,42 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item alignment="Qt::AlignLeft">
|
||||
<widget class="QLabel" name="autoAwayLabel">
|
||||
<property name="toolTip">
|
||||
<string>Provided in minutes</string>
|
||||
</property>
|
||||
<property name="layoutDirection">
|
||||
<enum>Qt::LeftToRight</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Auto away after:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="autoAwaySpinBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string> minutes</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>600</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
Loading…
Reference in New Issue
Block a user