mirror of
https://github.com/arcan1s/netctl-gui.git
synced 2025-04-24 15:37:23 +00:00
edit mobilewidget.ui, main and wifi tab now only will be update if they
are active
This commit is contained in:
parent
e67493f5c0
commit
5efb25dca3
@ -94,8 +94,10 @@ void MainWidget::update()
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
|
||||
updateMainTab();
|
||||
updateMenuMain();
|
||||
if (mainWindow->currentTab() == 0) {
|
||||
updateMainTab();
|
||||
updateMenuMain();
|
||||
}
|
||||
|
||||
if (timer.interval() != 0) return timer.start();
|
||||
}
|
||||
|
@ -111,6 +111,14 @@ MainWindow::~MainWindow()
|
||||
}
|
||||
|
||||
|
||||
int MainWindow::currentTab()
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
|
||||
return ui->stackedWidget->currentIndex();
|
||||
}
|
||||
|
||||
|
||||
Qt::ToolBarArea MainWindow::getToolBarArea()
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
|
@ -42,11 +42,12 @@ class MainWindow : public QMainWindow
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit MainWindow(QWidget *parent = 0,
|
||||
explicit MainWindow(QWidget *parent = nullptr,
|
||||
const QVariantMap args = QVariantMap(),
|
||||
QTranslator *qtAppTranslator = 0,
|
||||
QTranslator *appTranslator = 0);
|
||||
QTranslator *qtAppTranslator = nullptr,
|
||||
QTranslator *appTranslator = nullptr);
|
||||
~MainWindow();
|
||||
int currentTab();
|
||||
Qt::ToolBarArea getToolBarArea();
|
||||
void emitNeedToBeConfigured();
|
||||
QStringList printSettings();
|
||||
|
@ -89,9 +89,6 @@
|
||||
<property name="toolTip">
|
||||
<string>The username and password to connect with</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
@ -125,9 +122,6 @@
|
||||
<property name="toolTip">
|
||||
<string>The access point (apn) to connect on</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
@ -75,8 +75,10 @@ void WiFiMenuWidget::update()
|
||||
{
|
||||
if (debug) qDebug() << PDEBUG;
|
||||
|
||||
updateWifiTab();
|
||||
updateMenuWifi();
|
||||
if (mainWindow->currentTab() == 2) {
|
||||
updateWifiTab();
|
||||
updateMenuWifi();
|
||||
}
|
||||
|
||||
if (timer.interval() != 0) return timer.start();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user