Added polling button

merge-requests/6/head
Elliott Liggett 2021-06-21 10:49:22 -07:00
rodzic 5ef6afe58c
commit d819c6c931
3 zmienionych plików z 34 dodań i 10 usunięć

Wyświetl plik

@ -4702,18 +4702,24 @@ void wfmain::on_wfLengthSlider_valueChanged(int value)
prepareWf(value);
}
void wfmain::on_pollingBtn_clicked()
{
bool ok;
int timing = 0;
timing = QInputDialog::getInt(this, "wfview Radio Polling Setup", "Poll Timing Interval (ms)", delayedCommand->interval(), 1, 200, 1, &ok );
if(ok && timing)
{
delayedCommand->setInterval( timing );
qInfo(logSystem()) << "User changed radio polling interval to " << timing << "ms.";
showStatusBarText("User changed radio polling interval to " + QString("%1").arg(timing) + "ms.");
}
}
// --- DEBUG FUNCTION ---
void wfmain::on_debugBtn_clicked()
{
qInfo(logSystem()) << "Debug button pressed.";
emit getFrequency();
bool ok;
int timing = 0;
timing = QInputDialog::getInt(this, "Title", "Poll Timing Interval (ms)", delayedCommand->interval(), 5, 100, 1, &ok );
if(ok && timing)
{
delayedCommand->setInterval( timing );
qInfo(logSystem()) << "Setting delayed command timing to: " << timing << "ms.";
}
}

Wyświetl plik

@ -450,6 +450,8 @@ private slots:
void on_wfLengthSlider_valueChanged(int value);
void on_pollingBtn_clicked();
private:
Ui::wfmain *ui;
void closeEvent(QCloseEvent *event);

Wyświetl plik

@ -18,7 +18,7 @@
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>0</number>
<number>3</number>
</property>
<widget class="QWidget" name="mainTab">
<attribute name="title">
@ -2612,6 +2612,22 @@
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pollingBtn">
<property name="toolTip">
<string>Set up radio polling. The radio's meter is polled every-other interval.</string>
</property>
<property name="accessibleName">
<string>Polling</string>
</property>
<property name="accessibleDescription">
<string/>
</property>
<property name="text">
<string>Polling</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_6">
<property name="orientation">