mirror of
https://github.com/arcan1s/netctl-gui.git
synced 2025-04-24 15:37:23 +00:00
added gui path configuration
This commit is contained in:
parent
7a6f24910f
commit
ef5d319337
@ -88,6 +88,42 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="layout_gui">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_gui">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>23</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Path to GUI</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_gui"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_gui">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>23</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Browse</string>
|
||||
</property>
|
||||
<property name="default">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_showBigInterface">
|
||||
<property name="text">
|
||||
@ -538,6 +574,8 @@
|
||||
<tabstops>
|
||||
<tabstop>tabWidget</tabstop>
|
||||
<tabstop>spinBox_autoUpdate</tabstop>
|
||||
<tabstop>lineEdit_gui</tabstop>
|
||||
<tabstop>pushButton_gui</tabstop>
|
||||
<tabstop>checkBox_showBigInterface</tabstop>
|
||||
<tabstop>checkBox_showNetDev</tabstop>
|
||||
<tabstop>checkBox_showExtIp</tabstop>
|
||||
|
@ -107,6 +107,7 @@ void Netctl::createConfigurationInterface(KConfigDialog *parent)
|
||||
uiConfig.setupUi(configwin);
|
||||
|
||||
uiConfig.spinBox_autoUpdate->setValue(autoUpdateInterval);
|
||||
uiConfig.lineEdit_gui->setText(guiPath);
|
||||
if (showBigInterface)
|
||||
uiConfig.checkBox_showBigInterface->setCheckState(Qt::Checked);
|
||||
else
|
||||
@ -148,6 +149,7 @@ void Netctl::configAccepted()
|
||||
KConfigGroup cg = config();
|
||||
|
||||
cg.writeEntry("autoUpdateInterval", uiConfig.spinBox_autoUpdate->value());
|
||||
cg.writeEntry("guiPath", uiConfig.lineEdit_gui->text());
|
||||
if (uiConfig.checkBox_showBigInterface->checkState() == 0)
|
||||
cg.writeEntry("showBigInterface", false);
|
||||
else
|
||||
@ -180,6 +182,7 @@ void Netctl::configChanged()
|
||||
KConfigGroup cg = config();
|
||||
|
||||
autoUpdateInterval = cg.readEntry("autoUpdateInterval", 1000);
|
||||
guiPath = cg.readEntry("guiPath", "/usr/bin/netctl-gui");
|
||||
showBigInterface = cg.readEntry("showBigInterface", true);
|
||||
showNetDev = cg.readEntry("showNetDev", true);
|
||||
showExtIp = cg.readEntry("showExtIp", true);
|
||||
|
@ -53,6 +53,7 @@ private:
|
||||
QStringList formatLine;
|
||||
// configuration
|
||||
int autoUpdateInterval;
|
||||
QString guiPath;
|
||||
bool showBigInterface;
|
||||
bool showNetDev;
|
||||
bool showExtIp;
|
||||
|
Loading…
Reference in New Issue
Block a user