mirror of
https://github.com/arcan1s/netctl-gui.git
synced 2025-04-24 15:37:23 +00:00
rewrite tables
This commit is contained in:
parent
0bade9c42f
commit
2aa6b43e61
@ -9,8 +9,11 @@ Ver.1.3.0
|
|||||||
* gui:
|
* gui:
|
||||||
+ add 3rd party license information
|
+ add 3rd party license information
|
||||||
* update to library changes
|
* update to library changes
|
||||||
|
* rewrite tables to use toolTip
|
||||||
* library:
|
* library:
|
||||||
+ add custom structures netctlWifiInfo and netctlProfileInfo
|
+ add custom structures netctlWifiInfo and netctlProfileInfo
|
||||||
|
+ add methods getActiveProfile(), autoGetActiveProfile()
|
||||||
|
+ add slot switchToProfile()
|
||||||
* rewrite to use [tasks](https://github.com/mhogomchungu/tasks) (see #7)
|
* rewrite to use [tasks](https://github.com/mhogomchungu/tasks) (see #7)
|
||||||
* rename getInterfaceList() to getWirelessInterfaceList()
|
* rename getInterfaceList() to getWirelessInterfaceList()
|
||||||
- remove functions getProfileDescriptions() and getProfileStatuses()
|
- remove functions getProfileDescriptions() and getProfileStatuses()
|
||||||
|
@ -119,7 +119,7 @@ MainWindow::MainWindow(QWidget *parent,
|
|||||||
ui->scrollAreaWidgetContents->layout()->addWidget(wirelessWid);
|
ui->scrollAreaWidgetContents->layout()->addWidget(wirelessWid);
|
||||||
|
|
||||||
createActions();
|
createActions();
|
||||||
setIconsToButtons();
|
setIconsToTabs();
|
||||||
updateTabs(ui->tabWidget->currentIndex());
|
updateTabs(ui->tabWidget->currentIndex());
|
||||||
|
|
||||||
if (showAbout)
|
if (showAbout)
|
||||||
@ -211,16 +211,18 @@ bool MainWindow::checkExternalApps(const QString apps = QString("all"))
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool MainWindow::checkState(const QString state, const QString item)
|
QString MainWindow::checkStatus(const bool statusBool, const bool nullFalse)
|
||||||
{
|
{
|
||||||
if (debug) qDebug() << "[MainWindow]" << "[checkState]";
|
if (debug) qDebug() << "[MainWindow]" << "[checkStatus]";
|
||||||
if (debug) qDebug() << "[MainWindow]" << "[checkState]" << ":" << "Text" << item;
|
if (debug) qDebug() << "[MainWindow]" << "[checkStatus]" << ":" << "Status" << statusBool;
|
||||||
if (debug) qDebug() << "[MainWindow]" << "[checkState]" << ":" << "State" << state;
|
if (debug) qDebug() << "[MainWindow]" << "[checkStatus]" << ":" << "Return null false" << nullFalse;
|
||||||
|
|
||||||
if (item.contains(state))
|
if (statusBool)
|
||||||
return true;
|
return QApplication::translate("MainWindow", "yes");
|
||||||
|
if (nullFalse)
|
||||||
|
return QString("");
|
||||||
else
|
else
|
||||||
return false;
|
return QApplication::translate("MainWindow", "no");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -285,22 +287,14 @@ void MainWindow::keyPressEvent(QKeyEvent *pressedKey)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::setIconsToButtons()
|
void MainWindow::setIconsToTabs()
|
||||||
{
|
{
|
||||||
if (debug) qDebug() << "[MainWindow]" << "[setIconsToButtons]";
|
if (debug) qDebug() << "[MainWindow]" << "[setIconsToTabs]";
|
||||||
|
|
||||||
// tab widget
|
// tab widget
|
||||||
ui->tabWidget->setTabIcon(0, QIcon(":icon"));
|
ui->tabWidget->setTabIcon(0, QIcon(":icon"));
|
||||||
ui->tabWidget->setTabIcon(1, QIcon::fromTheme("document-new"));
|
ui->tabWidget->setTabIcon(1, QIcon::fromTheme("document-new"));
|
||||||
ui->tabWidget->setTabIcon(2, QIcon(":wifi"));
|
ui->tabWidget->setTabIcon(2, QIcon(":wifi"));
|
||||||
// main tab
|
|
||||||
ui->pushButton_mainRefresh->setIcon(QIcon::fromTheme("stock-refresh"));
|
|
||||||
ui->pushButton_mainRestart->setIcon(QIcon::fromTheme("stock-refresh"));
|
|
||||||
// profile tab
|
|
||||||
ui->pushButton_profileClear->setIcon(QIcon::fromTheme("edit-clear"));
|
|
||||||
ui->pushButton_profileSave->setIcon(QIcon::fromTheme("document-save"));
|
|
||||||
// wifi tab
|
|
||||||
ui->pushButton_wifiRefresh->setIcon(QIcon::fromTheme("stock-refresh"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -416,45 +410,44 @@ void MainWindow::updateMainTab()
|
|||||||
headerList.append(QApplication::translate("MainWindow", "Active"));
|
headerList.append(QApplication::translate("MainWindow", "Active"));
|
||||||
headerList.append(QApplication::translate("MainWindow", "Enabled"));
|
headerList.append(QApplication::translate("MainWindow", "Enabled"));
|
||||||
ui->tableWidget_main->setHorizontalHeaderLabels(headerList);
|
ui->tableWidget_main->setHorizontalHeaderLabels(headerList);
|
||||||
|
ui->tableWidget_main->setColumnHidden(2, true);
|
||||||
|
ui->tableWidget_main->setColumnHidden(3, true);
|
||||||
// create items
|
// create items
|
||||||
for (int i=0; i<profiles.count(); i++) {
|
for (int i=0; i<profiles.count(); i++) {
|
||||||
|
// font
|
||||||
|
QFont font;
|
||||||
|
font.setBold(profiles[i].active);
|
||||||
|
font.setItalic(profiles[i].enabled);
|
||||||
|
// tooltip
|
||||||
|
QString toolTip = QString("");
|
||||||
|
toolTip += QString("%1: %2\n").arg(QApplication::translate("MainWindow", "Profile")).arg(profiles[i].name);
|
||||||
|
toolTip += QString("%1: %2\n").arg(QApplication::translate("MainWindow", "Active")).arg(checkStatus(profiles[i].active));
|
||||||
|
toolTip += QString("%1: %2").arg(QApplication::translate("MainWindow", "Enabled")).arg(checkStatus(profiles[i].enabled));
|
||||||
// name
|
// name
|
||||||
ui->tableWidget_main->setItem(i, 0, new QTableWidgetItem(profiles[i].name));
|
ui->tableWidget_main->setItem(i, 0, new QTableWidgetItem(profiles[i].name));
|
||||||
ui->tableWidget_main->item(i, 0)->setTextAlignment(Qt::AlignLeft | Qt::AlignVCenter);
|
ui->tableWidget_main->item(i, 0)->setTextAlignment(Qt::AlignLeft | Qt::AlignVCenter);
|
||||||
|
ui->tableWidget_main->item(i, 0)->setToolTip(toolTip);
|
||||||
|
ui->tableWidget_main->item(i, 0)->setFont(font);
|
||||||
// description
|
// description
|
||||||
ui->tableWidget_main->setItem(i, 1, new QTableWidgetItem(profiles[i].description));
|
ui->tableWidget_main->setItem(i, 1, new QTableWidgetItem(profiles[i].description));
|
||||||
ui->tableWidget_main->item(i, 1)->setTextAlignment(Qt::AlignLeft | Qt::AlignVCenter);
|
ui->tableWidget_main->item(i, 1)->setTextAlignment(Qt::AlignJustify | Qt::AlignVCenter);
|
||||||
// status
|
ui->tableWidget_main->item(i, 1)->setToolTip(toolTip);
|
||||||
if (profiles[i].active) {
|
// active
|
||||||
// active
|
ui->tableWidget_main->setItem(i, 2, new QTableWidgetItem(checkStatus(profiles[i].active, true)));
|
||||||
QFont font;
|
ui->tableWidget_main->item(i, 2)->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
|
||||||
font.setBold(true);
|
// enabled
|
||||||
ui->tableWidget_main->item(i, 0)->setFont(font);
|
ui->tableWidget_main->setItem(i, 3, new QTableWidgetItem(checkStatus(profiles[i].enabled, true)));
|
||||||
ui->tableWidget_main->setItem(i, 2, new QTableWidgetItem(QApplication::translate("MainWindow", "yes")));
|
ui->tableWidget_main->item(i, 3)->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
|
||||||
ui->tableWidget_main->item(i, 2)->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
ui->tableWidget_main->setItem(i, 2, new QTableWidgetItem(QString("")));
|
|
||||||
if (profiles[i].enabled) {
|
|
||||||
// enabled
|
|
||||||
ui->tableWidget_main->setItem(i, 3, new QTableWidgetItem(QApplication::translate("MainWindow", "yes")));
|
|
||||||
ui->tableWidget_main->item(i, 3)->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
QFont font;
|
|
||||||
font.setItalic(true);
|
|
||||||
ui->tableWidget_main->item(i, 0)->setFont(font);
|
|
||||||
ui->tableWidget_main->setItem(i, 3, new QTableWidgetItem(QString("")));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ui->tableWidget_main->setSortingEnabled(true);
|
ui->tableWidget_main->setSortingEnabled(true);
|
||||||
ui->tableWidget_main->resizeRowsToContents();
|
|
||||||
#if QT_VERSION >= 0x050000
|
#if QT_VERSION >= 0x050000
|
||||||
ui->tableWidget_main->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch);
|
ui->tableWidget_main->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch);
|
||||||
#else
|
#else
|
||||||
ui->tableWidget_main->horizontalHeader()->setResizeMode(QHeaderView::Stretch);
|
ui->tableWidget_main->horizontalHeader()->setResizeMode(QHeaderView::Stretch);
|
||||||
#endif
|
#endif
|
||||||
|
ui->tableWidget_main->resizeRowsToContents();
|
||||||
|
ui->tableWidget_main->resizeColumnToContents(0);
|
||||||
ui->tabWidget->setEnabled(true);
|
ui->tabWidget->setEnabled(true);
|
||||||
ui->statusBar->showMessage(QApplication::translate("MainWindow", "Updated"));
|
ui->statusBar->showMessage(QApplication::translate("MainWindow", "Updated"));
|
||||||
|
|
||||||
@ -469,19 +462,18 @@ void MainWindow::updateMenuMain()
|
|||||||
ui->actionMainRefresh->setVisible(true);
|
ui->actionMainRefresh->setVisible(true);
|
||||||
if (ui->tableWidget_main->currentItem() == 0)
|
if (ui->tableWidget_main->currentItem() == 0)
|
||||||
return;
|
return;
|
||||||
QString item = ui->tableWidget_main->item(ui->tableWidget_main->currentItem()->row(), 2)->text();
|
if (!ui->tableWidget_main->item(ui->tableWidget_main->currentItem()->row(), 2)->text().isEmpty()) {
|
||||||
if (!checkState(QString("inactive"), item)) {
|
|
||||||
ui->actionMainRestart->setVisible(true);
|
ui->actionMainRestart->setVisible(true);
|
||||||
ui->actionMainStart->setText(QApplication::translate("MainWindow", "Stop profile"));
|
ui->actionMainStart->setText(QApplication::translate("MainWindow", "Stop profile"));
|
||||||
ui->actionMainStart->setIcon(QIcon::fromTheme("dialog-close"));
|
ui->actionMainStart->setIcon(QIcon::fromTheme("process-stop"));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
ui->actionMainRestart->setVisible(false);
|
ui->actionMainRestart->setVisible(false);
|
||||||
ui->actionMainStart->setText(QApplication::translate("MainWindow", "Start profile"));
|
ui->actionMainStart->setText(QApplication::translate("MainWindow", "Start profile"));
|
||||||
ui->actionMainStart->setIcon(QIcon::fromTheme("dialog-apply"));
|
ui->actionMainStart->setIcon(QIcon::fromTheme("system-run"));
|
||||||
}
|
}
|
||||||
ui->actionMainStart->setVisible(true);
|
ui->actionMainStart->setVisible(true);
|
||||||
if (checkState(QString("enabled"), item)) {
|
if (!ui->tableWidget_main->item(ui->tableWidget_main->currentItem()->row(), 3)->text().isEmpty()) {
|
||||||
ui->actionMainEnable->setText(QApplication::translate("MainWindow", "Disable profile"));
|
ui->actionMainEnable->setText(QApplication::translate("MainWindow", "Disable profile"));
|
||||||
ui->actionMainEnable->setIcon(QIcon::fromTheme("edit-remove"));
|
ui->actionMainEnable->setIcon(QIcon::fromTheme("edit-remove"));
|
||||||
}
|
}
|
||||||
@ -545,33 +537,48 @@ void MainWindow::updateWifiTab()
|
|||||||
// create header
|
// create header
|
||||||
QStringList headerList;
|
QStringList headerList;
|
||||||
headerList.append(QApplication::translate("MainWindow", "Name"));
|
headerList.append(QApplication::translate("MainWindow", "Name"));
|
||||||
headerList.append(QApplication::translate("MainWindow", "Status"));
|
|
||||||
headerList.append(QApplication::translate("MainWindow", "Signal"));
|
headerList.append(QApplication::translate("MainWindow", "Signal"));
|
||||||
headerList.append(QApplication::translate("MainWindow", "Security"));
|
headerList.append(QApplication::translate("MainWindow", "Security"));
|
||||||
|
headerList.append(QApplication::translate("MainWindow", "Active"));
|
||||||
|
headerList.append(QApplication::translate("MainWindow", "Exists"));
|
||||||
ui->tableWidget_wifi->setHorizontalHeaderLabels(headerList);
|
ui->tableWidget_wifi->setHorizontalHeaderLabels(headerList);
|
||||||
|
ui->tableWidget_wifi->setColumnHidden(3, true);
|
||||||
|
ui->tableWidget_wifi->setColumnHidden(4, true);
|
||||||
// create items
|
// create items
|
||||||
for (int i=0; i<scanResults.count(); i++) {
|
for (int i=0; i<scanResults.count(); i++) {
|
||||||
|
// font
|
||||||
|
QFont font;
|
||||||
|
font.setBold(scanResults[i].active);
|
||||||
|
font.setItalic(scanResults[i].exists);
|
||||||
|
// tooltip
|
||||||
|
QString toolTip = QString("");
|
||||||
|
toolTip += QString("%1: %2\n").arg(QApplication::translate("MainWindow", "ESSID")).arg(scanResults[i].name);
|
||||||
|
toolTip += QString("%1: %2\n").arg(QApplication::translate("MainWindow", "Active")).arg(checkStatus(scanResults[i].active));
|
||||||
|
toolTip += QString("%1: %2").arg(QApplication::translate("MainWindow", "Exists")).arg(checkStatus(scanResults[i].exists));
|
||||||
// name
|
// name
|
||||||
ui->tableWidget_wifi->setItem(i, 0, new QTableWidgetItem(scanResults[i].name));
|
ui->tableWidget_wifi->setItem(i, 0, new QTableWidgetItem(scanResults[i].name));
|
||||||
ui->tableWidget_wifi->item(i, 0)->setTextAlignment(Qt::AlignLeft | Qt::AlignVCenter);
|
ui->tableWidget_wifi->item(i, 0)->setTextAlignment(Qt::AlignLeft | Qt::AlignVCenter);
|
||||||
// status
|
ui->tableWidget_wifi->item(i, 0)->setToolTip(toolTip);
|
||||||
ui->tableWidget_wifi->setItem(i, 1, new QTableWidgetItem(scanResults[i].status));
|
ui->tableWidget_wifi->item(i, 0)->setFont(font);
|
||||||
ui->tableWidget_wifi->item(i, 1)->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
|
|
||||||
// signal
|
// signal
|
||||||
ui->tableWidget_wifi->setItem(i, 2, new QTableWidgetItem(scanResults[i].signal));
|
ui->tableWidget_wifi->setItem(i, 1, new QTableWidgetItem(scanResults[i].signal));
|
||||||
ui->tableWidget_wifi->item(i, 2)->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
|
ui->tableWidget_wifi->item(i, 1)->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
|
||||||
|
ui->tableWidget_wifi->item(i, 1)->setToolTip(toolTip);
|
||||||
// security
|
// security
|
||||||
ui->tableWidget_wifi->setItem(i, 3, new QTableWidgetItem(scanResults[i].security));
|
ui->tableWidget_wifi->setItem(i, 2, new QTableWidgetItem(scanResults[i].security));
|
||||||
|
ui->tableWidget_wifi->item(i, 2)->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
|
||||||
|
ui->tableWidget_wifi->item(i, 2)->setToolTip(toolTip);
|
||||||
|
// active
|
||||||
|
ui->tableWidget_wifi->setItem(i, 3, new QTableWidgetItem(checkStatus(scanResults[i].active, true)));
|
||||||
ui->tableWidget_wifi->item(i, 3)->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
|
ui->tableWidget_wifi->item(i, 3)->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
|
||||||
|
// exists
|
||||||
|
ui->tableWidget_wifi->setItem(i, 4, new QTableWidgetItem(checkStatus(scanResults[i].exists, true)));
|
||||||
|
ui->tableWidget_wifi->item(i, 4)->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
|
||||||
}
|
}
|
||||||
|
|
||||||
ui->tableWidget_wifi->setSortingEnabled(true);
|
ui->tableWidget_wifi->setSortingEnabled(true);
|
||||||
|
ui->tableWidget_wifi->resizeColumnsToContents();
|
||||||
ui->tableWidget_wifi->resizeRowsToContents();
|
ui->tableWidget_wifi->resizeRowsToContents();
|
||||||
#if QT_VERSION >= 0x050000
|
|
||||||
ui->tableWidget_wifi->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch);
|
|
||||||
#else
|
|
||||||
ui->tableWidget_wifi->horizontalHeader()->setResizeMode(QHeaderView::Stretch);
|
|
||||||
#endif
|
|
||||||
ui->tabWidget->setEnabled(true);
|
ui->tabWidget->setEnabled(true);
|
||||||
ui->statusBar->showMessage(QApplication::translate("MainWindow", "Updated"));
|
ui->statusBar->showMessage(QApplication::translate("MainWindow", "Updated"));
|
||||||
|
|
||||||
@ -586,20 +593,19 @@ void MainWindow::updateMenuWifi()
|
|||||||
ui->actionWifiRefresh->setVisible(true);
|
ui->actionWifiRefresh->setVisible(true);
|
||||||
if (ui->tableWidget_wifi->currentItem() == 0)
|
if (ui->tableWidget_wifi->currentItem() == 0)
|
||||||
return;
|
return;
|
||||||
QString item = ui->tableWidget_wifi->item(ui->tableWidget_wifi->currentItem()->row(), 1)->text();
|
if (!ui->tableWidget_wifi->item(ui->tableWidget_wifi->currentItem()->row(), 4)->text().isEmpty()) {
|
||||||
if (checkState(QString("exists"), item)) {
|
if (!ui->tableWidget_wifi->item(ui->tableWidget_wifi->currentItem()->row(), 3)->text().isEmpty()) {
|
||||||
if (!checkState(QString("inactive"), item)) {
|
|
||||||
ui->actionWifiStart->setText(QApplication::translate("MainWindow", "Stop WiFi"));
|
ui->actionWifiStart->setText(QApplication::translate("MainWindow", "Stop WiFi"));
|
||||||
ui->actionWifiStart->setIcon(QIcon::fromTheme("dialog-close"));
|
ui->actionWifiStart->setIcon(QIcon::fromTheme("process-stop"));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
ui->actionWifiStart->setText(QApplication::translate("MainWindow", "Start WiFi"));
|
ui->actionWifiStart->setText(QApplication::translate("MainWindow", "Start WiFi"));
|
||||||
ui->actionWifiStart->setIcon(QIcon::fromTheme("dialog-apply"));
|
ui->actionWifiStart->setIcon(QIcon::fromTheme("system-run"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
ui->actionWifiStart->setText(QApplication::translate("MainWindow", "Start WiFi"));
|
ui->actionWifiStart->setText(QApplication::translate("MainWindow", "Start WiFi"));
|
||||||
ui->actionWifiStart->setIcon(QIcon::fromTheme("dialog-apply"));
|
ui->actionWifiStart->setIcon(QIcon::fromTheme("system-run"));
|
||||||
}
|
}
|
||||||
ui->actionWifiStart->setVisible(true);
|
ui->actionWifiStart->setVisible(true);
|
||||||
}
|
}
|
||||||
@ -628,18 +634,17 @@ void MainWindow::mainTabContextualMenu(const QPoint &pos)
|
|||||||
removeProfile->setIcon(QIcon::fromTheme("edit-delete"));
|
removeProfile->setIcon(QIcon::fromTheme("edit-delete"));
|
||||||
|
|
||||||
// set text
|
// set text
|
||||||
QString item = ui->tableWidget_main->item(ui->tableWidget_main->currentItem()->row(), 2)->text();
|
if (!ui->tableWidget_main->item(ui->tableWidget_main->currentItem()->row(), 2)->text().isEmpty()) {
|
||||||
if (!checkState(QString("inactive"), item)) {
|
|
||||||
restartProfile->setVisible(true);
|
restartProfile->setVisible(true);
|
||||||
startProfile->setText(QApplication::translate("MainWindow", "Stop profile"));
|
startProfile->setText(QApplication::translate("MainWindow", "Stop profile"));
|
||||||
startProfile->setIcon(QIcon::fromTheme("dialog-close"));
|
startProfile->setIcon(QIcon::fromTheme("process-stop"));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
restartProfile->setVisible(false);
|
restartProfile->setVisible(false);
|
||||||
startProfile->setText(QApplication::translate("MainWindow", "Start profile"));
|
startProfile->setText(QApplication::translate("MainWindow", "Start profile"));
|
||||||
startProfile->setIcon(QIcon::fromTheme("dialog-apply"));
|
startProfile->setIcon(QIcon::fromTheme("system-run"));
|
||||||
}
|
}
|
||||||
if (checkState(QString("enabled"), item)) {
|
if (!ui->tableWidget_main->item(ui->tableWidget_main->currentItem()->row(), 3)->text().isEmpty()) {
|
||||||
enableProfile->setText(QApplication::translate("MainWindow", "Disable profile"));
|
enableProfile->setText(QApplication::translate("MainWindow", "Disable profile"));
|
||||||
enableProfile->setIcon(QIcon::fromTheme("edit-remove"));
|
enableProfile->setIcon(QIcon::fromTheme("edit-remove"));
|
||||||
}
|
}
|
||||||
@ -716,8 +721,7 @@ void MainWindow::mainTabEnableProfile()
|
|||||||
ui->tabWidget->setDisabled(true);
|
ui->tabWidget->setDisabled(true);
|
||||||
QString profile = ui->tableWidget_main->item(ui->tableWidget_main->currentItem()->row(), 0)->text();
|
QString profile = ui->tableWidget_main->item(ui->tableWidget_main->currentItem()->row(), 0)->text();
|
||||||
netctlCommand->enableProfile(profile);
|
netctlCommand->enableProfile(profile);
|
||||||
QString item = ui->tableWidget_main->item(ui->tableWidget_main->currentItem()->row(), 2)->text();
|
if (!ui->tableWidget_main->item(ui->tableWidget_main->currentItem()->row(), 3)->text().isEmpty()) {
|
||||||
if (checkState(QString("enabled"), item)) {
|
|
||||||
if (netctlCommand->isProfileEnabled(profile))
|
if (netctlCommand->isProfileEnabled(profile))
|
||||||
ui->statusBar->showMessage(QApplication::translate("MainWindow", "Error"));
|
ui->statusBar->showMessage(QApplication::translate("MainWindow", "Error"));
|
||||||
else
|
else
|
||||||
@ -764,15 +768,18 @@ void MainWindow::mainTabStartProfile()
|
|||||||
|
|
||||||
ui->tabWidget->setDisabled(true);
|
ui->tabWidget->setDisabled(true);
|
||||||
QString profile = ui->tableWidget_main->item(ui->tableWidget_main->currentItem()->row(), 0)->text();
|
QString profile = ui->tableWidget_main->item(ui->tableWidget_main->currentItem()->row(), 0)->text();
|
||||||
netctlCommand->startProfile(profile);
|
if (!ui->tableWidget_main->item(ui->tableWidget_main->currentItem()->row(), 2)->text().isEmpty()) {
|
||||||
QString item = ui->tableWidget_main->item(ui->tableWidget_main->currentItem()->row(), 2)->text();
|
netctlCommand->startProfile(profile);
|
||||||
if (checkState(QString("inactive"), item)) {
|
|
||||||
if (netctlCommand->isProfileActive(profile))
|
if (netctlCommand->isProfileActive(profile))
|
||||||
ui->statusBar->showMessage(QApplication::translate("MainWindow", "Error"));
|
ui->statusBar->showMessage(QApplication::translate("MainWindow", "Error"));
|
||||||
else
|
else
|
||||||
ui->statusBar->showMessage(QApplication::translate("MainWindow", "Done"));
|
ui->statusBar->showMessage(QApplication::translate("MainWindow", "Done"));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
if (netctlCommand->getActiveProfile().isEmpty())
|
||||||
|
netctlCommand->startProfile(profile);
|
||||||
|
else
|
||||||
|
netctlCommand->switchToProfile(profile);
|
||||||
if (netctlCommand->isProfileActive(profile))
|
if (netctlCommand->isProfileActive(profile))
|
||||||
ui->statusBar->showMessage(QApplication::translate("MainWindow", "Done"));
|
ui->statusBar->showMessage(QApplication::translate("MainWindow", "Done"));
|
||||||
else
|
else
|
||||||
@ -797,16 +804,15 @@ void MainWindow::mainTabRefreshButtons(QTableWidgetItem *current, QTableWidgetIt
|
|||||||
|
|
||||||
ui->pushButton_mainStart->setEnabled(true);
|
ui->pushButton_mainStart->setEnabled(true);
|
||||||
|
|
||||||
QString item = ui->tableWidget_main->item(current->row(), 2)->text();
|
if (!ui->tableWidget_main->item(current->row(), 2)->text().isEmpty()) {
|
||||||
if (!checkState(QString("inactive"), item)) {
|
|
||||||
ui->pushButton_mainRestart->setEnabled(true);
|
ui->pushButton_mainRestart->setEnabled(true);
|
||||||
ui->pushButton_mainStart->setText(QApplication::translate("MainWindow", "Stop"));
|
ui->pushButton_mainStart->setText(QApplication::translate("MainWindow", "Stop"));
|
||||||
ui->pushButton_mainStart->setIcon(QIcon::fromTheme("dialog-close"));
|
ui->pushButton_mainStart->setIcon(QIcon::fromTheme("process-stop"));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
ui->pushButton_mainRestart->setDisabled(true);
|
ui->pushButton_mainRestart->setDisabled(true);
|
||||||
ui->pushButton_mainStart->setText(QApplication::translate("MainWindow", "Start"));
|
ui->pushButton_mainStart->setText(QApplication::translate("MainWindow", "Start"));
|
||||||
ui->pushButton_mainStart->setIcon(QIcon::fromTheme("dialog-apply"));
|
ui->pushButton_mainStart->setIcon(QIcon::fromTheme("system-run"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1234,20 +1240,19 @@ void MainWindow::wifiTabContextualMenu(const QPoint &pos)
|
|||||||
QAction *startWifi = menu.addAction(QApplication::translate("MainWindow", "Start WiFi"));
|
QAction *startWifi = menu.addAction(QApplication::translate("MainWindow", "Start WiFi"));
|
||||||
|
|
||||||
// set text
|
// set text
|
||||||
QString item = ui->tableWidget_wifi->item(ui->tableWidget_wifi->currentItem()->row(), 1)->text();
|
if (!ui->tableWidget_wifi->item(ui->tableWidget_wifi->currentItem()->row(), 4)->text().isEmpty()) {
|
||||||
if (checkState(QString("exists"), item)) {
|
if (!ui->tableWidget_wifi->item(ui->tableWidget_wifi->currentItem()->row(), 3)->text().isEmpty()) {
|
||||||
if (!checkState(QString("inactive"), item)) {
|
|
||||||
startWifi->setText(QApplication::translate("MainWindow", "Stop WiFi"));
|
startWifi->setText(QApplication::translate("MainWindow", "Stop WiFi"));
|
||||||
startWifi->setIcon(QIcon::fromTheme("dialog-close"));
|
startWifi->setIcon(QIcon::fromTheme("process-stop"));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
startWifi->setText(QApplication::translate("MainWindow", "Start WiFi"));
|
startWifi->setText(QApplication::translate("MainWindow", "Start WiFi"));
|
||||||
startWifi->setIcon(QIcon::fromTheme("dialog-apply"));
|
startWifi->setIcon(QIcon::fromTheme("system-run"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
startWifi->setText(QApplication::translate("MainWindow", "Start WiFi"));
|
startWifi->setText(QApplication::translate("MainWindow", "Start WiFi"));
|
||||||
startWifi->setIcon(QIcon::fromTheme("dialog-apply"));
|
startWifi->setIcon(QIcon::fromTheme("system-run"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// actions
|
// actions
|
||||||
@ -1295,10 +1300,10 @@ void MainWindow::connectToUnknownEssid(const QString passwd)
|
|||||||
settings[QString("Description")] = QString("'Automatically generated profile by Netctl GUI'");
|
settings[QString("Description")] = QString("'Automatically generated profile by Netctl GUI'");
|
||||||
settings[QString("Interface")] = netctlCommand->getWirelessInterfaceList()[0];
|
settings[QString("Interface")] = netctlCommand->getWirelessInterfaceList()[0];
|
||||||
settings[QString("Connection")] = QString("wireless");
|
settings[QString("Connection")] = QString("wireless");
|
||||||
QString security = ui->tableWidget_wifi->item(ui->tableWidget_wifi->currentItem()->row(), 3)->text();
|
QString security = ui->tableWidget_wifi->item(ui->tableWidget_wifi->currentItem()->row(), 2)->text();
|
||||||
if (checkState(QString("WPA"), security))
|
if (security.contains(QString("WPA")))
|
||||||
settings[QString("Security")] = QString("wpa");
|
settings[QString("Security")] = QString("wpa");
|
||||||
else if (checkState(QString("wep"), security))
|
else if (security.contains(QString("WEP")))
|
||||||
settings[QString("Security")] = QString("wep");
|
settings[QString("Security")] = QString("wep");
|
||||||
else
|
else
|
||||||
settings[QString("Security")] = QString("none");
|
settings[QString("Security")] = QString("none");
|
||||||
@ -1363,12 +1368,10 @@ void MainWindow::wifiTabStart()
|
|||||||
ui->tabWidget->setDisabled(true);
|
ui->tabWidget->setDisabled(true);
|
||||||
hiddenNetwork = false;
|
hiddenNetwork = false;
|
||||||
QString profile = ui->tableWidget_wifi->item(ui->tableWidget_wifi->currentItem()->row(), 0)->text();
|
QString profile = ui->tableWidget_wifi->item(ui->tableWidget_wifi->currentItem()->row(), 0)->text();
|
||||||
QString item = ui->tableWidget_wifi->item(ui->tableWidget_wifi->currentItem()->row(), 1)->text();
|
if (!ui->tableWidget_wifi->item(ui->tableWidget_wifi->currentItem()->row(), 4)->text().isEmpty()) {
|
||||||
if (checkState(QString("exists"), item)) {
|
|
||||||
QString profileName = wpaCommand->existentProfile(profile);
|
QString profileName = wpaCommand->existentProfile(profile);
|
||||||
netctlCommand->startProfile(profileName);
|
netctlCommand->startProfile(profileName);
|
||||||
item = ui->tableWidget_wifi->item(ui->tableWidget_wifi->currentItem()->row(), 1)->text();
|
if (!ui->tableWidget_wifi->item(ui->tableWidget_wifi->currentItem()->row(), 3)->text().isEmpty()) {
|
||||||
if (checkState(QString("inactive"), item)) {
|
|
||||||
if (netctlCommand->isProfileActive(profileName))
|
if (netctlCommand->isProfileActive(profileName))
|
||||||
ui->statusBar->showMessage(QApplication::translate("MainWindow", "Error"));
|
ui->statusBar->showMessage(QApplication::translate("MainWindow", "Error"));
|
||||||
else
|
else
|
||||||
@ -1382,8 +1385,8 @@ void MainWindow::wifiTabStart()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
QString security = ui->tableWidget_wifi->item(ui->tableWidget_wifi->currentItem()->row(), 3)->text();
|
QString security = ui->tableWidget_wifi->item(ui->tableWidget_wifi->currentItem()->row(), 1)->text();
|
||||||
if (checkState(QString("none"), security))
|
if (security.contains(QString("none")))
|
||||||
return connectToUnknownEssid(QString(""));
|
return connectToUnknownEssid(QString(""));
|
||||||
else {
|
else {
|
||||||
passwdWid = new PasswdWidget(this);
|
passwdWid = new PasswdWidget(this);
|
||||||
@ -1419,19 +1422,18 @@ void MainWindow::wifiTabRefreshButtons(QTableWidgetItem *current, QTableWidgetIt
|
|||||||
}
|
}
|
||||||
|
|
||||||
ui->pushButton_wifiStart->setEnabled(true);
|
ui->pushButton_wifiStart->setEnabled(true);
|
||||||
QString item = ui->tableWidget_wifi->item(current->row(), 1)->text();
|
if (!ui->tableWidget_wifi->item(current->row(), 4)->text().isEmpty()) {
|
||||||
if (checkState(QString("exists"), item)) {
|
if (!ui->tableWidget_wifi->item(current->row(), 3)->text().isEmpty()) {
|
||||||
if (!checkState(QString("inactive"), item)) {
|
|
||||||
ui->pushButton_wifiStart->setText(QApplication::translate("MainWindow", "Stop"));
|
ui->pushButton_wifiStart->setText(QApplication::translate("MainWindow", "Stop"));
|
||||||
ui->pushButton_wifiStart->setIcon(QIcon::fromTheme("dialog-close"));
|
ui->pushButton_wifiStart->setIcon(QIcon::fromTheme("process-stop"));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
ui->pushButton_wifiStart->setText(QApplication::translate("MainWindow", "Start"));
|
ui->pushButton_wifiStart->setText(QApplication::translate("MainWindow", "Start"));
|
||||||
ui->pushButton_wifiStart->setIcon(QIcon::fromTheme("dialog-apply"));
|
ui->pushButton_wifiStart->setIcon(QIcon::fromTheme("system-run"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
ui->pushButton_wifiStart->setText(QApplication::translate("MainWindow", "Start"));
|
ui->pushButton_wifiStart->setText(QApplication::translate("MainWindow", "Start"));
|
||||||
ui->pushButton_wifiStart->setIcon(QIcon::fromTheme("dialog-apply"));
|
ui->pushButton_wifiStart->setIcon(QIcon::fromTheme("system-run"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -128,10 +128,10 @@ private:
|
|||||||
NetctlProfile *netctlProfile;
|
NetctlProfile *netctlProfile;
|
||||||
WpaSup *wpaCommand;
|
WpaSup *wpaCommand;
|
||||||
bool checkExternalApps(const QString apps);
|
bool checkExternalApps(const QString apps);
|
||||||
bool checkState(const QString state, const QString item);
|
QString checkStatus(const bool statusBool, const bool nullFalse = false);
|
||||||
void createActions();
|
void createActions();
|
||||||
void keyPressEvent(QKeyEvent *pressedKey);
|
void keyPressEvent(QKeyEvent *pressedKey);
|
||||||
void setIconsToButtons();
|
void setIconsToTabs();
|
||||||
bool debug;
|
bool debug;
|
||||||
bool hiddenNetwork;
|
bool hiddenNetwork;
|
||||||
// configuration
|
// configuration
|
||||||
|
@ -68,6 +68,9 @@
|
|||||||
<property name="sortingEnabled">
|
<property name="sortingEnabled">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="columnCount">
|
||||||
|
<number>4</number>
|
||||||
|
</property>
|
||||||
<attribute name="horizontalHeaderStretchLastSection">
|
<attribute name="horizontalHeaderStretchLastSection">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</attribute>
|
</attribute>
|
||||||
@ -90,22 +93,8 @@
|
|||||||
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
</property>
|
</property>
|
||||||
</column>
|
</column>
|
||||||
<column>
|
<column/>
|
||||||
<property name="text">
|
<column/>
|
||||||
<string>Active</string>
|
|
||||||
</property>
|
|
||||||
<property name="textAlignment">
|
|
||||||
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</column>
|
|
||||||
<column>
|
|
||||||
<property name="text">
|
|
||||||
<string>Enabled</string>
|
|
||||||
</property>
|
|
||||||
<property name="textAlignment">
|
|
||||||
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</column>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@ -115,6 +104,9 @@
|
|||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Refresh</string>
|
<string>Refresh</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset theme="stock-refresh"/>
|
||||||
|
</property>
|
||||||
<property name="shortcut">
|
<property name="shortcut">
|
||||||
<string>Ctrl+R</string>
|
<string>Ctrl+R</string>
|
||||||
</property>
|
</property>
|
||||||
@ -144,6 +136,9 @@
|
|||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Restart</string>
|
<string>Restart</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset theme="stock-refresh"/>
|
||||||
|
</property>
|
||||||
<property name="autoDefault">
|
<property name="autoDefault">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
@ -157,6 +152,9 @@
|
|||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Start</string>
|
<string>Start</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset theme="system-run"/>
|
||||||
|
</property>
|
||||||
<property name="autoDefault">
|
<property name="autoDefault">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
@ -215,7 +213,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>443</width>
|
<width>443</width>
|
||||||
<height>347</height>
|
<height>345</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@ -235,6 +233,9 @@
|
|||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Clear</string>
|
<string>Clear</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset theme="edit-clear"/>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@ -255,6 +256,9 @@
|
|||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Save</string>
|
<string>Save</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset theme="document-save"/>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
@ -293,6 +297,9 @@
|
|||||||
<property name="sortingEnabled">
|
<property name="sortingEnabled">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="columnCount">
|
||||||
|
<number>5</number>
|
||||||
|
</property>
|
||||||
<attribute name="horizontalHeaderStretchLastSection">
|
<attribute name="horizontalHeaderStretchLastSection">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</attribute>
|
</attribute>
|
||||||
@ -303,22 +310,28 @@
|
|||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Name</string>
|
<string>Name</string>
|
||||||
</property>
|
</property>
|
||||||
</column>
|
<property name="textAlignment">
|
||||||
<column>
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
<property name="text">
|
|
||||||
<string>Status</string>
|
|
||||||
</property>
|
</property>
|
||||||
</column>
|
</column>
|
||||||
<column>
|
<column>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Signal</string>
|
<string>Signal</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
</column>
|
</column>
|
||||||
<column>
|
<column>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Security</string>
|
<string>Security</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="textAlignment">
|
||||||
|
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
|
||||||
|
</property>
|
||||||
</column>
|
</column>
|
||||||
|
<column/>
|
||||||
|
<column/>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@ -328,6 +341,9 @@
|
|||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Refresh</string>
|
<string>Refresh</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset theme="stock-refresh"/>
|
||||||
|
</property>
|
||||||
<property name="shortcut">
|
<property name="shortcut">
|
||||||
<string>Ctrl+R</string>
|
<string>Ctrl+R</string>
|
||||||
</property>
|
</property>
|
||||||
@ -357,6 +373,9 @@
|
|||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Start</string>
|
<string>Start</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset theme="system-run"/>
|
||||||
|
</property>
|
||||||
<property name="autoDefault">
|
<property name="autoDefault">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
@ -456,7 +475,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="actionMainStart">
|
<action name="actionMainStart">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset theme="dialog-apply">
|
<iconset theme="system-run">
|
||||||
<normaloff/>
|
<normaloff/>
|
||||||
</iconset>
|
</iconset>
|
||||||
</property>
|
</property>
|
||||||
@ -546,7 +565,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="actionWifiStart">
|
<action name="actionWifiStart">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset theme="dialog-apply">
|
<iconset theme="system-run">
|
||||||
<normaloff/>
|
<normaloff/>
|
||||||
</iconset>
|
</iconset>
|
||||||
</property>
|
</property>
|
||||||
|
@ -45,6 +45,21 @@ NetctlAutoWindow::~NetctlAutoWindow()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QString NetctlAutoWindow::checkStatus(const bool statusBool, const bool nullFalse)
|
||||||
|
{
|
||||||
|
if (debug) qDebug() << "[NetctlAutoWindow]" << "[checkStatus]";
|
||||||
|
if (debug) qDebug() << "[NetctlAutoWindow]" << "[checkStatus]" << ":" << "Status" << statusBool;
|
||||||
|
if (debug) qDebug() << "[NetctlAutoWindow]" << "[checkStatus]" << ":" << "Return null false" << nullFalse;
|
||||||
|
|
||||||
|
if (statusBool)
|
||||||
|
return QApplication::translate("NetctlAutoWindow", "yes");
|
||||||
|
if (nullFalse)
|
||||||
|
return QString("");
|
||||||
|
else
|
||||||
|
return QApplication::translate("NetctlAutoWindow", "no");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void NetctlAutoWindow::createActions()
|
void NetctlAutoWindow::createActions()
|
||||||
{
|
{
|
||||||
if (debug) qDebug() << "[NetctlAutoWindow]" << "[createActions]";
|
if (debug) qDebug() << "[NetctlAutoWindow]" << "[createActions]";
|
||||||
@ -126,44 +141,39 @@ void NetctlAutoWindow::netctlAutoUpdateTable()
|
|||||||
headerList.append(QApplication::translate("NetctlAutoWindow", "Active"));
|
headerList.append(QApplication::translate("NetctlAutoWindow", "Active"));
|
||||||
headerList.append(QApplication::translate("NetctlAutoWindow", "Disabled"));
|
headerList.append(QApplication::translate("NetctlAutoWindow", "Disabled"));
|
||||||
ui->tableWidget->setHorizontalHeaderLabels(headerList);
|
ui->tableWidget->setHorizontalHeaderLabels(headerList);
|
||||||
|
ui->tableWidget->setColumnHidden(2, true);
|
||||||
|
ui->tableWidget->setColumnHidden(3, true);
|
||||||
// create items
|
// create items
|
||||||
for (int i=0; i<profiles.count(); i++) {
|
for (int i=0; i<profiles.count(); i++) {
|
||||||
|
// font
|
||||||
|
QFont font;
|
||||||
|
font.setBold(profiles[i].active);
|
||||||
|
font.setItalic(profiles[i].enabled);
|
||||||
|
// tooltip
|
||||||
|
QString toolTip = QString("");
|
||||||
|
toolTip += QString("%1: %2\n").arg(QApplication::translate("NetctlAutoWindow", "Profile")).arg(profiles[i].name);
|
||||||
|
toolTip += QString("%1: %2\n").arg(QApplication::translate("NetctlAutoWindow", "Active")).arg(checkStatus(profiles[i].active));
|
||||||
|
toolTip += QString("%1: %2").arg(QApplication::translate("NetctlAutoWindow", "Disabled")).arg(checkStatus(!profiles[i].enabled));
|
||||||
// name
|
// name
|
||||||
ui->tableWidget->setItem(i, 0, new QTableWidgetItem(profiles[i].name));
|
ui->tableWidget->setItem(i, 0, new QTableWidgetItem(profiles[i].name));
|
||||||
ui->tableWidget->item(i, 0)->setTextAlignment(Qt::AlignLeft | Qt::AlignVCenter);
|
ui->tableWidget->item(i, 0)->setTextAlignment(Qt::AlignLeft | Qt::AlignVCenter);
|
||||||
|
ui->tableWidget->item(i, 0)->setToolTip(toolTip);
|
||||||
|
ui->tableWidget->item(i, 0)->setFont(font);
|
||||||
// description
|
// description
|
||||||
ui->tableWidget->setItem(i, 1, new QTableWidgetItem(profiles[i].description));
|
ui->tableWidget->setItem(i, 1, new QTableWidgetItem(profiles[i].description));
|
||||||
ui->tableWidget->item(i, 1)->setTextAlignment(Qt::AlignLeft | Qt::AlignVCenter);
|
ui->tableWidget->item(i, 1)->setTextAlignment(Qt::AlignJustify | Qt::AlignVCenter);
|
||||||
// status
|
ui->tableWidget->item(i, 1)->setToolTip(toolTip);
|
||||||
if (profiles[i].active) {
|
// active
|
||||||
// active
|
ui->tableWidget->setItem(i, 2, new QTableWidgetItem(checkStatus(profiles[i].active, true)));
|
||||||
QFont font;
|
ui->tableWidget->item(i, 2)->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
|
||||||
font.setBold(true);
|
// enabled
|
||||||
ui->tableWidget->item(i, 0)->setFont(font);
|
ui->tableWidget->setItem(i, 3, new QTableWidgetItem(checkStatus(!profiles[i].enabled, true)));
|
||||||
ui->tableWidget->setItem(i, 2, new QTableWidgetItem(QApplication::translate("NetctlAutoWindow", "yes")));
|
ui->tableWidget->item(i, 3)->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
|
||||||
ui->tableWidget->item(i, 2)->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
ui->tableWidget->setItem(i, 2, new QTableWidgetItem(QString("")));
|
|
||||||
if (profiles[i].enabled) {
|
|
||||||
// disabled
|
|
||||||
QFont font;
|
|
||||||
font.setItalic(true);
|
|
||||||
ui->tableWidget->item(i, 0)->setFont(font);
|
|
||||||
ui->tableWidget->setItem(i, 3, new QTableWidgetItem(QApplication::translate("NetctlAutoWindow", "yes")));
|
|
||||||
ui->tableWidget->item(i, 3)->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
ui->tableWidget->setItem(i, 3, new QTableWidgetItem(QString("")));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ui->tableWidget->setSortingEnabled(true);
|
ui->tableWidget->setSortingEnabled(true);
|
||||||
|
ui->tableWidget->resizeColumnsToContents();
|
||||||
ui->tableWidget->resizeRowsToContents();
|
ui->tableWidget->resizeRowsToContents();
|
||||||
#if QT_VERSION >= 0x050000
|
|
||||||
ui->tableWidget->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch);
|
|
||||||
#else
|
|
||||||
ui->tableWidget->horizontalHeader()->setResizeMode(QHeaderView::Stretch);
|
|
||||||
#endif
|
|
||||||
ui->tableWidget->setEnabled(true);
|
ui->tableWidget->setEnabled(true);
|
||||||
ui->statusBar->showMessage(QApplication::translate("NetctlAutoWindow", "Updated"));
|
ui->statusBar->showMessage(QApplication::translate("NetctlAutoWindow", "Updated"));
|
||||||
|
|
||||||
@ -181,7 +191,7 @@ void NetctlAutoWindow::netctlAutoContextualMenu(const QPoint &pos)
|
|||||||
// create menu
|
// create menu
|
||||||
QMenu menu(this);
|
QMenu menu(this);
|
||||||
QAction *startProfile = menu.addAction(QApplication::translate("NetctlAutoWindow", "Switch to profile"));
|
QAction *startProfile = menu.addAction(QApplication::translate("NetctlAutoWindow", "Switch to profile"));
|
||||||
startProfile->setIcon(QIcon::fromTheme("dialog-apply"));
|
startProfile->setIcon(QIcon::fromTheme("system-run"));
|
||||||
QAction *enableProfile = menu.addAction(QApplication::translate("NetctlAutoWindow", "Enable profile"));
|
QAction *enableProfile = menu.addAction(QApplication::translate("NetctlAutoWindow", "Enable profile"));
|
||||||
menu.addSeparator();
|
menu.addSeparator();
|
||||||
QAction *enableAllProfiles = menu.addAction(QApplication::translate("NetctlAutoWindow", "Enable all profiles"));
|
QAction *enableAllProfiles = menu.addAction(QApplication::translate("NetctlAutoWindow", "Enable all profiles"));
|
||||||
@ -190,14 +200,14 @@ void NetctlAutoWindow::netctlAutoContextualMenu(const QPoint &pos)
|
|||||||
disableAllProfiles->setIcon(QIcon::fromTheme("edit-delete"));
|
disableAllProfiles->setIcon(QIcon::fromTheme("edit-delete"));
|
||||||
|
|
||||||
// set text
|
// set text
|
||||||
if (ui->tableWidget->item(ui->tableWidget->currentItem()->row(), 2)->text() == QString("yes")) {
|
if (!ui->tableWidget->item(ui->tableWidget->currentItem()->row(), 2)->text().isEmpty()) {
|
||||||
enableProfile->setVisible(false);
|
enableProfile->setVisible(false);
|
||||||
startProfile->setVisible(false);
|
startProfile->setVisible(false);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
enableProfile->setVisible(true);
|
enableProfile->setVisible(true);
|
||||||
startProfile->setVisible(true);
|
startProfile->setVisible(true);
|
||||||
if (ui->tableWidget->item(ui->tableWidget->currentItem()->row(), 3)->text() == QString("yes")) {
|
if (!ui->tableWidget->item(ui->tableWidget->currentItem()->row(), 3)->text().isEmpty()) {
|
||||||
enableProfile->setText(QApplication::translate("NetctlAutoWindow", "Enable"));
|
enableProfile->setText(QApplication::translate("NetctlAutoWindow", "Enable"));
|
||||||
enableProfile->setIcon(QIcon::fromTheme("edit-add"));
|
enableProfile->setIcon(QIcon::fromTheme("edit-add"));
|
||||||
}
|
}
|
||||||
@ -343,7 +353,7 @@ void NetctlAutoWindow::netctlAutoRefreshButtons(QTableWidgetItem *current, QTabl
|
|||||||
ui->actionSwitch->setVisible(false);
|
ui->actionSwitch->setVisible(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (ui->tableWidget->item(current->row(), 2)->text() == QString("yes")) {
|
if (!ui->tableWidget->item(current->row(), 2)->text().isEmpty()) {
|
||||||
// buttons
|
// buttons
|
||||||
ui->pushButton_enable->setDisabled(true);
|
ui->pushButton_enable->setDisabled(true);
|
||||||
ui->pushButton_switch->setDisabled(true);
|
ui->pushButton_switch->setDisabled(true);
|
||||||
@ -358,7 +368,7 @@ void NetctlAutoWindow::netctlAutoRefreshButtons(QTableWidgetItem *current, QTabl
|
|||||||
// menu
|
// menu
|
||||||
ui->actionEnable->setVisible(true);
|
ui->actionEnable->setVisible(true);
|
||||||
ui->actionSwitch->setVisible(true);
|
ui->actionSwitch->setVisible(true);
|
||||||
if (ui->tableWidget->item(current->row(), 3)->text() == QString("yes")) {
|
if (!ui->tableWidget->item(current->row(), 3)->text().isEmpty()) {
|
||||||
// buttons
|
// buttons
|
||||||
ui->pushButton_enable->setText(QApplication::translate("NetctlAutoWindow", "Enable"));
|
ui->pushButton_enable->setText(QApplication::translate("NetctlAutoWindow", "Enable"));
|
||||||
ui->pushButton_enable->setIcon(QIcon::fromTheme("edit-add"));
|
ui->pushButton_enable->setIcon(QIcon::fromTheme("edit-add"));
|
||||||
|
@ -61,6 +61,7 @@ private:
|
|||||||
Netctl *netctlCommand;
|
Netctl *netctlCommand;
|
||||||
Ui::NetctlAutoWindow *ui;
|
Ui::NetctlAutoWindow *ui;
|
||||||
bool debug;
|
bool debug;
|
||||||
|
QString checkStatus(const bool statusBool, const bool nullFalse = false);
|
||||||
void createActions();
|
void createActions();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>432</width>
|
<width>428</width>
|
||||||
<height>343</height>
|
<height>339</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@ -42,6 +42,9 @@
|
|||||||
<property name="sortingEnabled">
|
<property name="sortingEnabled">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="columnCount">
|
||||||
|
<number>4</number>
|
||||||
|
</property>
|
||||||
<attribute name="horizontalHeaderStretchLastSection">
|
<attribute name="horizontalHeaderStretchLastSection">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</attribute>
|
</attribute>
|
||||||
@ -58,16 +61,8 @@
|
|||||||
<string>Description</string>
|
<string>Description</string>
|
||||||
</property>
|
</property>
|
||||||
</column>
|
</column>
|
||||||
<column>
|
<column/>
|
||||||
<property name="text">
|
<column/>
|
||||||
<string>Active</string>
|
|
||||||
</property>
|
|
||||||
</column>
|
|
||||||
<column>
|
|
||||||
<property name="text">
|
|
||||||
<string>Disabled</string>
|
|
||||||
</property>
|
|
||||||
</column>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@ -105,6 +100,9 @@
|
|||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Enable</string>
|
<string>Enable</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset theme="edit-add"/>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@ -116,7 +114,7 @@
|
|||||||
<string>Switch</string>
|
<string>Switch</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset theme="dialog-apply">
|
<iconset theme="system-run">
|
||||||
<normaloff/>
|
<normaloff/>
|
||||||
</iconset>
|
</iconset>
|
||||||
</property>
|
</property>
|
||||||
@ -131,7 +129,7 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>432</width>
|
<width>428</width>
|
||||||
<height>22</height>
|
<height>22</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -168,7 +166,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="actionSwitch">
|
<action name="actionSwitch">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset theme="dialog-apply">
|
<iconset theme="system-run">
|
||||||
<normaloff/>
|
<normaloff/>
|
||||||
</iconset>
|
</iconset>
|
||||||
</property>
|
</property>
|
||||||
|
@ -41,9 +41,9 @@ class NetctlProfile;
|
|||||||
* @var netctlProfileInfo::description
|
* @var netctlProfileInfo::description
|
||||||
* profile description
|
* profile description
|
||||||
* @var netctlProfileInfo::active
|
* @var netctlProfileInfo::active
|
||||||
* profile status
|
* whether profile is active
|
||||||
* @var netctlProfileInfo::enabled
|
* @var netctlProfileInfo::enabled
|
||||||
* profile status
|
* whether profile is enabled
|
||||||
*/
|
*/
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
@ -81,6 +81,16 @@ public:
|
|||||||
*/
|
*/
|
||||||
~Netctl();
|
~Netctl();
|
||||||
// general information
|
// general information
|
||||||
|
/**
|
||||||
|
* @brief method which returns active profile name
|
||||||
|
* @return profile name or ""
|
||||||
|
*/
|
||||||
|
QString getActiveProfile();
|
||||||
|
/**
|
||||||
|
* @brief method which returns active profile name from netctl-auto
|
||||||
|
* @return profile name or ""
|
||||||
|
*/
|
||||||
|
QString autoGetActiveProfile();
|
||||||
/**
|
/**
|
||||||
* @brief method which returns profile informations from netctl
|
* @brief method which returns profile informations from netctl
|
||||||
* @return list of profiles
|
* @return list of profiles
|
||||||
@ -174,6 +184,13 @@ public slots:
|
|||||||
* @return true if the method was completed without errors
|
* @return true if the method was completed without errors
|
||||||
*/
|
*/
|
||||||
bool startProfile(const QString profile);
|
bool startProfile(const QString profile);
|
||||||
|
/**
|
||||||
|
* @brief method which starts another profile
|
||||||
|
* @param profile profile name
|
||||||
|
* @return false if components are not found or command exit code is not equal to 0
|
||||||
|
* @return true if the method was completed without errors
|
||||||
|
*/
|
||||||
|
bool switchToProfile(const QString profile);
|
||||||
// netctl-auto
|
// netctl-auto
|
||||||
/**
|
/**
|
||||||
* @brief method which sets all profiles disabled (netctl-auto)
|
* @brief method which sets all profiles disabled (netctl-auto)
|
||||||
|
@ -43,15 +43,18 @@ class NetctlProfile;
|
|||||||
* may be "WPA2", "WEP", "WEP", "none"
|
* may be "WPA2", "WEP", "WEP", "none"
|
||||||
* @var netctlWifiInfo::signal
|
* @var netctlWifiInfo::signal
|
||||||
* Wifi point signal
|
* Wifi point signal
|
||||||
* @var netctlWifiInfo::status
|
* @var netctlWifiInfo::active
|
||||||
* netctl status, may be "new", "exist (active)", "exist (inactive)"
|
* whether associated profile is active
|
||||||
|
* @var netctlWifiInfo::exists
|
||||||
|
* whether associated profile exists
|
||||||
*/
|
*/
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
QString name;
|
QString name;
|
||||||
QString security;
|
QString security;
|
||||||
QString signal;
|
QString signal;
|
||||||
QString status;
|
bool active;
|
||||||
|
bool exists;
|
||||||
} netctlWifiInfo;
|
} netctlWifiInfo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -150,6 +150,44 @@ QString Netctl::getCmdOutput(const bool sudo, const QString command, const QStri
|
|||||||
|
|
||||||
|
|
||||||
// general information
|
// general information
|
||||||
|
/**
|
||||||
|
* @fn getActiveProfile
|
||||||
|
*/
|
||||||
|
QString Netctl::getActiveProfile()
|
||||||
|
{
|
||||||
|
if (debug) qDebug() << "[Netctl]" << "[getActiveProfile]";
|
||||||
|
|
||||||
|
QString profile = QString("");
|
||||||
|
QList<netctlProfileInfo> fullProfilesInfo = getProfileList();
|
||||||
|
for (int i=0; i<fullProfilesInfo.count(); i++)
|
||||||
|
if (fullProfilesInfo[i].active) {
|
||||||
|
profile = fullProfilesInfo[i].name;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return profile;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @fn autoGetActiveProfile
|
||||||
|
*/
|
||||||
|
QString Netctl::autoGetActiveProfile()
|
||||||
|
{
|
||||||
|
if (debug) qDebug() << "[Netctl]" << "[autoGetActiveProfile]";
|
||||||
|
|
||||||
|
QString profile = QString("");
|
||||||
|
QList<netctlProfileInfo> fullProfilesInfo = getProfileListFromNetctlAuto();
|
||||||
|
for (int i=0; i<fullProfilesInfo.count(); i++)
|
||||||
|
if (fullProfilesInfo[i].active) {
|
||||||
|
profile = fullProfilesInfo[i].name;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return profile;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @fn getProfileList
|
* @fn getProfileList
|
||||||
*/
|
*/
|
||||||
@ -164,7 +202,10 @@ QList<netctlProfileInfo> Netctl::getProfileList()
|
|||||||
netctlProfileInfo profileInfo;
|
netctlProfileInfo profileInfo;
|
||||||
profileInfo.name = output[i].mid(2, -1);
|
profileInfo.name = output[i].mid(2, -1);
|
||||||
profileInfo.description = getProfileDescription(profileInfo.name);
|
profileInfo.description = getProfileDescription(profileInfo.name);
|
||||||
profileInfo.active = isProfileActive(profileInfo.name);
|
if (output[i][0] == QChar('*'))
|
||||||
|
profileInfo.active = true;
|
||||||
|
else
|
||||||
|
profileInfo.active = false;
|
||||||
profileInfo.enabled = isProfileEnabled(profileInfo.name);
|
profileInfo.enabled = isProfileEnabled(profileInfo.name);
|
||||||
fullProfilesInfo.append(profileInfo);
|
fullProfilesInfo.append(profileInfo);
|
||||||
}
|
}
|
||||||
@ -187,8 +228,12 @@ QList<netctlProfileInfo> Netctl::getProfileListFromNetctlAuto()
|
|||||||
netctlProfileInfo profileInfo;
|
netctlProfileInfo profileInfo;
|
||||||
profileInfo.name = output[i].mid(2, -1);
|
profileInfo.name = output[i].mid(2, -1);
|
||||||
profileInfo.description = getProfileDescription(profileInfo.name);
|
profileInfo.description = getProfileDescription(profileInfo.name);
|
||||||
profileInfo.active = autoIsProfileActive(profileInfo.name);
|
profileInfo.active = false;
|
||||||
profileInfo.enabled = autoIsProfileEnabled(profileInfo.name);
|
profileInfo.enabled = true;
|
||||||
|
if (output[i][0] == QChar('*'))
|
||||||
|
profileInfo.active = true;
|
||||||
|
else if (output[i][0] == QChar('!'))
|
||||||
|
profileInfo.enabled = false;
|
||||||
fullProfilesInfo.append(profileInfo);
|
fullProfilesInfo.append(profileInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -320,12 +365,8 @@ bool Netctl::isNetctlAutoEnabled()
|
|||||||
|
|
||||||
QString interface = getWirelessInterfaceList()[0];
|
QString interface = getWirelessInterfaceList()[0];
|
||||||
QString argument = netctlAutoService + QString("@") + interface + QString(".service");
|
QString argument = netctlAutoService + QString("@") + interface + QString(".service");
|
||||||
QString output = getCmdOutput(false, systemctlCommand, QString("is-enabled"), argument).trimmed();
|
|
||||||
|
|
||||||
if (output == QString("enabled"))
|
return cmdCall(false, systemctlCommand, QString("is-enabled"), argument);
|
||||||
return true;
|
|
||||||
else
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -346,12 +387,8 @@ bool Netctl::isNetctlAutoRunning()
|
|||||||
|
|
||||||
QString interface = getWirelessInterfaceList()[0];
|
QString interface = getWirelessInterfaceList()[0];
|
||||||
QString argument = netctlAutoService + QString("@") + interface + QString(".service");
|
QString argument = netctlAutoService + QString("@") + interface + QString(".service");
|
||||||
QString output = getCmdOutput(false, systemctlCommand, QString("is-active"), argument).trimmed();
|
|
||||||
|
|
||||||
if (output == QString("active"))
|
return cmdCall(false, systemctlCommand, QString("is-active"), argument);
|
||||||
return true;
|
|
||||||
else
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -425,6 +462,21 @@ bool Netctl::startProfile(const QString profile)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @fn switchToProfile
|
||||||
|
*/
|
||||||
|
bool Netctl::switchToProfile(const QString profile)
|
||||||
|
{
|
||||||
|
if (debug) qDebug() << "[Netctl]" << "[switchToProfile]";
|
||||||
|
if (debug) qDebug() << "[Netctl]" << "[switchToProfile]" << ":" << "Profile" << profile;
|
||||||
|
|
||||||
|
if (isProfileActive(profile))
|
||||||
|
return true;
|
||||||
|
else
|
||||||
|
return cmdCall(true, netctlCommand, QString("switch-to"), profile);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @fn autoDisableAllProfiles
|
* @fn autoDisableAllProfiles
|
||||||
*/
|
*/
|
||||||
|
@ -210,17 +210,8 @@ QList<netctlWifiInfo> WpaSup::scanWifi()
|
|||||||
else
|
else
|
||||||
wifiPoint.name = QString("<hidden>");
|
wifiPoint.name = QString("<hidden>");
|
||||||
// profile status
|
// profile status
|
||||||
QString status;
|
wifiPoint.active = isProfileActive(wifiPoint.name);
|
||||||
if (isProfileExists(wifiPoint.name)) {
|
wifiPoint.exists = isProfileExists(wifiPoint.name);
|
||||||
status = QString("exists");
|
|
||||||
if (isProfileActive(wifiPoint.name))
|
|
||||||
status = status + QString(" (active)");
|
|
||||||
else
|
|
||||||
status = status + QString(" (inactive)");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
status = QString("new");
|
|
||||||
wifiPoint.status = status;
|
|
||||||
// point signal
|
// point signal
|
||||||
wifiPoint.signal = rawList[i].split(QChar('\t'), QString::SkipEmptyParts)[2];
|
wifiPoint.signal = rawList[i].split(QChar('\t'), QString::SkipEmptyParts)[2];
|
||||||
// point security
|
// point security
|
||||||
|
Loading…
Reference in New Issue
Block a user