1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-23 08:28:36 -05:00

Multi device support: changing input view tab changes all other tabs accordingly

This commit is contained in:
f4exb 2016-05-14 03:36:28 +02:00
parent 3c0e66c90e
commit 8a6cf3374e
2 changed files with 14 additions and 1 deletions

View File

@ -98,7 +98,7 @@ MainWindow::MainWindow(QWidget* parent) :
ui->menu_Window->addAction(ui->channelDock->toggleViewAction()); ui->menu_Window->addAction(ui->channelDock->toggleViewAction());
//ui->tabInputsVoew->setStyleSheet("background-color: rgb(46,46,46)"); //ui->tabInputsVoew->setStyleSheet("background-color: rgb(46,46,46)");
ui->tabInputsView->setStyleSheet("QWidget { background: rgb(46,46,46); } "); ui->tabInputsView->setStyleSheet("QWidget { background: rgb(46,46,46); }");
connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleMessages()), Qt::QueuedConnection); connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleMessages()), Qt::QueuedConnection);
@ -162,6 +162,8 @@ MainWindow::MainWindow(QWidget* parent) :
updatePresetControls(); updatePresetControls();
qDebug() << "MainWindow::MainWindow: end"; qDebug() << "MainWindow::MainWindow: end";
connect(ui->tabInputsView, SIGNAL(currentChanged(int)), this, SLOT(tabInputViewIndexChanged()));
} }
MainWindow::~MainWindow() MainWindow::~MainWindow()
@ -734,6 +736,16 @@ void MainWindow::on_action_removeDevice_triggered()
} }
} }
void MainWindow::tabInputViewIndexChanged()
{
int inputViewIndex = ui->tabInputsView->currentIndex();
ui->tabSpectra->setCurrentIndex(inputViewIndex);
ui->tabChannels->setCurrentIndex(inputViewIndex);
ui->tabInputsSelect->setCurrentIndex(inputViewIndex);
ui->tabSpectraGUI->setCurrentIndex(inputViewIndex);
}
void MainWindow::updateStatus() void MainWindow::updateStatus()
{ {
m_dateTimeWidget->setText(QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss t")); m_dateTimeWidget->setText(QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss t"));

View File

@ -149,6 +149,7 @@ private slots:
void on_action_About_triggered(); void on_action_About_triggered();
void on_action_addDevice_triggered(); void on_action_addDevice_triggered();
void on_action_removeDevice_triggered(); void on_action_removeDevice_triggered();
void tabInputViewIndexChanged();
}; };
#endif // INCLUDE_MAINWINDOW_H #endif // INCLUDE_MAINWINDOW_H