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;
|
if (debug) qDebug() << PDEBUG;
|
||||||
|
|
||||||
|
if (mainWindow->currentTab() == 0) {
|
||||||
updateMainTab();
|
updateMainTab();
|
||||||
updateMenuMain();
|
updateMenuMain();
|
||||||
|
}
|
||||||
|
|
||||||
if (timer.interval() != 0) return timer.start();
|
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()
|
Qt::ToolBarArea MainWindow::getToolBarArea()
|
||||||
{
|
{
|
||||||
if (debug) qDebug() << PDEBUG;
|
if (debug) qDebug() << PDEBUG;
|
||||||
|
@ -42,11 +42,12 @@ class MainWindow : public QMainWindow
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit MainWindow(QWidget *parent = 0,
|
explicit MainWindow(QWidget *parent = nullptr,
|
||||||
const QVariantMap args = QVariantMap(),
|
const QVariantMap args = QVariantMap(),
|
||||||
QTranslator *qtAppTranslator = 0,
|
QTranslator *qtAppTranslator = nullptr,
|
||||||
QTranslator *appTranslator = 0);
|
QTranslator *appTranslator = nullptr);
|
||||||
~MainWindow();
|
~MainWindow();
|
||||||
|
int currentTab();
|
||||||
Qt::ToolBarArea getToolBarArea();
|
Qt::ToolBarArea getToolBarArea();
|
||||||
void emitNeedToBeConfigured();
|
void emitNeedToBeConfigured();
|
||||||
QStringList printSettings();
|
QStringList printSettings();
|
||||||
|
@ -89,9 +89,6 @@
|
|||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>The username and password to connect with</string>
|
<string>The username and password to connect with</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
@ -125,9 +122,6 @@
|
|||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>The access point (apn) to connect on</string>
|
<string>The access point (apn) to connect on</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
@ -75,8 +75,10 @@ void WiFiMenuWidget::update()
|
|||||||
{
|
{
|
||||||
if (debug) qDebug() << PDEBUG;
|
if (debug) qDebug() << PDEBUG;
|
||||||
|
|
||||||
|
if (mainWindow->currentTab() == 2) {
|
||||||
updateWifiTab();
|
updateWifiTab();
|
||||||
updateMenuWifi();
|
updateMenuWifi();
|
||||||
|
}
|
||||||
|
|
||||||
if (timer.interval() != 0) return timer.start();
|
if (timer.interval() != 0) return timer.start();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user