added about window

This commit is contained in:
arcan1s 2014-07-14 18:31:35 +04:00
parent 2e35cd356e
commit 2f40ae7913
15 changed files with 412 additions and 46 deletions

View File

@ -12,7 +12,6 @@ set (PROJECT_VERSION_PATCH 0)
set (PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH})
string (TIMESTAMP CURRENT_DATE UTC)
string (TIMESTAMP CURRENT_YEAR "%Y")
configure_file (${CMAKE_SOURCE_DIR}/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/version.h)
message (STATUS "Project: ${PROJECT_NAME}")
message (STATUS "Version: ${PROJECT_VERSION}")
@ -41,6 +40,8 @@ else ()
message (STATUS "Unknown compiler")
endif ()
configure_file (${CMAKE_SOURCE_DIR}/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/version.h)
# resources
set (PROJECT_LIBRARY netctlgui)
set (PROJECT_RESOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/resources)

105
sources/gui/src/about.ui Normal file
View File

@ -0,0 +1,105 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>About</class>
<widget class="QWidget" name="About">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>398</width>
<height>298</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="2" column="0">
<widget class="QLabel" name="label_description">
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignJustify|Qt::AlignVCenter</set>
</property>
<property name="textInteractionFlags">
<set>Qt::TextBrowserInteraction</set>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_name">
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="textInteractionFlags">
<set>Qt::TextBrowserInteraction</set>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_version">
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="textInteractionFlags">
<set>Qt::TextBrowserInteraction</set>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="label_license">
<property name="text">
<string/>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="textInteractionFlags">
<set>Qt::TextBrowserInteraction</set>
</property>
</widget>
</item>
<item row="5" column="0">
<spacer name="spacer_about">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_links">
<property name="text">
<string/>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
<property name="textInteractionFlags">
<set>Qt::TextBrowserInteraction</set>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View File

@ -0,0 +1,92 @@
/***************************************************************************
* This file is part of netctl-gui *
* *
* netctl-gui is free software: you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
* published by the Free Software Foundation, either version 3 of the *
* License, or (at your option) any later version. *
* *
* netctl-gui is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with netctl-gui. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#include "aboutwindow.h"
#include "ui_aboutwindow.h"
#include <QDebug>
#include <QDialogButtonBox>
#include <QPushButton>
#include "version.h"
AboutWindow::AboutWindow(QWidget *parent, const bool debugCmd)
: QMainWindow(parent),
ui(new Ui::AboutWindow),
debug(debugCmd)
{
ui->setupUi(this);
createUi();
}
AboutWindow::~AboutWindow()
{
if (debug) qDebug() << "[AboutWindow]" << "[~AboutWindow]";
delete uiAbout;
delete ui;
}
void AboutWindow::createText()
{
if (debug) qDebug() << "[AboutWindow]" << "[createText]";
uiAbout->label_name->setText(QString(NAME));
uiAbout->label_version->setText(QApplication::translate("AboutWindow", "Version %1\n(build date %2)")
.arg(QString(VERSION)).arg(QString(BUILD_DATE)));
uiAbout->label_description->setText(QApplication::translate("AboutWindow", "Qt-based graphical interface for netctl."));
uiAbout->label_links->setText(QApplication::translate("AboutWindow", "Links:") + QString("<br>") +
QString("<a href=\"%1\">%2</a><br>").arg(QString(HOMEPAGE)).arg(QApplication::translate("AboutWindow", "Homepage")) +
QString("<a href=\"%1\">%2</a><br>").arg(QString(REPOSITORY)).arg(QApplication::translate("AboutWindow", "Repository")) +
QString("<a href=\"%1\">%2</a><br>").arg(QString(BUGTRACKER)).arg(QApplication::translate("AboutWindow", "Bugtracker")) +
QString("<a href=\"%1\">%2</a><br>").arg(QString(TRANSLATION)).arg(QApplication::translate("AboutWindow", "Translation issue")) +\
QString("<a href=\"%1\">%2</a>").arg(QString(AUR_PACKAGES)).arg(QApplication::translate("AboutWindow", "AUR packages")));
uiAbout->label_license->setText(QString("<small>&copy; %1 %2<br>").arg(QString(DATE)).arg(QString(AUTHOR)) +
QApplication::translate("AboutWindow", "This software is licensed under %1").arg(QString(LICENSE)) +
QString("</small>"));
}
void AboutWindow::createUi()
{
if (debug) qDebug() << "[AboutWindow]" << "[createUi]";
QWidget *aboutWidget = new QWidget;
uiAbout = new Ui::About;
uiAbout->setupUi(aboutWidget);
ui->verticalLayout->addWidget(aboutWidget);
createText();
QDialogButtonBox *buttonBox = new QDialogButtonBox;
buttonBox->addButton(QDialogButtonBox::Close);
ui->verticalLayout->addWidget(buttonBox);
connect(buttonBox->button(QDialogButtonBox::Close), SIGNAL(clicked(bool)), this, SLOT(close()));
}
// ESC press event
void AboutWindow::keyPressEvent(QKeyEvent *pressedKey)
{
if (debug) qDebug() << "[AboutWindow]" << "[keyPressEvent]";
if (pressedKey->key() == Qt::Key_Escape)
close();
}

View File

@ -0,0 +1,51 @@
/***************************************************************************
* This file is part of netctl-gui *
* *
* netctl-gui is free software: you can redistribute it and/or *
* modify it under the terms of the GNU General Public License as *
* published by the Free Software Foundation, either version 3 of the *
* License, or (at your option) any later version. *
* *
* netctl-gui is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with netctl-gui. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#ifndef ABOUTWINDOW_H
#define ABOUTWINDOW_H
#include <QKeyEvent>
#include <QMainWindow>
#include "ui_about.h"
namespace Ui {
class AboutWindow;
}
class AboutWindow : public QMainWindow
{
Q_OBJECT
public:
explicit AboutWindow(QWidget *parent = 0,
const bool debugCmd = false);
~AboutWindow();
private:
Ui::AboutWindow *ui;
Ui::About *uiAbout;
bool debug;
void createText();
void createUi();
// ESC pressed event
void keyPressEvent(QKeyEvent *pressedKey);
};
#endif /* ABOUTWINDOW_H */

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>AboutWindow</class>
<widget class="QMainWindow" name="AboutWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>380</width>
<height>307</height>
</rect>
</property>
<property name="windowTitle">
<string>About</string>
</property>
<widget class="QWidget" name="centralwidget">
<layout class="QVBoxLayout" name="verticalLayout"/>
</widget>
</widget>
<resources/>
<connections/>
</ui>

View File

@ -55,14 +55,20 @@ int main(int argc, char *argv[])
bool debug = false;
bool defaultSettings = false;
bool error = false;
bool showAbout = false;
bool showHelp = false;
bool showInfo = false;
bool showNetctlAuto = false;
bool showSettings = false;
bool showVersion = false;
int tabNumber = 1;
for (int i=1; i<argc; i++) {
// about
if (QString(argv[i]) == QString("--about")) {
showAbout = true;
}
// debug
if ((QString(argv[i]) == QString("-d")) || (QString(argv[i]) == QString("--debug"))) {
else if ((QString(argv[i]) == QString("-d")) || (QString(argv[i]) == QString("--debug"))) {
debug = true;
}
// default settings
@ -91,6 +97,10 @@ int main(int argc, char *argv[])
else if ((QString(argv[i]) == QString("-v")) || (QString(argv[i]) == QString("--version"))) {
showVersion = true;
}
// info message
else if ((QString(argv[i]) == QString("-i")) || (QString(argv[i]) == QString("--info"))) {
showInfo = true;
}
// help message
else if ((QString(argv[i]) == QString("-h")) || (QString(argv[i]) == QString("--help"))) {
showHelp = true;
@ -102,37 +112,69 @@ int main(int argc, char *argv[])
// messages
QString errorMessage = QApplication::translate("MainWindow", "Unknown flag\n");
QString helpMessage = QString("");
helpMessage += QApplication::translate("MainWindow", "Usage:\n");
helpMessage += QApplication::translate("MainWindow", "netctl-gui [ -d | --debug ] [ --default ] [ --netctl-auto ] [ --settings ]\n");
helpMessage += QApplication::translate("MainWindow", " [ -t NUM | --tab NUM ] [ -v | --version ] [ -h | --help]\n\n");
helpMessage += QString("netctl-gui [ --about ] [ -d | --debug ] [ --default ] [ --netctl-auto ]\n");
helpMessage += QString(" [ --settings ] [ -t NUM | --tab NUM ] [ -v | --version ]\n");
helpMessage += QString(" [ -i | --info ] [ -h | --help]\n\n");
helpMessage += QApplication::translate("MainWindow", "Parametrs:\n");
helpMessage += QApplication::translate("MainWindow", "%1 -d --debug - print debug information\n")
.arg(isParametrEnable(debug));
helpMessage += QApplication::translate("MainWindow", "%1 --default - start with default settings\n")
.arg(isParametrEnable(defaultSettings));
helpMessage += QApplication::translate("MainWindow", "%1 --netctl-auto - show netctl-auto window\n")
.arg(isParametrEnable(showNetctlAuto));
helpMessage += QApplication::translate("MainWindow", "%1 --settings - show settings window\n")
.arg(isParametrEnable(showSettings));
helpMessage += QApplication::translate("MainWindow", " -t %1 --tab %1 - open a tab with number %1\n")
.arg(QString::number(tabNumber));
helpMessage += QApplication::translate("MainWindow", " -v --version - show version and exit\n");
helpMessage += QApplication::translate("MainWindow", " -h --help - show this help and exit\n");
helpMessage += QString("%1 --about - %2\n")
.arg(isParametrEnable(showAbout))
.arg(QApplication::translate("MainWindow", "show about window"));
helpMessage += QString("%1 -d --debug - %2\n")
.arg(isParametrEnable(debug))
.arg(QApplication::translate("MainWindow", "print debug information"));
helpMessage += QString("%1 --default - %2\n")
.arg(isParametrEnable(defaultSettings))
.arg(QApplication::translate("MainWindow", "start with default settings"));
helpMessage += QString("%1 --netctl-auto - %2\n")
.arg(isParametrEnable(showNetctlAuto))
.arg(QApplication::translate("MainWindow", "show netctl-auto window"));
helpMessage += QString("%1 --settings - %2\n")
.arg(isParametrEnable(showSettings))
.arg(QApplication::translate("MainWindow", "show settings window"));
helpMessage += QString(" -t %1 --tab %1 - %2\n")
.arg(QString::number(tabNumber))
.arg(QApplication::translate("MainWindow", "open a tab with number %1").arg(QString::number(tabNumber)));
helpMessage += QString(" -v --version - %1\n")
.arg(QApplication::translate("MainWindow", "show version and exit"));
helpMessage += QString(" -i --info - %1\n")
.arg(QApplication::translate("MainWindow", "show build information and exit"));
helpMessage += QString(" -h --help - %1\n")
.arg(QApplication::translate("MainWindow", "show this help and exit"));
QString infoMessage = QString("");
infoMessage += QApplication::translate("MainWindow", "Build date: %1").
arg(QString(BUILD_DATE));
infoMessage += QString("\n%1\n").arg(QApplication::translate("MainWindow", "cmake flags:"));
infoMessage += QString("\t-DCMAKE_BUILD_TYPE=%1 \\\n").arg(QString(CMAKE_BUILD_TYPE));
infoMessage += QString("\t-DCMAKE_INSTALL_PREFIX=%1 \\\n").arg(QString(CMAKE_INSTALL_PREFIX));
infoMessage += QString("\t-DBUILD_LIBRARY=%1 \\\n").arg(QString(PROJECT_BUILD_LIBRARY));
infoMessage += QString("\t-DBUILD_GUI=%1 \\\n").arg(QString(PROJECT_BUILD_GUI));
infoMessage += QString("\t-DUSE_QT5=%1 \\\n").arg(QString(PROJECT_USE_QT5));
infoMessage += QString("\t-DBUILD_DATAENGINE=%1 \\\n").arg(QString(PROJECT_BUILD_DATAENGINE));
infoMessage += QString("\t-DBUILD_PLASMOID=%1\n").arg(QString(PROJECT_BUILD_PLASMOID));
QString versionMessage = QString("");
versionMessage += QApplication::translate("MainWindow", " Netctl GUI\n");
versionMessage += QApplication::translate("MainWindow", "Version : %1 License : GPLv3\n")
.arg(QString(VERSION));
versionMessage += QApplication::translate("MainWindow", " Evgeniy Alekseev aka arcanis\n");
versionMessage += QApplication::translate("MainWindow", " E-mail : esalexeev@gmail.com\n");
versionMessage += QString("%1\n").arg(QString(NAME));
versionMessage += QApplication::translate("MainWindow", "Version : %1\n").arg(QString(VERSION));
versionMessage += QApplication::translate("MainWindow", "Author : %1\n").arg(QString(AUTHOR));
versionMessage += QApplication::translate("MainWindow", "License : %1\n").arg(QString(LICENSE));
// running
if (error) {
cout << errorMessage.toUtf8().data();
cout << errorMessage.toUtf8().data() << endl;
cout << helpMessage.toUtf8().data();
return 127;
}
if (showInfo) {
cout << versionMessage.toUtf8().data() << endl;
cout << infoMessage.toUtf8().data();
return 0;
}
if (showHelp) {
cout << versionMessage.toUtf8().data();
cout << versionMessage.toUtf8().data() << endl;
cout << helpMessage.toUtf8().data();
return 0;
}
@ -140,7 +182,7 @@ int main(int argc, char *argv[])
cout << versionMessage.toUtf8().data();
return 0;
}
MainWindow w(0, debug, defaultSettings, showNetctlAuto, showSettings, tabNumber);
MainWindow w(0, debug, defaultSettings, showAbout, showNetctlAuto, showSettings, tabNumber);
w.show();
return a.exec();
}

View File

@ -27,6 +27,7 @@
#include <netctlgui/netctlprofile.h>
#include <netctlgui/wpasupinteract.h>
#include "aboutwindow.h"
#include "bridgewidget.h"
#include "errorwindow.h"
#include "ethernetwidget.h"
@ -47,6 +48,7 @@
MainWindow::MainWindow(QWidget *parent,
const bool debugCmd,
const bool defaultSettings,
const bool showAbout,
const bool showNetctlAuto,
const bool showSettings,
const int tabNum)
@ -71,6 +73,7 @@ MainWindow::MainWindow(QWidget *parent,
configuration = settingsWin->getSettings();
// gui
aboutWin = new AboutWindow(this, debug);
netctlAutoWin = new NetctlAutoWindow(this, debug, configuration);
generalWid = new GeneralWidget(this, configuration);
ui->scrollAreaWidgetContents->layout()->addWidget(generalWid);
@ -104,6 +107,8 @@ MainWindow::MainWindow(QWidget *parent,
updateTabs(ui->tabWidget->currentIndex());
ui->statusBar->showMessage(QApplication::translate("MainWindow", "Ready"));
if (showAbout)
aboutWin->show();
if (showNetctlAuto)
netctlAutoWin->showWindow();
if (showSettings)
@ -131,6 +136,7 @@ MainWindow::~MainWindow()
delete vlanWid;
delete wirelessWid;
delete aboutWin;
delete netctlAutoWin;
delete settingsWin;
delete ui;
@ -191,6 +197,7 @@ void MainWindow::createActions()
connect(ui->tabWidget, SIGNAL(currentChanged(int)), this, SLOT(updateTabs(int)));
connect(ui->tabWidget, SIGNAL(currentChanged(int)), this, SLOT(updateMenu(int)));
connect(ui->actionAbout, SIGNAL(triggered(bool)), aboutWin, SLOT(show()));
connect(ui->actionNetctlAuto, SIGNAL(triggered(bool)), netctlAutoWin, SLOT(showWindow()));
ui->actionNetctlAuto->setVisible(checkExternalApps(QString("all")));
connect(ui->actionSettings, SIGNAL(triggered(bool)), settingsWin, SLOT(showWindow()));

View File

@ -23,6 +23,7 @@
#include <QTableWidgetItem>
class AboutWindow;
class BridgeWidget;
class ErrorWindow;
class EthernetWidget;
@ -54,6 +55,7 @@ public:
explicit MainWindow(QWidget *parent = 0,
const bool debugCmd = false,
const bool defaultSettings = false,
const bool showAbout = false,
const bool showNetctlAuto = false,
const bool showSettings = false,
const int tabNum = 1);
@ -99,7 +101,11 @@ private slots:
private:
// ui
Ui::MainWindow *ui;
AboutWindow *aboutWin;
ErrorWindow *errorWin;
NetctlAutoWindow *netctlAutoWin;
PasswdWidget *passwdWid;
SettingsWindow *settingsWin;
BridgeWidget *bridgeWid;
EthernetWidget *ethernetWid;
GeneralWidget *generalWid;
@ -115,9 +121,6 @@ private:
Netctl *netctlCommand;
NetctlProfile *netctlProfile;
WpaSup *wpaCommand;
ErrorWindow *errorWin;
PasswdWidget *passwdWid;
SettingsWindow *settingsWin;
bool checkExternalApps(const QString apps);
bool checkState(const QString state, const QString item);
void createActions();

View File

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>481</width>
<height>509</height>
<width>479</width>
<height>507</height>
</rect>
</property>
<property name="windowTitle">
@ -206,8 +206,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>449</width>
<height>353</height>
<width>96</width>
<height>26</height>
</rect>
</property>
<property name="sizePolicy">
@ -367,7 +367,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>481</width>
<width>479</width>
<height>22</height>
</rect>
</property>
@ -398,8 +398,15 @@
<addaction name="actionMainRemove"/>
<addaction name="actionProfileRemove"/>
</widget>
<widget class="QMenu" name="menuHelp">
<property name="title">
<string>Help</string>
</property>
<addaction name="actionAbout"/>
</widget>
<addaction name="menuMenu"/>
<addaction name="menuActions"/>
<addaction name="menuHelp"/>
</widget>
<widget class="QStatusBar" name="statusBar"/>
<action name="actionSettings">
@ -553,6 +560,14 @@
<string>netctl-auto</string>
</property>
</action>
<action name="actionAbout">
<property name="icon">
<iconset theme="help-about"/>
</property>
<property name="text">
<string>About</string>
</property>
</action>
</widget>
<tabstops>
<tabstop>tabWidget</tabstop>

View File

@ -24,12 +24,10 @@
#include <QTextStream>
#include "language.h"
#include "mainwindow.h"
SettingsWindow::SettingsWindow(MainWindow *wid, const bool debugCmd, const QString configFile)
: QMainWindow(wid),
parent(wid),
SettingsWindow::SettingsWindow(QWidget *parent, const bool debugCmd, const QString configFile)
: QMainWindow(parent),
debug(debugCmd),
file(configFile),
ui(new Ui::SettingsWindow)

View File

@ -34,7 +34,7 @@ class SettingsWindow : public QMainWindow
Q_OBJECT
public:
explicit SettingsWindow(MainWindow *wid = 0,
explicit SettingsWindow(QWidget *parent = 0,
const bool debugCmd = false,
const QString configFile = QString(""));
~SettingsWindow();
@ -62,7 +62,6 @@ private slots:
void selectWpaSupPath();
private:
MainWindow *parent;
bool debug;
QString file;
Ui::SettingsWindow *ui;

1
sources/plasmoid/about.ui Symbolic link
View File

@ -0,0 +1 @@
../gui/src/about.ui

View File

@ -595,10 +595,8 @@ void Netctl::createConfigurationInterface(KConfigDialog *parent)
uiAppConfig.setupUi(appWidget);
QWidget *deWidget = new QWidget;
uiDEConfig.setupUi(deWidget);
QString text = QString(NAME) + " - " + QString(VERSION) + "\n" + "(c) " +
QString(DATE) + " " + QString(AUTHOR);
uiWidConfig.label_info->setText(text);
QWidget *aboutWidget = new QWidget;
uiAboutConfig.setupUi(aboutWidget);
uiWidConfig.spinBox_autoUpdate->setValue(autoUpdateInterval);
uiWidConfig.lineEdit_gui->setText(paths[QString("gui")]);
@ -664,9 +662,23 @@ void Netctl::createConfigurationInterface(KConfigDialog *parent)
uiDEConfig.lineEdit_extIp->setText(deSettings[QString("EXTIPCMD")]);
setDataEngineExternalIp();
uiAboutConfig.label_name->setText(QString(NAME));
uiAboutConfig.label_version->setText(i18n("Version %1\n(build date %2)", QString(VERSION), QString(BUILD_DATE)));
uiAboutConfig.label_description->setText(i18n("KDE widget which interacts with netctl."));
uiAboutConfig.label_links->setText(i18n("Links:") + QString("<br>") +
QString("<a href=\"%1\">%2</a><br>").arg(QString(HOMEPAGE)).arg(i18n("Homepage")) +
QString("<a href=\"%1\">%2</a><br>").arg(QString(REPOSITORY)).arg(i18n("Repository")) +
QString("<a href=\"%1\">%2</a><br>").arg(QString(BUGTRACKER)).arg(i18n("Bugtracker")) +
QString("<a href=\"%1\">%2</a><br>").arg(QString(TRANSLATION)).arg(i18n("Translation issue")) +
QString("<a href=\"%1\">%2</a>").arg(QString(AUR_PACKAGES)).arg(i18n("AUR packages")));
uiAboutConfig.label_license->setText(QString("<small>&copy; %1 %2<br>").arg(QString(DATE)).arg(QString(AUTHOR)) +
i18n("This software is licensed under %1", QString(LICENSE)) +
QString("</small>"));
parent->addPage(configWidget, i18n("Netctl plasmoid"), Applet::icon());
parent->addPage(appWidget, i18n("Appearance"), QString("preferences-desktop-theme"));
parent->addPage(deWidget, i18n("DataEngine"), Applet::icon());
parent->addPage(aboutWidget, i18n("About"), QString("help-about"));
connect(uiWidConfig.checkBox_showBigInterface, SIGNAL(stateChanged(int)), this,
SLOT(setBigInterface()));
@ -678,7 +690,7 @@ void Netctl::createConfigurationInterface(KConfigDialog *parent)
connect(uiWidConfig.pushButton_netctl, SIGNAL(clicked()), this, SLOT(selectNetctlExe()));
connect(uiWidConfig.pushButton_netctlAuto, SIGNAL(clicked()), this, SLOT(selectNetctlAutoExe()));
connect(uiWidConfig.pushButton_sudo, SIGNAL(clicked()), this, SLOT(selectSudoExe()));
connect(uiWidConfig.pushButton_wifi, SIGNAL(clicked()), this, SLOT(selecWifiExe()));
connect(uiWidConfig.pushButton_wifi, SIGNAL(clicked()), this, SLOT(selectWifiExe()));
connect(uiAppConfig.pushButton_activeIcon, SIGNAL(clicked()), this, SLOT(selectActiveIcon()));
connect(uiAppConfig.pushButton_inactiveIcon, SIGNAL(clicked()), this, SLOT(selectInactiveIcon()));
connect(uiDEConfig.pushButton_extIp, SIGNAL(clicked()), this, SLOT(selectDataEngineExternalIpExe()));

View File

@ -25,6 +25,7 @@
#include <Plasma/Label>
#include <QProcess>
#include <ui_about.h>
#include <ui_appearance.h>
#include <ui_dataengine.h>
#include <ui_widget.h>
@ -111,6 +112,7 @@ private:
Ui::AppearanceWindow uiAppConfig;
Ui::DataEngineWindow uiDEConfig;
Ui::ConfigWindow uiWidConfig;
Ui::About uiAboutConfig;
// configuration
int autoUpdateInterval;
QMap<QString, bool> bigInterface;

View File

@ -1,10 +1,26 @@
#ifndef VERSION_H
#define VERSION_H
#define AUTHOR "Evgeniy Alekseev"
#define BUILD_DATE "@CURRENT_DATE@"
#define DATE "2014-@CURRENT_YEAR@"
#define NAME "Netctl Graphical Interface"
#define VERSION "@PROJECT_VERSION@"
#define AUTHOR "Evgeniy Alekseev"
#define LICENSE "GPLv3"
#define HOMEPAGE "http://arcanis.name/projects/netctl-gui/"
#define REPOSITORY "https://github.com/arcan1s/netctl-gui"
#define BUGTRACKER "https://github.com/arcan1s/netctl-gui/issues"
#define TRANSLATION "https://github.com/arcan1s/netctl-gui/issues/3"
#define AUR_PACKAGES "https://aur.archlinux.org/pkgbase/netctl-gui/"
#define BUILD_DATE "@CURRENT_DATE@"
#define DATE "2014-@CURRENT_YEAR@"
#define CMAKE_BUILD_TYPE "@CMAKE_BUILD_TYPE@"
#define CMAKE_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@"
#define PROJECT_BUILD_DATAENGINE "@BUILD_DATAENGINE@"
#define PROJECT_BUILD_GUI "@BUILD_GUI@"
#define PROJECT_BUILD_LIBRARY "@BUILD_LIBRARY@"
#define PROJECT_BUILD_PLASMOID "@BUILD_PLASMOID@"
#define PROJECT_USE_QT5 "@USE_QT5@"
#endif /* VERSION_H */