diff --git a/CHANGELOG b/CHANGELOG
index 08f4a05..4ee9b3d 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,7 +1,9 @@
-Ver.1.1.1:
+Ver.1.2.0:
+ [gui] added suppoort of macvlan
+ [gui] added ability to remove profile
+ [gui] added support of hidden wifi network
++ [gui] added contextual menu to tables
+* [plasmoid] edited configuration interface
Ver.1.1.0 (netctl-1.7 update):
+ [gui] added frequency
diff --git a/README.md b/README.md
index 438254b..1c38519 100644
--- a/README.md
+++ b/README.md
@@ -3,12 +3,14 @@ Netctl GUI
Information
-----------
+
Qt4/Qt5 graphical interface for netctl. It may work with profiles and may create new profiles. Also it may create a connection to WiFi. Moreover, it provides a widget and DataEngine for KDE.
**NOTE** LOOKING FOR TRANSLATORS!
Configuration
-------------
+
It is recommended to use graphical interface for widget configuration. DataEngine settings are stored in `/usr/share/config/netctl.conf`:
* `CMD` - netctl command. Default value is `/usr/bin/netctl`.
@@ -24,23 +26,27 @@ Instruction
Dependencies
------------
+
* netctl
* qt5-base (if Qt5 is used) or qt4 (if Qt4 is used)
Optional dependencies
---------------------
+
* kdebase-workspace (widget)
* sudo (sudo support)
* wpa_supplicant (WiFi support)
Make dependencies
-----------------
+
* automoc4
* cmake
* qt5-tools (if Qt5 is used)
Installation
------------
+
* download sources
* extract it and install the application:
@@ -63,10 +69,9 @@ Additional information
TODO (wish list)
----------------
-* add contextual actions to tables
-
Links
-----
+
* [Homepage](http://arcanis.name/projects/netctl-gui)
* Page on [kde-apps](http://kde-apps.org/content/show.php?content=164490)
* Archlinux [AUR](https://aur.archlinux.org/pkgbase/netctl-gui/) package
diff --git a/sources/CMakeLists.txt b/sources/CMakeLists.txt
index 186ec61..ed3dbf6 100644
--- a/sources/CMakeLists.txt
+++ b/sources/CMakeLists.txt
@@ -7,8 +7,8 @@ cmake_policy (SET CMP0015 NEW)
project (netctl-gui)
set (PROJECT_VERSION_MAJOR 1)
-set (PROJECT_VERSION_MINOR 1)
-set (PROJECT_VERSION_PATCH 1)
+set (PROJECT_VERSION_MINOR 2)
+set (PROJECT_VERSION_PATCH 0)
set (PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH})
configure_file (${CMAKE_SOURCE_DIR}/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/version.h)
diff --git a/sources/plasmoid/appearance.ui b/sources/plasmoid/appearance.ui
new file mode 100644
index 0000000..b387ac4
--- /dev/null
+++ b/sources/plasmoid/appearance.ui
@@ -0,0 +1,419 @@
+
+
+ AppearanceWindow
+
+
+
+ 0
+ 0
+ 480
+ 341
+
+
+
+
+ 480
+ 320
+
+
+
+ Configuration Window
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+ -
+
+
-
+
+
+
+ 80
+ 23
+
+
+
+ Inactive icon
+
+
+
+ -
+
+
+ -
+
+
+
+ 100
+ 0
+
+
+
+ Browse
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 80
+ 23
+
+
+
+ Font color
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 100
+ 23
+
+
+
+ Set font color
+
+
+
+
+
+ -
+
+
+ 5
+
+
+ 5
+
+
+ Qt::Horizontal
+
+
+
+ -
+
+
-
+
+
+
+ 80
+ 23
+
+
+
+ Font size
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 100
+ 23
+
+
+
+ Set font size
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ 7
+
+
+ 48
+
+
+ 12
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 80
+ 23
+
+
+
+ Font weight
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 100
+ 23
+
+
+
+ Set font weight
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ 300
+
+
+ 600
+
+
+ 50
+
+
+ 400
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 80
+ 23
+
+
+
+ Font style
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 100
+ 23
+
+
+
+ Set font style
+
+
-
+
+ normal
+
+
+ -
+
+ italic
+
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 80
+ 23
+
+
+
+ Font
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 180
+ 23
+
+
+
+ Set font family
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 80
+ 23
+
+
+
+ Active icon
+
+
+
+ -
+
+
+ -
+
+
+
+ 100
+ 0
+
+
+
+ Browse
+
+
+
+
+
+
+
+
+
+ KColorCombo
+ QComboBox
+
+
+
+
+ fontComboBox_font
+ spinBox_fontSize
+ kcolorcombo_fontColor
+ spinBox_fontWeight
+ comboBox_fontStyle
+ lineEdit_activeIcon
+ pushButton_activeIcon
+ lineEdit_inactiveIcon
+ pushButton_inactiveIcon
+
+
+
+
diff --git a/sources/plasmoid/configwindow.ui b/sources/plasmoid/configwindow.ui
deleted file mode 100644
index 4b91c3f..0000000
--- a/sources/plasmoid/configwindow.ui
+++ /dev/null
@@ -1,715 +0,0 @@
-
-
- ConfigWindow
-
-
-
- 0
- 0
- 480
- 343
-
-
-
-
- 480
- 320
-
-
-
- Configuration Window
-
-
- -
-
-
- 0
-
-
-
- Configuration
-
-
-
-
-
-
-
-
-
- Qt::AlignCenter
-
-
-
- -
-
-
-
-
-
-
- 150
- 23
-
-
-
- Auto update interval, msec
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- 40
- 20
-
-
-
-
- -
-
-
-
- 100
- 0
-
-
-
- Qt::LeftToRight
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
- 333
-
-
- 10000
-
-
- 500
-
-
- 1000
-
-
-
-
-
- -
-
-
-
-
-
-
- 80
- 23
-
-
-
- Path to GUI
-
-
-
- -
-
-
- -
-
-
-
- 100
- 23
-
-
-
- Browse
-
-
-
-
-
- -
-
-
-
-
-
-
- 80
- 23
-
-
-
- Path to netctl
-
-
-
- -
-
-
- -
-
-
-
- 100
- 23
-
-
-
- Browse
-
-
-
-
-
- -
-
-
-
-
-
-
- 150
- 23
-
-
-
- Use sudo for netctl
-
-
- true
-
-
-
- -
-
-
- -
-
-
-
- 100
- 23
-
-
-
- Browse
-
-
-
-
-
- -
-
-
-
-
-
-
- 150
- 23
-
-
-
- Show 'Start WiFi menu'
-
-
- true
-
-
-
- -
-
-
- -
-
-
-
- 100
- 23
-
-
-
- Browse
-
-
-
-
-
- -
-
-
- Show more detailed interface
-
-
- true
-
-
-
- -
-
-
- Show network devices
-
-
- true
-
-
-
- -
-
-
- Show external IP
-
-
- true
-
-
-
- -
-
-
- Show internal IP
-
-
- true
-
-
-
- -
-
-
- Qt::Vertical
-
-
-
- 20
- 40
-
-
-
-
-
-
-
-
- Appearance
-
-
- -
-
-
-
-
-
-
- 80
- 23
-
-
-
- Font
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- 40
- 20
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- 180
- 23
-
-
-
- Set font family
-
-
-
-
-
- -
-
-
-
-
-
-
- 80
- 23
-
-
-
- Font size
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- 40
- 20
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- 100
- 23
-
-
-
- Set font size
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
- 7
-
-
- 48
-
-
- 12
-
-
-
-
-
- -
-
-
-
-
-
-
- 80
- 23
-
-
-
- Font color
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- 40
- 20
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- 100
- 23
-
-
-
- Set font color
-
-
-
-
-
- -
-
-
-
-
-
-
- 80
- 23
-
-
-
- Font weight
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- 40
- 20
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- 100
- 23
-
-
-
- Set font weight
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
- 300
-
-
- 600
-
-
- 50
-
-
- 400
-
-
-
-
-
- -
-
-
-
-
-
-
- 80
- 23
-
-
-
- Font style
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- 40
- 20
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- 100
- 23
-
-
-
- Set font style
-
-
-
-
- normal
-
-
- -
-
- italic
-
-
-
-
-
-
- -
-
-
- 5
-
-
- 5
-
-
- Qt::Horizontal
-
-
-
- -
-
-
-
-
-
-
- 80
- 23
-
-
-
- Active icon
-
-
-
- -
-
-
- -
-
-
-
- 100
- 0
-
-
-
- Browse
-
-
-
-
-
- -
-
-
-
-
-
-
- 80
- 23
-
-
-
- Inactive icon
-
-
-
- -
-
-
- -
-
-
-
- 100
- 0
-
-
-
- Browse
-
-
-
-
-
- -
-
-
- Qt::Vertical
-
-
-
- 20
- 40
-
-
-
-
-
-
-
-
-
-
-
-
- KColorCombo
- QComboBox
-
-
-
-
- tabWidget
- spinBox_autoUpdate
- lineEdit_gui
- pushButton_gui
- lineEdit_netctl
- pushButton_netctl
- checkBox_sudo
- lineEdit_sudo
- pushButton_sudo
- checkBox_wifi
- lineEdit_wifi
- pushButton_wifi
- checkBox_showBigInterface
- checkBox_showNetDev
- checkBox_showExtIp
- checkBox_showIntIp
- fontComboBox_font
- spinBox_fontSize
- kcolorcombo_fontColor
- spinBox_fontWeight
- comboBox_fontStyle
- lineEdit_activeIcon
- pushButton_activeIcon
- lineEdit_inactiveIcon
- pushButton_inactiveIcon
-
-
-
-
diff --git a/sources/plasmoid/netctl.cpp b/sources/plasmoid/netctl.cpp
index 60afc51..be927d6 100644
--- a/sources/plasmoid/netctl.cpp
+++ b/sources/plasmoid/netctl.cpp
@@ -16,7 +16,8 @@
***************************************************************************/
#include "netctl.h"
-#include "ui_configwindow.h"
+#include
+#include
#include
#include
@@ -373,7 +374,7 @@ void Netctl::selectActiveIcon()
{
KUrl url = KFileDialog::getOpenUrl(KUrl(), "*");
if (!url.isEmpty())
- uiConfig.lineEdit_activeIcon->setText(url.path());
+ uiAppConfig.lineEdit_activeIcon->setText(url.path());
}
@@ -381,7 +382,7 @@ void Netctl::selectGuiExe()
{
KUrl url = KFileDialog::getOpenUrl(KUrl(), "*");
if (!url.isEmpty())
- uiConfig.lineEdit_gui->setText(url.path());
+ uiWidConfig.lineEdit_gui->setText(url.path());
}
@@ -389,7 +390,7 @@ void Netctl::selectInactiveIcon()
{
KUrl url = KFileDialog::getOpenUrl(KUrl(), "*");
if (!url.isEmpty())
- uiConfig.lineEdit_inactiveIcon->setText(url.path());
+ uiAppConfig.lineEdit_inactiveIcon->setText(url.path());
}
@@ -397,7 +398,7 @@ void Netctl::selectNetctlExe()
{
KUrl url = KFileDialog::getOpenUrl(KUrl(), "*");
if (!url.isEmpty())
- uiConfig.lineEdit_netctl->setText(url.path());
+ uiWidConfig.lineEdit_netctl->setText(url.path());
}
@@ -405,7 +406,7 @@ void Netctl::selectSudoExe()
{
KUrl url = KFileDialog::getOpenUrl(KUrl(), "*");
if (!url.isEmpty())
- uiConfig.lineEdit_sudo->setText(url.path());
+ uiWidConfig.lineEdit_sudo->setText(url.path());
}
@@ -413,47 +414,49 @@ void Netctl::selectWifiExe()
{
KUrl url = KFileDialog::getOpenUrl(KUrl(), "*");
if (!url.isEmpty())
- uiConfig.lineEdit_wifi->setText(url.path());
+ uiWidConfig.lineEdit_wifi->setText(url.path());
}
void Netctl::createConfigurationInterface(KConfigDialog *parent)
{
- QWidget *configwin = new QWidget;
- uiConfig.setupUi(configwin);
+ QWidget *configWidget = new QWidget;
+ uiWidConfig.setupUi(configWidget);
+ QWidget *appWidget = new QWidget;
+ uiAppConfig.setupUi(appWidget);
QString text = QString(NAME) + " - " + QString(VERSION) + "\n" + "(c) " +
QString(DATE) + " " + QString(AUTHOR);
- uiConfig.label_info->setText(text);
+ uiWidConfig.label_info->setText(text);
- uiConfig.spinBox_autoUpdate->setValue(autoUpdateInterval);
- uiConfig.lineEdit_gui->setText(paths[QString("gui")]);
- uiConfig.lineEdit_netctl->setText(paths[QString("netctl")]);
+ uiWidConfig.spinBox_autoUpdate->setValue(autoUpdateInterval);
+ uiWidConfig.lineEdit_gui->setText(paths[QString("gui")]);
+ uiWidConfig.lineEdit_netctl->setText(paths[QString("netctl")]);
if (useSudo)
- uiConfig.checkBox_sudo->setCheckState(Qt::Checked);
+ uiWidConfig.checkBox_sudo->setCheckState(Qt::Checked);
else
- uiConfig.checkBox_sudo->setCheckState(Qt::Unchecked);
- uiConfig.lineEdit_sudo->setText(paths[QString("sudo")]);
+ uiWidConfig.checkBox_sudo->setCheckState(Qt::Unchecked);
+ uiWidConfig.lineEdit_sudo->setText(paths[QString("sudo")]);
if (useWifi)
- uiConfig.checkBox_wifi->setCheckState(Qt::Checked);
+ uiWidConfig.checkBox_wifi->setCheckState(Qt::Checked);
else
- uiConfig.checkBox_wifi->setCheckState(Qt::Unchecked);
- uiConfig.lineEdit_wifi->setText(paths[QString("wifi")]);
+ uiWidConfig.checkBox_wifi->setCheckState(Qt::Unchecked);
+ uiWidConfig.lineEdit_wifi->setText(paths[QString("wifi")]);
if (bigInterface[QString("main")])
- uiConfig.checkBox_showBigInterface->setCheckState(Qt::Checked);
+ uiWidConfig.checkBox_showBigInterface->setCheckState(Qt::Checked);
else
- uiConfig.checkBox_showBigInterface->setCheckState(Qt::Unchecked);
+ uiWidConfig.checkBox_showBigInterface->setCheckState(Qt::Unchecked);
if (bigInterface[QString("netDev")])
- uiConfig.checkBox_showNetDev->setCheckState(Qt::Checked);
+ uiWidConfig.checkBox_showNetDev->setCheckState(Qt::Checked);
else
- uiConfig.checkBox_showNetDev->setCheckState(Qt::Unchecked);
+ uiWidConfig.checkBox_showNetDev->setCheckState(Qt::Unchecked);
if (bigInterface[QString("extIp")])
- uiConfig.checkBox_showExtIp->setCheckState(Qt::Checked);
+ uiWidConfig.checkBox_showExtIp->setCheckState(Qt::Checked);
else
- uiConfig.checkBox_showExtIp->setCheckState(Qt::Unchecked);
+ uiWidConfig.checkBox_showExtIp->setCheckState(Qt::Unchecked);
if (bigInterface[QString("intIp")])
- uiConfig.checkBox_showIntIp->setCheckState(Qt::Checked);
+ uiWidConfig.checkBox_showIntIp->setCheckState(Qt::Checked);
else
- uiConfig.checkBox_showIntIp->setCheckState(Qt::Unchecked);
+ uiWidConfig.checkBox_showIntIp->setCheckState(Qt::Unchecked);
setBigInterface();
KConfigGroup cg = config();
@@ -463,30 +466,31 @@ void Netctl::createConfigurationInterface(KConfigDialog *parent)
int fontWeight = cg.readEntry("fontWeight", 400);
QString fontStyle = cg.readEntry("fontStyle", "normal");
QFont font = QFont(fontFamily, 12, 400, FALSE);
- uiConfig.fontComboBox_font->setCurrentFont(font);
- uiConfig.spinBox_fontSize->setValue(fontSize);
- uiConfig.kcolorcombo_fontColor->setColor(fontColor);
- uiConfig.spinBox_fontWeight->setValue(fontWeight);
+ uiAppConfig.fontComboBox_font->setCurrentFont(font);
+ uiAppConfig.spinBox_fontSize->setValue(fontSize);
+ uiAppConfig.kcolorcombo_fontColor->setColor(fontColor);
+ uiAppConfig.spinBox_fontWeight->setValue(fontWeight);
if (fontStyle == "normal")
- uiConfig.comboBox_fontStyle->setCurrentIndex(0);
+ uiAppConfig.comboBox_fontStyle->setCurrentIndex(0);
else if (fontStyle == "italic")
- uiConfig.comboBox_fontStyle->setCurrentIndex(1);
- uiConfig.lineEdit_activeIcon->setText(paths[QString("active")]);
- uiConfig.lineEdit_inactiveIcon->setText(paths[QString("inactive")]);
+ uiAppConfig.comboBox_fontStyle->setCurrentIndex(1);
+ uiAppConfig.lineEdit_activeIcon->setText(paths[QString("active")]);
+ uiAppConfig.lineEdit_inactiveIcon->setText(paths[QString("inactive")]);
- parent->addPage(configwin, i18n("Netctl plasmoid"), Applet::icon());
+ parent->addPage(configWidget, i18n("Netctl plasmoid"), Applet::icon());
+ parent->addPage(appWidget, i18n("Appearance"), QString("preferences-desktop-theme"));
- connect(uiConfig.checkBox_showBigInterface, SIGNAL(stateChanged(int)), this,
+ connect(uiWidConfig.checkBox_showBigInterface, SIGNAL(stateChanged(int)), this,
SLOT(setBigInterface()));
- connect(uiConfig.checkBox_sudo, SIGNAL(stateChanged(int)), this, SLOT(setSudo()));
- connect(uiConfig.checkBox_wifi, SIGNAL(stateChanged(int)), this, SLOT(setWifi()));
+ connect(uiWidConfig.checkBox_sudo, SIGNAL(stateChanged(int)), this, SLOT(setSudo()));
+ connect(uiWidConfig.checkBox_wifi, SIGNAL(stateChanged(int)), this, SLOT(setWifi()));
- connect(uiConfig.pushButton_gui, SIGNAL(clicked()), this, SLOT(selectGuiExe()));
- connect(uiConfig.pushButton_netctl, SIGNAL(clicked()), this, SLOT(selectNetctlExe()));
- connect(uiConfig.pushButton_sudo, SIGNAL(clicked()), this, SLOT(selectSudoExe()));
- connect(uiConfig.pushButton_wifi, SIGNAL(clicked()), this, SLOT(selecWifiExe()));
- connect(uiConfig.pushButton_activeIcon, SIGNAL(clicked()), this, SLOT(selectActiveIcon()));
- connect(uiConfig.pushButton_inactiveIcon, SIGNAL(clicked()), this, SLOT(selectInactiveIcon()));
+ connect(uiWidConfig.pushButton_gui, SIGNAL(clicked()), this, SLOT(selectGuiExe()));
+ connect(uiWidConfig.pushButton_netctl, SIGNAL(clicked()), this, SLOT(selectNetctlExe()));
+ connect(uiWidConfig.pushButton_sudo, SIGNAL(clicked()), this, SLOT(selectSudoExe()));
+ connect(uiWidConfig.pushButton_wifi, SIGNAL(clicked()), this, SLOT(selecWifiExe()));
+ connect(uiAppConfig.pushButton_activeIcon, SIGNAL(clicked()), this, SLOT(selectActiveIcon()));
+ connect(uiAppConfig.pushButton_inactiveIcon, SIGNAL(clicked()), this, SLOT(selectInactiveIcon()));
connect(parent, SIGNAL(okClicked()), this, SLOT(configAccepted()));
connect(parent, SIGNAL(applyClicked()), this, SLOT(configAccepted()));
@@ -498,43 +502,43 @@ void Netctl::configAccepted()
disconnectFromEngine();
KConfigGroup cg = config();
- cg.writeEntry("autoUpdateInterval", uiConfig.spinBox_autoUpdate->value());
- cg.writeEntry("guiPath", uiConfig.lineEdit_gui->text());
- cg.writeEntry("netctlPath", uiConfig.lineEdit_netctl->text());
- if (uiConfig.checkBox_sudo->checkState() == 0)
+ cg.writeEntry("autoUpdateInterval", uiWidConfig.spinBox_autoUpdate->value());
+ cg.writeEntry("guiPath", uiWidConfig.lineEdit_gui->text());
+ cg.writeEntry("netctlPath", uiWidConfig.lineEdit_netctl->text());
+ if (uiWidConfig.checkBox_sudo->checkState() == 0)
cg.writeEntry("useSudo", false);
else
cg.writeEntry("useSudo", true);
- cg.writeEntry("sudoPath", uiConfig.lineEdit_sudo->text());
- if (uiConfig.checkBox_wifi->checkState() == 0)
+ cg.writeEntry("sudoPath", uiWidConfig.lineEdit_sudo->text());
+ if (uiWidConfig.checkBox_wifi->checkState() == 0)
cg.writeEntry("useWifi", false);
else
cg.writeEntry("useWifi", true);
- cg.writeEntry("wifiPath", uiConfig.lineEdit_wifi->text());
- if (uiConfig.checkBox_showBigInterface->checkState() == 0)
+ cg.writeEntry("wifiPath", uiWidConfig.lineEdit_wifi->text());
+ if (uiWidConfig.checkBox_showBigInterface->checkState() == 0)
cg.writeEntry("showBigInterface", false);
else
cg.writeEntry("showBigInterface", true);
- if (uiConfig.checkBox_showNetDev->checkState() == 0)
+ if (uiWidConfig.checkBox_showNetDev->checkState() == 0)
cg.writeEntry("showNetDev", false);
else
cg.writeEntry("showNetDev", true);
- if (uiConfig.checkBox_showExtIp->checkState() == 0)
+ if (uiWidConfig.checkBox_showExtIp->checkState() == 0)
cg.writeEntry("showExtIp", false);
else
cg.writeEntry("showExtIp", true);
- if (uiConfig.checkBox_showIntIp->checkState() == 0)
+ if (uiWidConfig.checkBox_showIntIp->checkState() == 0)
cg.writeEntry("showIntIp", false);
else
cg.writeEntry("showIntIp", true);
- cg.writeEntry("fontFamily", uiConfig.fontComboBox_font->currentFont().family());
- cg.writeEntry("fontSize", uiConfig.spinBox_fontSize->value());
- cg.writeEntry("fontColor", uiConfig.kcolorcombo_fontColor->color().name());
- cg.writeEntry("fontWeight", uiConfig.spinBox_fontWeight->value());
- cg.writeEntry("fontStyle", uiConfig.comboBox_fontStyle->currentText());
- cg.writeEntry("activeIconPath", uiConfig.lineEdit_activeIcon->text());
- cg.writeEntry("inactiveIconPath", uiConfig.lineEdit_inactiveIcon->text());
+ cg.writeEntry("fontFamily", uiAppConfig.fontComboBox_font->currentFont().family());
+ cg.writeEntry("fontSize", uiAppConfig.spinBox_fontSize->value());
+ cg.writeEntry("fontColor", uiAppConfig.kcolorcombo_fontColor->color().name());
+ cg.writeEntry("fontWeight", uiAppConfig.spinBox_fontWeight->value());
+ cg.writeEntry("fontStyle", uiAppConfig.comboBox_fontStyle->currentText());
+ cg.writeEntry("activeIconPath", uiAppConfig.lineEdit_activeIcon->text());
+ cg.writeEntry("inactiveIconPath", uiAppConfig.lineEdit_inactiveIcon->text());
}
@@ -577,34 +581,34 @@ void Netctl::configChanged()
void Netctl::setBigInterface()
{
- if (uiConfig.checkBox_showBigInterface->checkState() == 0) {
- uiConfig.checkBox_showNetDev->setDisabled(true);
- uiConfig.checkBox_showExtIp->setDisabled(true);
- uiConfig.checkBox_showIntIp->setDisabled(true);
+ if (uiWidConfig.checkBox_showBigInterface->checkState() == 0) {
+ uiWidConfig.checkBox_showNetDev->setDisabled(true);
+ uiWidConfig.checkBox_showExtIp->setDisabled(true);
+ uiWidConfig.checkBox_showIntIp->setDisabled(true);
}
- else if (uiConfig.checkBox_showBigInterface->checkState() == 2) {
- uiConfig.checkBox_showNetDev->setEnabled(true);
- uiConfig.checkBox_showExtIp->setEnabled(true);
- uiConfig.checkBox_showIntIp->setEnabled(true);
+ else if (uiWidConfig.checkBox_showBigInterface->checkState() == 2) {
+ uiWidConfig.checkBox_showNetDev->setEnabled(true);
+ uiWidConfig.checkBox_showExtIp->setEnabled(true);
+ uiWidConfig.checkBox_showIntIp->setEnabled(true);
}
}
void Netctl::setSudo()
{
- if (uiConfig.checkBox_sudo->checkState() == 0)
- uiConfig.lineEdit_sudo->setDisabled(true);
- else if (uiConfig.checkBox_sudo->checkState() == 2)
- uiConfig.lineEdit_sudo->setEnabled(true);
+ if (uiWidConfig.checkBox_sudo->checkState() == 0)
+ uiWidConfig.lineEdit_sudo->setDisabled(true);
+ else if (uiWidConfig.checkBox_sudo->checkState() == 2)
+ uiWidConfig.lineEdit_sudo->setEnabled(true);
}
void Netctl::setWifi()
{
- if (uiConfig.checkBox_wifi->checkState() == 0)
- uiConfig.lineEdit_wifi->setDisabled(true);
- else if (uiConfig.checkBox_wifi->checkState() == 2)
- uiConfig.checkBox_wifi->setEnabled(true);
+ if (uiWidConfig.checkBox_wifi->checkState() == 0)
+ uiWidConfig.lineEdit_wifi->setDisabled(true);
+ else if (uiWidConfig.checkBox_wifi->checkState() == 2)
+ uiWidConfig.checkBox_wifi->setEnabled(true);
}
diff --git a/sources/plasmoid/netctl.h b/sources/plasmoid/netctl.h
index a0a6f8b..363538d 100644
--- a/sources/plasmoid/netctl.h
+++ b/sources/plasmoid/netctl.h
@@ -25,7 +25,8 @@
#include
#include
-#include
+#include
+#include
class QGraphicsLinearLayout;
@@ -93,7 +94,8 @@ private:
void connectToEngine();
void disconnectFromEngine();
// configuration interface
- Ui::ConfigWindow uiConfig;
+ Ui::AppearanceWindow uiAppConfig;
+ Ui::ConfigWindow uiWidConfig;
// configuration
int autoUpdateInterval;
QMap bigInterface;
diff --git a/sources/plasmoid/widget.ui b/sources/plasmoid/widget.ui
new file mode 100644
index 0000000..afbc504
--- /dev/null
+++ b/sources/plasmoid/widget.ui
@@ -0,0 +1,299 @@
+
+
+ ConfigWindow
+
+
+
+ 0
+ 0
+ 480
+ 341
+
+
+
+
+ 480
+ 320
+
+
+
+ Configuration Window
+
+
+ -
+
+
+
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+ Show network devices
+
+
+ true
+
+
+
+ -
+
+
-
+
+
+
+ 150
+ 23
+
+
+
+ Show 'Start WiFi menu'
+
+
+ true
+
+
+
+ -
+
+
+ -
+
+
+
+ 100
+ 23
+
+
+
+ Browse
+
+
+
+
+
+ -
+
+
+ Show more detailed interface
+
+
+ true
+
+
+
+ -
+
+
+ Show internal IP
+
+
+ true
+
+
+
+ -
+
+
-
+
+
+
+ 80
+ 23
+
+
+
+ Path to GUI
+
+
+
+ -
+
+
+ -
+
+
+
+ 100
+ 23
+
+
+
+ Browse
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 150
+ 23
+
+
+
+ Auto update interval, msec
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+
+ 100
+ 0
+
+
+
+ Qt::LeftToRight
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ 333
+
+
+ 10000
+
+
+ 500
+
+
+ 1000
+
+
+
+
+
+ -
+
+
+ Show external IP
+
+
+ true
+
+
+
+ -
+
+
-
+
+
+
+ 80
+ 23
+
+
+
+ Path to netctl
+
+
+
+ -
+
+
+ -
+
+
+
+ 100
+ 23
+
+
+
+ Browse
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 150
+ 23
+
+
+
+ Use sudo for netctl
+
+
+ true
+
+
+
+ -
+
+
+ -
+
+
+
+ 100
+ 23
+
+
+
+ Browse
+
+
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+
+
+
+ spinBox_autoUpdate
+ lineEdit_gui
+ pushButton_gui
+ lineEdit_netctl
+ pushButton_netctl
+ checkBox_sudo
+ lineEdit_sudo
+ pushButton_sudo
+ checkBox_wifi
+ lineEdit_wifi
+ pushButton_wifi
+
+
+
+