From e3e470102b83417618b93494b9f47f819b230f64 Mon Sep 17 00:00:00 2001 From: f4exb Date: Wed, 25 May 2016 03:06:40 +0200 Subject: [PATCH] Multi device support: commented out code cleanup. Make sampling device control active tab highlight less prominent --- sdrbase/mainwindow.cpp | 34 +--------------------------------- sdrbase/mainwindow.h | 2 -- 2 files changed, 1 insertion(+), 35 deletions(-) diff --git a/sdrbase/mainwindow.cpp b/sdrbase/mainwindow.cpp index a3b6d3948..52ce4f799 100644 --- a/sdrbase/mainwindow.cpp +++ b/sdrbase/mainwindow.cpp @@ -108,7 +108,7 @@ MainWindow::MainWindow(QWidget* parent) : "QToolButton::checked { background: rgb(128,70,0); } " "QComboBox::item:selected { color: rgb(255,140,0); } " "QTabWidget::pane { border: 1px solid #C06900; } " - "QTabBar::tab:selected { background: rgb(128,70,0); }"); + "QTabBar::tab:selected { background: rgb(100,100,100); }"); m_pluginManager = new PluginManager(this); m_pluginManager->loadPlugins(); @@ -300,9 +300,6 @@ void MainWindow::loadPresetSettings(const Preset* preset, int tabIndex) qPrintable(preset->getGroup()), qPrintable(preset->getDescription())); - // Load into currently selected source tab - //int currentSourceTabIndex = ui->tabInputsView->currentIndex(); - if (tabIndex >= 0) { DeviceUISet *deviceUI = m_deviceUIs[tabIndex]; @@ -315,14 +312,6 @@ void MainWindow::loadPresetSettings(const Preset* preset, int tabIndex) restoreState(preset->getLayout()); } -//void MainWindow::saveSettings() -//{ -// qDebug() << "MainWindow::saveSettings"; -// -// savePresetSettings(m_settings.getWorkingPreset()); -// m_settings.save(); -//} - void MainWindow::savePresetSettings(Preset* preset, int tabIndex) { qDebug("MainWindow::savePresetSettings: preset [%s | %s]", @@ -559,7 +548,6 @@ void MainWindow::on_presetImport_clicked() void MainWindow::on_settingsSave_clicked() { -// saveSettings(); savePresetSettings(m_settings.getWorkingPreset(), ui->tabInputsView->currentIndex()); m_settings.save(); } @@ -661,22 +649,6 @@ void MainWindow::on_action_DV_Serial_triggered(bool checked) } } -//void MainWindow::on_sampleSource_currentIndexChanged(int index) -//{ -// // Do it in the currently selected source tab -// int currentSourceTabIndex = ui->tabInputsSelect->currentIndex(); -// -// if (currentSourceTabIndex >= 0) -// { -// qDebug("MainWindow::on_sampleSource_currentIndexChanged: tab at %d", currentSourceTabIndex); -// DeviceUISet *deviceUI = m_deviceUIs[currentSourceTabIndex]; -// deviceUI->m_deviceAPI->saveSourceSettings(m_settings.getWorkingPreset()); -// m_pluginManager->selectSampleSourceByIndex(deviceUI->m_samplingDeviceControl->getDeviceSelector()->currentIndex(), deviceUI->m_deviceAPI); -// m_settings.setSourceIndex(deviceUI->m_samplingDeviceControl->getDeviceSelector()->currentIndex()); -// deviceUI->m_deviceAPI->loadSourceSettings(m_settings.getWorkingPreset()); -// } -//} - void MainWindow::on_sampleSource_confirmClicked(bool checked) { // Do it in the currently selected source tab @@ -690,7 +662,6 @@ void MainWindow::on_sampleSource_confirmClicked(bool checked) int selectedComboIndex = deviceUI->m_samplingDeviceControl->getDeviceSelector()->currentIndex(); void *devicePtr = deviceUI->m_samplingDeviceControl->getDeviceSelector()->itemData(selectedComboIndex).value(); m_pluginManager->selectSampleSourceByDevice(devicePtr, deviceUI->m_deviceAPI); -// m_pluginManager->selectSampleSourceByIndex(deviceUI->m_samplingDeviceControl->getDeviceSelector()->currentIndex(), deviceUI->m_deviceAPI); m_settings.setSourceIndex(deviceUI->m_samplingDeviceControl->getDeviceSelector()->currentIndex()); deviceUI->m_deviceAPI->loadSourceSettings(m_settings.getWorkingPreset()); } @@ -717,7 +688,6 @@ void MainWindow::on_action_removeDevice_triggered() void MainWindow::on_action_Exit_triggered() { -// saveSettings(); savePresetSettings(m_settings.getWorkingPreset(), 0); m_settings.save(); @@ -731,8 +701,6 @@ void MainWindow::tabInputViewIndexChanged() { int inputViewIndex = ui->tabInputsView->currentIndex(); - //qDebug("MainWindow::tabInputViewIndexChanged: old: %d new: %d", m_masterTabIndex, inputViewIndex); - if ((inputViewIndex >= 0) && (m_masterTabIndex >= 0) && (inputViewIndex != m_masterTabIndex)) { DeviceUISet *deviceUI = m_deviceUIs[inputViewIndex]; diff --git a/sdrbase/mainwindow.h b/sdrbase/mainwindow.h index 0652d1419..ea86d5be6 100644 --- a/sdrbase/mainwindow.h +++ b/sdrbase/mainwindow.h @@ -123,7 +123,6 @@ private: void loadSettings(); void loadPresetSettings(const Preset* preset, int tabIndex); void savePresetSettings(Preset* preset, int tabIndex); -// void saveSettings(); void createStatusBar(); void closeEvent(QCloseEvent*); @@ -149,7 +148,6 @@ private slots: void on_presetTree_itemActivated(QTreeWidgetItem *item, int column); void on_action_Audio_triggered(); void on_action_DV_Serial_triggered(bool checked); -// void on_sampleSource_currentIndexChanged(int index); void on_sampleSource_confirmClicked(bool checked); void on_action_Loaded_Plugins_triggered(); void on_action_About_triggered();