1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-10 10:33:29 -05:00

Massive UI revamping (v7): unify custom widget borders

This commit is contained in:
f4exb 2022-04-10 02:19:26 +02:00
parent 4ff5d241c8
commit 32973132d9
45 changed files with 102 additions and 257 deletions

View File

@ -68,7 +68,8 @@ BladeRF2MIMOGui::BladeRF2MIMOGui(DeviceUISet *deviceUISet, QWidget* parent) :
qDebug("BladeRF2MIMOGui::BladeRF2MIMOGui"); qDebug("BladeRF2MIMOGui::BladeRF2MIMOGui");
setAttribute(Qt::WA_DeleteOnClose, true); setAttribute(Qt::WA_DeleteOnClose, true);
ui->setupUi(getContents()); ui->setupUi(getContents());
getContents()->setStyleSheet("#BladeRF2MIMOGui { border: 1px solid #C06900 }"); getContents()->setStyleSheet(QString(tr("#BladeRF2MIMOGui { border: 1px solid %1 }")
.arg(palette().highlight().color().darker(115).name())));
m_helpURL = "plugins/samplemimo/bladerf2mimo/readme.md"; m_helpURL = "plugins/samplemimo/bladerf2mimo/readme.md";
m_sampleMIMO = (BladeRF2MIMO*) m_deviceUISet->m_deviceAPI->getSampleMIMO(); m_sampleMIMO = (BladeRF2MIMO*) m_deviceUISet->m_deviceAPI->getSampleMIMO();

View File

@ -70,7 +70,8 @@ LimeSDRMIMOGUI::LimeSDRMIMOGUI(DeviceUISet *deviceUISet, QWidget* parent) :
qDebug("LimeSDRMIMOGUI::LimeSDRMIMOGUI"); qDebug("LimeSDRMIMOGUI::LimeSDRMIMOGUI");
setAttribute(Qt::WA_DeleteOnClose, true); setAttribute(Qt::WA_DeleteOnClose, true);
ui->setupUi(getContents()); ui->setupUi(getContents());
getContents()->setStyleSheet("#LimeSDRMIMOGUI { border: 1px solid #C06900 }"); getContents()->setStyleSheet(QString(tr("#LimeSDRMIMOGUI { border: 1px solid %1 }")
.arg(palette().highlight().color().darker(115).name())));
m_helpURL = "plugins/samplemimo/limesdrmimo/readme.md"; m_helpURL = "plugins/samplemimo/limesdrmimo/readme.md";
m_limeSDRMIMO = (LimeSDRMIMO*) m_deviceUISet->m_deviceAPI->getSampleMIMO(); m_limeSDRMIMO = (LimeSDRMIMO*) m_deviceUISet->m_deviceAPI->getSampleMIMO();

View File

@ -58,7 +58,8 @@ MetisMISOGui::MetisMISOGui(DeviceUISet *deviceUISet, QWidget* parent) :
m_txSampleRate = 48000; m_txSampleRate = 48000;
ui->setupUi(getContents()); ui->setupUi(getContents());
getContents()->setStyleSheet("#MetisMISOGui { border: 1px solid #C06900 }"); getContents()->setStyleSheet(QString(tr("#MetisMISOGui { border: 1px solid %1 }")
.arg(palette().highlight().color().darker(115).name())));
m_helpURL = "plugins/samplemimo/metismiso/readme.md"; m_helpURL = "plugins/samplemimo/metismiso/readme.md";
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold)); ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
ui->centerFrequency->setValueRange(7, 0, m_absMaxFreq); ui->centerFrequency->setValueRange(7, 0, m_absMaxFreq);

View File

@ -70,7 +70,8 @@ PlutoSDRMIMOGUI::PlutoSDRMIMOGUI(DeviceUISet *deviceUISet, QWidget* parent) :
qDebug("PlutoSDRMIMOGui::PlutoSDRMIMOGui"); qDebug("PlutoSDRMIMOGui::PlutoSDRMIMOGui");
setAttribute(Qt::WA_DeleteOnClose, true); setAttribute(Qt::WA_DeleteOnClose, true);
ui->setupUi(getContents()); ui->setupUi(getContents());
getContents()->setStyleSheet("#PlutoSDRMIMOGUI { border: 1px solid #C06900 }"); getContents()->setStyleSheet(QString(tr("#PlutoSDRMIMOGUI { border: 1px solid %1 }")
.arg(palette().highlight().color().darker(115).name())));
m_helpURL = "plugins/samplemimo/plutosdrmimo/readme.md"; m_helpURL = "plugins/samplemimo/plutosdrmimo/readme.md";
m_sampleMIMO = (PlutoSDRMIMO*) m_deviceUISet->m_deviceAPI->getSampleMIMO(); m_sampleMIMO = (PlutoSDRMIMO*) m_deviceUISet->m_deviceAPI->getSampleMIMO();

View File

@ -61,7 +61,8 @@ TestMIGui::TestMIGui(DeviceUISet *deviceUISet, QWidget* parent) :
m_deviceSampleRates.push_back(m_settings.m_streams[1].m_sampleRate / (1<<m_settings.m_streams[1].m_log2Decim)); m_deviceSampleRates.push_back(m_settings.m_streams[1].m_sampleRate / (1<<m_settings.m_streams[1].m_log2Decim));
ui->setupUi(getContents()); ui->setupUi(getContents());
getContents()->setStyleSheet("#TestMIGui { border: 1px solid #C06900 }"); getContents()->setStyleSheet(QString(tr("#TestMIGui { border: 1px solid %1 }")
.arg(palette().highlight().color().darker(115).name())));
m_helpURL = "plugins/samplemimo/testmi/readme.md"; m_helpURL = "plugins/samplemimo/testmi/readme.md";
ui->spectrumSource->addItem("0"); ui->spectrumSource->addItem("0");
ui->spectrumSource->addItem("1"); ui->spectrumSource->addItem("1");

View File

@ -51,7 +51,8 @@ TestMOSyncGui::TestMOSyncGui(DeviceUISet *deviceUISet, QWidget* parent) :
{ {
setAttribute(Qt::WA_DeleteOnClose, true); setAttribute(Qt::WA_DeleteOnClose, true);
ui->setupUi(getContents()); ui->setupUi(getContents());
getContents()->setStyleSheet("#TestMOSyncGui { border: 1px solid #C06900 }"); getContents()->setStyleSheet(QString(tr("#TestMOSyncGui { border: 1px solid %1 }")
.arg(palette().highlight().color().darker(115).name())));
m_helpURL = "plugins/samplemimo/testmosync/readme.md"; m_helpURL = "plugins/samplemimo/testmosync/readme.md";
m_sampleMIMO = (TestMOSync*) m_deviceUISet->m_deviceAPI->getSampleMIMO(); m_sampleMIMO = (TestMOSync*) m_deviceUISet->m_deviceAPI->getSampleMIMO();

View File

@ -67,7 +67,8 @@ XTRXMIMOGUI::XTRXMIMOGUI(DeviceUISet *deviceUISet, QWidget* parent) :
qDebug("XTRXMIMOGUI::XTRXMIMOGUI"); qDebug("XTRXMIMOGUI::XTRXMIMOGUI");
setAttribute(Qt::WA_DeleteOnClose, true); setAttribute(Qt::WA_DeleteOnClose, true);
ui->setupUi(getContents()); ui->setupUi(getContents());
getContents()->setStyleSheet("#XTRXMIMOGUI { border: 1px solid #C06900 }"); getContents()->setStyleSheet(QString(tr("#XTRXMIMOGUI { border: 1px solid %1 }")
.arg(palette().highlight().color().darker(115).name())));
m_helpURL = "plugins/samplemimo/xtrxmimo/readme.md"; m_helpURL = "plugins/samplemimo/xtrxmimo/readme.md";
m_xtrxMIMO = (XTRXMIMO*) m_deviceUISet->m_deviceAPI->getSampleMIMO(); m_xtrxMIMO = (XTRXMIMO*) m_deviceUISet->m_deviceAPI->getSampleMIMO();

View File

@ -44,7 +44,8 @@ AudioOutputGui::AudioOutputGui(DeviceUISet *deviceUISet, QWidget* parent) :
m_audioOutput = (AudioOutput*) m_deviceUISet->m_deviceAPI->getSampleSink(); m_audioOutput = (AudioOutput*) m_deviceUISet->m_deviceAPI->getSampleSink();
ui->setupUi(getContents()); ui->setupUi(getContents());
getContents()->setStyleSheet("#AudioOutputGui { border: 1px solid #C06900 }"); getContents()->setStyleSheet(QString(tr("#AudioOutputGui { border: 1px solid %1 }")
.arg(palette().highlight().color().darker(115).name())));
m_helpURL = "plugins/samplesink/audiooutput/readme.md"; m_helpURL = "plugins/samplesink/audiooutput/readme.md";
connect(&m_updateTimer, SIGNAL(timeout()), this, SLOT(updateHardware())); connect(&m_updateTimer, SIGNAL(timeout()), this, SLOT(updateHardware()));

View File

@ -47,7 +47,8 @@ Bladerf1OutputGui::Bladerf1OutputGui(DeviceUISet *deviceUISet, QWidget* parent)
m_deviceSampleSink = (Bladerf1Output*) m_deviceUISet->m_deviceAPI->getSampleSink(); m_deviceSampleSink = (Bladerf1Output*) m_deviceUISet->m_deviceAPI->getSampleSink();
ui->setupUi(getContents()); ui->setupUi(getContents());
getContents()->setStyleSheet("#Bladerf1OutputGui { border: 1px solid #C06900 }"); getContents()->setStyleSheet(QString(tr("#Bladerf1OutputGui { border: 1px solid %1 }")
.arg(palette().highlight().color().darker(115).name())));
m_helpURL = "/plugins/samplesink/bladerf1output/readme.md"; ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold)); m_helpURL = "/plugins/samplesink/bladerf1output/readme.md"; ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
ui->centerFrequency->setValueRange(7, BLADERF_FREQUENCY_MIN_XB200/1000, BLADERF_FREQUENCY_MAX/1000); ui->centerFrequency->setValueRange(7, BLADERF_FREQUENCY_MIN_XB200/1000, BLADERF_FREQUENCY_MAX/1000);

View File

@ -50,7 +50,8 @@ BladeRF2OutputGui::BladeRF2OutputGui(DeviceUISet *deviceUISet, QWidget* parent)
uint64_t f_min, f_max; uint64_t f_min, f_max;
ui->setupUi(getContents()); ui->setupUi(getContents());
getContents()->setStyleSheet("#BladeRF2OutputGui { border: 1px solid #C06900 }"); getContents()->setStyleSheet(QString(tr("#BladeRF2OutputGui { border: 1px solid %1 }")
.arg(palette().highlight().color().darker(115).name())));
m_helpURL = "plugins/samplesink/bladerf2output/readme.md"; ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold)); m_helpURL = "plugins/samplesink/bladerf2output/readme.md"; ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
m_sampleSink->getFrequencyRange(f_min, f_max, step, scale); m_sampleSink->getFrequencyRange(f_min, f_max, step, scale);

View File

@ -53,7 +53,8 @@ FileOutputGui::FileOutputGui(DeviceUISet *deviceUISet, QWidget* parent) :
{ {
setAttribute(Qt::WA_DeleteOnClose, true); setAttribute(Qt::WA_DeleteOnClose, true);
ui->setupUi(getContents()); ui->setupUi(getContents());
getContents()->setStyleSheet("#FileOutputGui { border: 1px solid #C06900 }"); getContents()->setStyleSheet(QString(tr("#FileOutputGui { border: 1px solid %1 }")
.arg(palette().highlight().color().darker(115).name())));
m_helpURL = "plugins/samplesink/fileoutput/readme.md"; m_helpURL = "plugins/samplesink/fileoutput/readme.md";
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold)); ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));

View File

@ -49,7 +49,8 @@ HackRFOutputGui::HackRFOutputGui(DeviceUISet *deviceUISet, QWidget* parent) :
m_deviceSampleSink = (HackRFOutput*) m_deviceUISet->m_deviceAPI->getSampleSink(); m_deviceSampleSink = (HackRFOutput*) m_deviceUISet->m_deviceAPI->getSampleSink();
ui->setupUi(getContents()); ui->setupUi(getContents());
getContents()->setStyleSheet("#HackRFOutputGui { border: 1px solid #C06900 }"); getContents()->setStyleSheet(QString(tr("#HackRFOutputGui { border: 1px solid %1 }")
.arg(palette().highlight().color().darker(115).name())));
m_helpURL = "plugins/samplesink/hackrfoutput/readme.md"; m_helpURL = "plugins/samplesink/hackrfoutput/readme.md";
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold)); ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
ui->centerFrequency->setValueRange(7, 0U, 7250000U); ui->centerFrequency->setValueRange(7, 0U, 7250000U);

View File

@ -46,7 +46,8 @@ LimeSDROutputGUI::LimeSDROutputGUI(DeviceUISet *deviceUISet, QWidget* parent) :
m_limeSDROutput = (LimeSDROutput*) m_deviceUISet->m_deviceAPI->getSampleSink(); m_limeSDROutput = (LimeSDROutput*) m_deviceUISet->m_deviceAPI->getSampleSink();
ui->setupUi(getContents()); ui->setupUi(getContents());
getContents()->setStyleSheet("#LimeSDROutputGUI { border: 1px solid #C06900 }"); getContents()->setStyleSheet(QString(tr("#LimeSDROutputGUI { border: 1px solid %1 }")
.arg(palette().highlight().color().darker(115).name())));
m_helpURL = "plugins/samplesink/limesdroutput/readme.md"; m_helpURL = "plugins/samplesink/limesdroutput/readme.md";
float minF, maxF; float minF, maxF;

View File

@ -63,7 +63,8 @@ LocalOutputGui::LocalOutputGui(DeviceUISet *deviceUISet, QWidget* parent) :
m_paletteWhiteText.setColor(QPalette::WindowText, Qt::white); m_paletteWhiteText.setColor(QPalette::WindowText, Qt::white);
ui->setupUi(getContents()); ui->setupUi(getContents());
getContents()->setStyleSheet("#LocalOutputGui { border: 1px solid #C06900 }"); getContents()->setStyleSheet(QString(tr("#LocalOutputGui { border: 1px solid %1 }")
.arg(palette().highlight().color().darker(115).name())));
m_helpURL = "plugins/samplesink/localoutput/readme.md"; m_helpURL = "plugins/samplesink/localoutput/readme.md";
CRightClickEnabler *startStopRightClickEnabler = new CRightClickEnabler(ui->startStop); CRightClickEnabler *startStopRightClickEnabler = new CRightClickEnabler(ui->startStop);

View File

@ -49,7 +49,8 @@ PlutoSDROutputGUI::PlutoSDROutputGUI(DeviceUISet *deviceUISet, QWidget* parent)
m_sampleSink = (PlutoSDROutput*) m_deviceUISet->m_deviceAPI->getSampleSink(); m_sampleSink = (PlutoSDROutput*) m_deviceUISet->m_deviceAPI->getSampleSink();
ui->setupUi(getContents()); ui->setupUi(getContents());
getContents()->setStyleSheet("#PlutoSDROutputGUI { border: 1px solid #C06900 }"); getContents()->setStyleSheet(QString(tr("#PlutoSDROutputGUI { border: 1px solid %1 }")
.arg(palette().highlight().color().darker(115).name())));
m_helpURL = "plugins/samplesink/plutosdroutput/readme.md"; m_helpURL = "plugins/samplesink/plutosdroutput/readme.md";
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold)); ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
updateFrequencyLimits(); updateFrequencyLimits();

View File

@ -68,7 +68,8 @@ RemoteOutputSinkGui::RemoteOutputSinkGui(DeviceUISet *deviceUISet, QWidget* pare
m_paletteWhiteText.setColor(QPalette::WindowText, Qt::white); m_paletteWhiteText.setColor(QPalette::WindowText, Qt::white);
ui->setupUi(getContents()); ui->setupUi(getContents());
getContents()->setStyleSheet("#RemoteOutputGui { border: 1px solid #C06900 }"); getContents()->setStyleSheet(QString(tr("#RemoteOutputGui { border: 1px solid %1 }")
.arg(palette().highlight().color().darker(115).name())));
m_helpURL = "plugins/samplesink/remoteoutput/readme.md"; m_helpURL = "plugins/samplesink/remoteoutput/readme.md";
connect(&(m_deviceUISet->m_deviceAPI->getMasterTimer()), SIGNAL(timeout()), this, SLOT(tick())); connect(&(m_deviceUISet->m_deviceAPI->getMasterTimer()), SIGNAL(timeout()), this, SLOT(tick()));

View File

@ -60,7 +60,8 @@ SoapySDROutputGui::SoapySDROutputGui(DeviceUISet *deviceUISet, QWidget* parent)
setAttribute(Qt::WA_DeleteOnClose, true); setAttribute(Qt::WA_DeleteOnClose, true);
m_sampleSink = (SoapySDROutput*) m_deviceUISet->m_deviceAPI->getSampleSink(); m_sampleSink = (SoapySDROutput*) m_deviceUISet->m_deviceAPI->getSampleSink();
ui->setupUi(getContents()); ui->setupUi(getContents());
getContents()->setStyleSheet("#SoapySDROutputGui { border: 1px solid #C06900 }"); getContents()->setStyleSheet(QString(tr("#SoapySDROutputGui { border: 1px solid %1 }")
.arg(palette().highlight().color().darker(115).name())));
m_helpURL = "plugins/samplesink/soapysdroutput/readme.md"; m_helpURL = "plugins/samplesink/soapysdroutput/readme.md";
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold)); ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));

View File

@ -50,7 +50,8 @@ TestSinkGui::TestSinkGui(DeviceUISet *deviceUISet, QWidget* parent) :
{ {
setAttribute(Qt::WA_DeleteOnClose, true); setAttribute(Qt::WA_DeleteOnClose, true);
ui->setupUi(getContents()); ui->setupUi(getContents());
getContents()->setStyleSheet("#TestSinkGui { border: 1px solid #C06900 }"); getContents()->setStyleSheet(QString(tr("#TestSinkGui { border: 1px solid %1 }")
.arg(palette().highlight().color().darker(115).name())));
m_helpURL = "plugins/samplesink/testsink/readme.md"; m_helpURL = "plugins/samplesink/testsink/readme.md";
m_sampleSink = (TestSinkOutput*) m_deviceUISet->m_deviceAPI->getSampleSink(); m_sampleSink = (TestSinkOutput*) m_deviceUISet->m_deviceAPI->getSampleSink();

View File

@ -47,7 +47,8 @@ USRPOutputGUI::USRPOutputGUI(DeviceUISet *deviceUISet, QWidget* parent) :
m_usrpOutput = (USRPOutput*) m_deviceUISet->m_deviceAPI->getSampleSink(); m_usrpOutput = (USRPOutput*) m_deviceUISet->m_deviceAPI->getSampleSink();
ui->setupUi(getContents()); ui->setupUi(getContents());
getContents()->setStyleSheet("#USRPOutputGUI { border: 1px solid #C06900 }"); getContents()->setStyleSheet(QString(tr("#USRPOutputGUI { border: 1px solid %1 }")
.arg(palette().highlight().color().darker(115).name())));
m_helpURL = "plugins/samplesink/usrpoutput/readme.md"; m_helpURL = "plugins/samplesink/usrpoutput/readme.md";
float minF, maxF; float minF, maxF;

View File

@ -48,7 +48,8 @@ XTRXOutputGUI::XTRXOutputGUI(DeviceUISet *deviceUISet, QWidget* parent) :
m_XTRXOutput = (XTRXOutput*) m_deviceUISet->m_deviceAPI->getSampleSink(); m_XTRXOutput = (XTRXOutput*) m_deviceUISet->m_deviceAPI->getSampleSink();
ui->setupUi(getContents()); ui->setupUi(getContents());
getContents()->setStyleSheet("#XTRXOutputGUI { border: 1px solid #C06900 }"); getContents()->setStyleSheet(QString(tr("#XTRXOutputGUI { border: 1px solid %1 }")
.arg(palette().highlight().color().darker(115).name())));
m_helpURL = "plugins/samplesink/xtrxoutput/readme.md"; m_helpURL = "plugins/samplesink/xtrxoutput/readme.md";
float minF, maxF, stepF; float minF, maxF, stepF;

View File

@ -48,7 +48,8 @@ AirspyGui::AirspyGui(DeviceUISet *deviceUISet, QWidget* parent) :
m_sampleSource = (AirspyInput*) m_deviceUISet->m_deviceAPI->getSampleSource(); m_sampleSource = (AirspyInput*) m_deviceUISet->m_deviceAPI->getSampleSource();
ui->setupUi(getContents()); ui->setupUi(getContents());
getContents()->setStyleSheet("#AirspyGui { border: 1px solid #C06900 }"); getContents()->setStyleSheet(QString(tr("#AirspyGui { border: 1px solid %1 }")
.arg(palette().highlight().color().darker(115).name())));
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold)); ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
updateFrequencyLimits(); updateFrequencyLimits();

View File

@ -47,7 +47,8 @@ AirspyHFGui::AirspyHFGui(DeviceUISet *deviceUISet, QWidget* parent) :
m_sampleSource = (AirspyHFInput*) m_deviceUISet->m_deviceAPI->getSampleSource(); m_sampleSource = (AirspyHFInput*) m_deviceUISet->m_deviceAPI->getSampleSource();
ui->setupUi(getContents()); ui->setupUi(getContents());
getContents()->setStyleSheet("#AirspyHFGui { border: 1px solid #C06900 }"); getContents()->setStyleSheet(QString(tr("#AirspyHFGui { border: 1px solid %1 }")
.arg(palette().highlight().color().darker(115).name())));
m_helpURL = "plugins/samplesource/airspyhf/readme.md"; m_helpURL = "plugins/samplesource/airspyhf/readme.md";
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold)); ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
updateFrequencyLimits(); updateFrequencyLimits();

View File

@ -44,7 +44,8 @@ AudioInputGui::AudioInputGui(DeviceUISet *deviceUISet, QWidget* parent) :
m_sampleSource = (AudioInput*) m_deviceUISet->m_deviceAPI->getSampleSource(); m_sampleSource = (AudioInput*) m_deviceUISet->m_deviceAPI->getSampleSource();
ui->setupUi(getContents()); ui->setupUi(getContents());
getContents()->setStyleSheet("#AudioInputGui { border: 1px solid #C06900 }"); getContents()->setStyleSheet(QString(tr("#AudioInputGui { border: 1px solid %1 }")
.arg(palette().highlight().color().darker(115).name())));
m_helpURL = "plugins/samplesource/audioinput/readme.md"; m_helpURL = "plugins/samplesource/audioinput/readme.md";
connect(&m_updateTimer, SIGNAL(timeout()), this, SLOT(updateHardware())); connect(&m_updateTimer, SIGNAL(timeout()), this, SLOT(updateHardware()));

View File

@ -49,7 +49,8 @@ Bladerf1InputGui::Bladerf1InputGui(DeviceUISet *deviceUISet, QWidget* parent) :
m_sampleSource = (Bladerf1Input*) m_deviceUISet->m_deviceAPI->getSampleSource(); m_sampleSource = (Bladerf1Input*) m_deviceUISet->m_deviceAPI->getSampleSource();
ui->setupUi(getContents()); ui->setupUi(getContents());
getContents()->setStyleSheet("#Bladerf1InputGui { border: 1px solid #C06900 }"); getContents()->setStyleSheet(QString(tr("#Bladerf1InputGui { border: 1px solid %1 }")
.arg(palette().highlight().color().darker(115).name())));
m_helpURL = "plugins/samplesource/bladerf1input/readme.md"; m_helpURL = "plugins/samplesource/bladerf1input/readme.md";
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold)); ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
ui->centerFrequency->setValueRange(7, BLADERF_FREQUENCY_MIN_XB200/1000, BLADERF_FREQUENCY_MAX/1000); ui->centerFrequency->setValueRange(7, BLADERF_FREQUENCY_MIN_XB200/1000, BLADERF_FREQUENCY_MAX/1000);

View File

@ -52,7 +52,8 @@ BladeRF2InputGui::BladeRF2InputGui(DeviceUISet *deviceUISet, QWidget* parent) :
uint64_t f_min, f_max; uint64_t f_min, f_max;
ui->setupUi(getContents()); ui->setupUi(getContents());
getContents()->setStyleSheet("#Bladerf2InputGui { border: 1px solid #C06900 }"); getContents()->setStyleSheet(QString(tr("#Bladerf2InputGui { border: 1px solid %1 }")
.arg(palette().highlight().color().darker(115).name())));
m_helpURL = "plugins/samplesource/bladerf2input/readme.md"; m_helpURL = "plugins/samplesource/bladerf2input/readme.md";
m_sampleSource->getFrequencyRange(f_min, f_max, step, scale); m_sampleSource->getFrequencyRange(f_min, f_max, step, scale);

View File

@ -45,7 +45,8 @@ FCDProGui::FCDProGui(DeviceUISet *deviceUISet, QWidget* parent) :
m_sampleSource = (FCDProInput*) m_deviceUISet->m_deviceAPI->getSampleSource(); m_sampleSource = (FCDProInput*) m_deviceUISet->m_deviceAPI->getSampleSource();
ui->setupUi(getContents()); ui->setupUi(getContents());
getContents()->setStyleSheet("#FCDProGui { border: 1px solid #C06900 }"); getContents()->setStyleSheet(QString(tr("#FCDProGui { border: 1px solid %1 }")
.arg(palette().highlight().color().darker(115).name())));
m_helpURL = "plugins/samplesource/fcdpro/readme.md"; m_helpURL = "plugins/samplesource/fcdpro/readme.md";
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold)); ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
updateFrequencyLimits(); updateFrequencyLimits();

View File

@ -46,7 +46,8 @@ FCDProPlusGui::FCDProPlusGui(DeviceUISet *deviceUISet, QWidget* parent) :
m_sampleSource = (FCDProPlusInput*) m_deviceUISet->m_deviceAPI->getSampleSource(); m_sampleSource = (FCDProPlusInput*) m_deviceUISet->m_deviceAPI->getSampleSource();
ui->setupUi(getContents()); ui->setupUi(getContents());
getContents()->setStyleSheet("#FCDProPlusGui { border: 1px solid #C06900 }"); getContents()->setStyleSheet(QString(tr("#FCDProPlusGui { border: 1px solid %1 }")
.arg(palette().highlight().color().darker(115).name())));
m_helpURL = "plugins/samplesource/fcdproplus/readme.md"; m_helpURL = "plugins/samplesource/fcdproplus/readme.md";
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold)); ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));

View File

@ -57,7 +57,8 @@ FileInputGUI::FileInputGUI(DeviceUISet *deviceUISet, QWidget* parent) :
{ {
setAttribute(Qt::WA_DeleteOnClose, true); setAttribute(Qt::WA_DeleteOnClose, true);
ui->setupUi(getContents()); ui->setupUi(getContents());
getContents()->setStyleSheet("#FileInputGUI { border: 1px solid #C06900 }"); getContents()->setStyleSheet(QString(tr("#FileInputGUI { border: 1px solid %1 }")
.arg(palette().highlight().color().darker(115).name())));
m_helpURL = "plugins/samplesource/fileinput/readme.md"; m_helpURL = "plugins/samplesource/fileinput/readme.md";
ui->crcLabel->setStyleSheet("QLabel { background:rgb(79,79,79); }"); ui->crcLabel->setStyleSheet("QLabel { background:rgb(79,79,79); }");

View File

@ -50,7 +50,8 @@ HackRFInputGui::HackRFInputGui(DeviceUISet *deviceUISet, QWidget* parent) :
m_sampleSource = (HackRFInput*) m_deviceUISet->m_deviceAPI->getSampleSource(); m_sampleSource = (HackRFInput*) m_deviceUISet->m_deviceAPI->getSampleSource();
ui->setupUi(getContents()); ui->setupUi(getContents());
getContents()->setStyleSheet("#HackRFInputGui { border: 1px solid #C06900 }"); getContents()->setStyleSheet(QString(tr("#HackRFInputGui { border: 1px solid %1 }")
.arg(palette().highlight().color().darker(115).name())));
m_helpURL = "plugins/samplesource/hackrfinput/readme.md"; m_helpURL = "plugins/samplesource/hackrfinput/readme.md";
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold)); ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
ui->centerFrequency->setValueRange(7, 0U, 7250000U); ui->centerFrequency->setValueRange(7, 0U, 7250000U);

View File

@ -68,7 +68,8 @@ KiwiSDRGui::KiwiSDRGui(DeviceUISet *deviceUISet, QWidget* parent) :
m_statusColors.push_back("rgb(232, 85, 232)"); // Disconnected (magenta) m_statusColors.push_back("rgb(232, 85, 232)"); // Disconnected (magenta)
ui->setupUi(getContents()); ui->setupUi(getContents());
getContents()->setStyleSheet("#KiwiSDRGui { border: 1px solid #C06900 }"); getContents()->setStyleSheet(QString(tr("#KiwiSDRGui { border: 1px solid %1 }")
.arg(palette().highlight().color().darker(115).name())));
m_helpURL = "plugins/samplesource/kiwisdr/readme.md"; m_helpURL = "plugins/samplesource/kiwisdr/readme.md";
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold)); ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
ui->centerFrequency->setValueRange(7, 0, 9999999); ui->centerFrequency->setValueRange(7, 0, 9999999);

View File

@ -50,7 +50,8 @@ LimeSDRInputGUI::LimeSDRInputGUI(DeviceUISet *deviceUISet, QWidget* parent) :
m_limeSDRInput = (LimeSDRInput*) m_deviceUISet->m_deviceAPI->getSampleSource(); m_limeSDRInput = (LimeSDRInput*) m_deviceUISet->m_deviceAPI->getSampleSource();
ui->setupUi(getContents()); ui->setupUi(getContents());
getContents()->setStyleSheet("#LimeSDRInputGUI { border: 1px solid #C06900 }"); getContents()->setStyleSheet(QString(tr("#LimeSDRInputGUI { border: 1px solid %1 }")
.arg(palette().highlight().color().darker(115).name())));
m_helpURL = "plugins/samplesource/limesdrinput/readme.md"; m_helpURL = "plugins/samplesource/limesdrinput/readme.md";
float minF, maxF; float minF, maxF;

View File

@ -76,7 +76,8 @@ LocalInputGui::LocalInputGui(DeviceUISet *deviceUISet, QWidget* parent) :
m_startingTimeStampms = 0; m_startingTimeStampms = 0;
ui->setupUi(getContents()); ui->setupUi(getContents());
getContents()->setStyleSheet("#LocalInputGui { border: 1px solid #C06900 }"); getContents()->setStyleSheet(QString(tr("#LocalInputGui { border: 1px solid %1 }")
.arg(palette().highlight().color().darker(115).name())));
m_helpURL = "plugins/samplesource/localinput/readme.md"; m_helpURL = "plugins/samplesource/localinput/readme.md";
CRightClickEnabler *startStopRightClickEnabler = new CRightClickEnabler(ui->startStop); CRightClickEnabler *startStopRightClickEnabler = new CRightClickEnabler(ui->startStop);

View File

@ -45,7 +45,8 @@ PerseusGui::PerseusGui(DeviceUISet *deviceUISet, QWidget* parent) :
m_sampleSource = (PerseusInput*) m_deviceUISet->m_deviceAPI->getSampleSource(); m_sampleSource = (PerseusInput*) m_deviceUISet->m_deviceAPI->getSampleSource();
ui->setupUi(getContents()); ui->setupUi(getContents());
getContents()->setStyleSheet("#PerseusGui { border: 1px solid #C06900 }"); getContents()->setStyleSheet(QString(tr("#PerseusGui { border: 1px solid %1 }")
.arg(palette().highlight().color().darker(115).name())));
m_helpURL = "plugins/samplesource/perseus/readme.md"; m_helpURL = "plugins/samplesource/perseus/readme.md";
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold)); ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
updateFrequencyLimits(); updateFrequencyLimits();

View File

@ -50,7 +50,8 @@ PlutoSDRInputGui::PlutoSDRInputGui(DeviceUISet *deviceUISet, QWidget* parent) :
m_sampleSource = (PlutoSDRInput*) m_deviceUISet->m_deviceAPI->getSampleSource(); m_sampleSource = (PlutoSDRInput*) m_deviceUISet->m_deviceAPI->getSampleSource();
ui->setupUi(getContents()); ui->setupUi(getContents());
getContents()->setStyleSheet("#PlutoSDRInputGUI { border: 1px solid #C06900 }"); getContents()->setStyleSheet(QString(tr("#PlutoSDRInputGUI { border: 1px solid %1 }")
.arg(palette().highlight().color().darker(115).name())));
m_helpURL = "plugins/samplesource/plutosdrinput/readme.md"; m_helpURL = "plugins/samplesource/plutosdrinput/readme.md";
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold)); ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
updateFrequencyLimits(); updateFrequencyLimits();

View File

@ -73,7 +73,8 @@ RemoteInputGui::RemoteInputGui(DeviceUISet *deviceUISet, QWidget* parent) :
m_startingTimeStampms = 0; m_startingTimeStampms = 0;
ui->setupUi(getContents()); ui->setupUi(getContents());
getContents()->setStyleSheet("#RemoteInputGui { border: 1px solid #C06900 }"); getContents()->setStyleSheet(QString(tr("#RemoteInputGui { border: 1px solid %1 }")
.arg(palette().highlight().color().darker(115).name())));
m_helpURL = "plugins/samplesource/remoteinput/readme.md"; m_helpURL = "plugins/samplesource/remoteinput/readme.md";
ui->remoteDeviceFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold)); ui->remoteDeviceFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));

View File

@ -47,7 +47,9 @@ RTLSDRGui::RTLSDRGui(DeviceUISet *deviceUISet, QWidget* parent) :
m_sampleSource = (RTLSDRInput*) m_deviceUISet->m_deviceAPI->getSampleSource(); m_sampleSource = (RTLSDRInput*) m_deviceUISet->m_deviceAPI->getSampleSource();
ui->setupUi(getContents()); ui->setupUi(getContents());
getContents()->setStyleSheet("#RTLSDRGui { border: 1px solid #C06900 }"); QString s(tr(""));
getContents()->setStyleSheet(QString(tr("#RTLSDRGui { border: 1px solid %1 }")
.arg(palette().highlight().color().darker(115).name())));
m_helpURL = "plugins/samplesource/rtlsdr/readme.md"; m_helpURL = "plugins/samplesource/rtlsdr/readme.md";
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold)); ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
updateFrequencyLimits(); updateFrequencyLimits();

View File

@ -44,7 +44,8 @@ SDRPlayGui::SDRPlayGui(DeviceUISet *deviceUISet, QWidget* parent) :
m_sampleSource = (SDRPlayInput*) m_deviceUISet->m_deviceAPI->getSampleSource(); m_sampleSource = (SDRPlayInput*) m_deviceUISet->m_deviceAPI->getSampleSource();
ui->setupUi(getContents()); ui->setupUi(getContents());
getContents()->setStyleSheet("#SDRPlayGui { border: 1px solid #C06900 }"); getContents()->setStyleSheet(QString(tr("#SDRPlayGui { border: 1px solid %1 }")
.arg(palette().highlight().color().darker(115).name())));
m_helpURL = "plugins/samplesource/sdrplay/readme.md"; m_helpURL = "plugins/samplesource/sdrplay/readme.md";
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold)); ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
ui->centerFrequency->setValueRange(7, 10U, 12000U); ui->centerFrequency->setValueRange(7, 10U, 12000U);

View File

@ -44,7 +44,8 @@ SDRPlayV3Gui::SDRPlayV3Gui(DeviceUISet *deviceUISet, QWidget* parent) :
m_sdrPlayV3Input = (SDRPlayV3Input*) m_deviceUISet->m_deviceAPI->getSampleSource(); m_sdrPlayV3Input = (SDRPlayV3Input*) m_deviceUISet->m_deviceAPI->getSampleSource();
ui->setupUi(getContents()); ui->setupUi(getContents());
getContents()->setStyleSheet("#SDRPlayV3Gui { border: 1px solid #C06900 }"); getContents()->setStyleSheet(QString(tr("#SDRPlayV3Gui { border: 1px solid %1 }")
.arg(palette().highlight().color().darker(115).name())));
m_helpURL = "plugins/samplesource/sdrplayv3/readme.md"; m_helpURL = "plugins/samplesource/sdrplayv3/readme.md";
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold)); ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
updateFrequencyLimits(); updateFrequencyLimits();

View File

@ -63,7 +63,8 @@ SigMFFileInputGUI::SigMFFileInputGUI(DeviceUISet *deviceUISet, QWidget* parent)
{ {
setAttribute(Qt::WA_DeleteOnClose, true); setAttribute(Qt::WA_DeleteOnClose, true);
ui->setupUi(getContents()); ui->setupUi(getContents());
getContents()->setStyleSheet("#SigMFFileInputGUI { border: 1px solid #C06900 }"); getContents()->setStyleSheet(QString(tr("#SigMFFileInputGUI { border: 1px solid %1 }")
.arg(palette().highlight().color().darker(115).name())));
m_helpURL = "plugins/samplesource/sigmffileinput/readme.md"; m_helpURL = "plugins/samplesource/sigmffileinput/readme.md";
ui->fileNameText->setText(m_metaFileName); ui->fileNameText->setText(m_metaFileName);

View File

@ -62,7 +62,8 @@ SoapySDRInputGui::SoapySDRInputGui(DeviceUISet *deviceUISet, QWidget* parent) :
setAttribute(Qt::WA_DeleteOnClose, true); setAttribute(Qt::WA_DeleteOnClose, true);
m_sampleSource = (SoapySDRInput*) m_deviceUISet->m_deviceAPI->getSampleSource(); m_sampleSource = (SoapySDRInput*) m_deviceUISet->m_deviceAPI->getSampleSource();
ui->setupUi(getContents()); ui->setupUi(getContents());
getContents()->setStyleSheet("#SoapySDRInputGui { border: 1px solid #C06900 }"); getContents()->setStyleSheet(QString(tr("#SoapySDRInputGui { border: 1px solid %1 }")
.arg(palette().highlight().color().darker(115).name())));
m_helpURL = "plugins/samplesource/soapysdrinput/readme.md"; m_helpURL = "plugins/samplesource/soapysdrinput/readme.md";
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold)); ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));

View File

@ -55,7 +55,8 @@ TestSourceGui::TestSourceGui(DeviceUISet *deviceUISet, QWidget* parent) :
m_sampleSource = m_deviceUISet->m_deviceAPI->getSampleSource(); m_sampleSource = m_deviceUISet->m_deviceAPI->getSampleSource();
ui->setupUi(getContents()); ui->setupUi(getContents());
getContents()->setStyleSheet("#TestSourceGui { border: 1px solid #C06900 }"); getContents()->setStyleSheet(QString(tr("#TestSourceGui { border: 1px solid %1 }")
.arg(palette().highlight().color().darker(115).name())));
m_helpURL = "plugins/samplesource/testsource/readme.md"; m_helpURL = "plugins/samplesource/testsource/readme.md";
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold)); ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
ui->centerFrequency->setValueRange(7, 0, 9999999); ui->centerFrequency->setValueRange(7, 0, 9999999);

View File

@ -51,7 +51,8 @@ USRPInputGUI::USRPInputGUI(DeviceUISet *deviceUISet, QWidget* parent) :
m_usrpInput = (USRPInput*) m_deviceUISet->m_deviceAPI->getSampleSource(); m_usrpInput = (USRPInput*) m_deviceUISet->m_deviceAPI->getSampleSource();
ui->setupUi(getContents()); ui->setupUi(getContents());
getContents()->setStyleSheet("#USRPInputGUI { border: 1px solid #C06900 }"); getContents()->setStyleSheet(QString(tr("#USRPInputGUI { border: 1px solid %1 }")
.arg(palette().highlight().color().darker(115).name())));
m_helpURL = "plugins/samplesource/usrpinput/readme.md"; m_helpURL = "plugins/samplesource/usrpinput/readme.md";
float minF, maxF; float minF, maxF;

View File

@ -51,7 +51,8 @@ XTRXInputGUI::XTRXInputGUI(DeviceUISet *deviceUISet, QWidget* parent) :
m_XTRXInput = (XTRXInput*) m_deviceUISet->m_deviceAPI->getSampleSource(); m_XTRXInput = (XTRXInput*) m_deviceUISet->m_deviceAPI->getSampleSource();
ui->setupUi(getContents()); ui->setupUi(getContents());
getContents()->setStyleSheet("#XTRXInputGUI { border: 1px solid #C06900 }"); getContents()->setStyleSheet(QString(tr("#XTRXInputGUI { border: 1px solid %1 }")
.arg(palette().highlight().color().darker(115).name())));
m_helpURL = "plugins/samplesource/xtrxinput/readme.md"; m_helpURL = "plugins/samplesource/xtrxinput/readme.md";
float minF, maxF, stepF; float minF, maxF, stepF;

View File

@ -41,44 +41,6 @@ RollupContents::RollupContents(QWidget* parent) :
setAttribute(Qt::WA_OpaquePaintEvent, true); setAttribute(Qt::WA_OpaquePaintEvent, true);
} }
// QByteArray RollupWidget::saveState(int version) const
// {
// QByteArray state;
// QDataStream stream(&state, QIODevice::WriteOnly);
// int count = 0;
// for (int i = 0; i < children().count(); ++i)
// {
// QWidget* r = qobject_cast<QWidget*>(children()[i]);
// if (r) {
// count++;
// }
// }
// stream << VersionMarker;
// stream << version;
// stream << count;
// for (int i = 0; i < children().count(); ++i)
// {
// QWidget* r = qobject_cast<QWidget*>(children()[i]);
// if (r)
// {
// stream << r->objectName();
// if (r->isHidden()) {
// stream << (int) 0;
// } else {
// stream << (int) 1;
// }
// }
// }
// return state;
// }
void RollupContents::saveState(RollupState &state) const void RollupContents::saveState(RollupState &state) const
{ {
QList<RollupState::RollupChildState>& childrenStates = state.getChildren(); QList<RollupState::RollupChildState>& childrenStates = state.getChildren();
@ -94,64 +56,6 @@ void RollupContents::saveState(RollupState &state) const
} }
} }
// bool RollupWidget::restoreState(const QByteArray& state, int version)
// {
// if (state.isEmpty()) {
// return false;
// }
// QByteArray sd = state;
// QDataStream stream(&sd, QIODevice::ReadOnly);
// int marker, v;
// stream >> marker;
// stream >> v;
// if ((stream.status() != QDataStream::Ok) || (marker != VersionMarker) || (v != version)) {
// return false;
// }
// int count;
// stream >> count;
// if (stream.status() != QDataStream::Ok) {
// return false;
// }
// for (int i = 0; i < count; ++i)
// {
// QString name;
// int visible;
// stream >> name;
// stream >> visible;
// if (stream.status() != QDataStream::Ok) {
// return false;
// }
// for (int j = 0; j < children().count(); ++j)
// {
// QWidget* r = qobject_cast<QWidget*>(children()[j]);
// if (r)
// {
// if (r->objectName() == name)
// {
// if (visible) {
// r->show();
// } else {
// r->hide();
// }
// break;
// }
// }
// }
// }
// return true;
// }
void RollupContents::restoreState(const RollupState& state) void RollupContents::restoreState(const RollupState& state)
{ {
const QList<RollupState::RollupChildState>& childrenStates = state.getChildren(); const QList<RollupState::RollupChildState>& childrenStates = state.getChildren();
@ -284,7 +188,7 @@ int RollupContents::arrangeRollups()
void RollupContents::paintEvent(QPaintEvent*) void RollupContents::paintEvent(QPaintEvent*)
{ {
QPainter p(this); QPainter p(this);
QColor frame = palette().highlight().color(); QColor frameColor = palette().highlight().color().darker(115);
// Eigenbau // Eigenbau
QFontMetrics fm(font()); QFontMetrics fm(font());
@ -292,82 +196,20 @@ void RollupContents::paintEvent(QPaintEvent*)
p.setRenderHint(QPainter::Antialiasing, true); p.setRenderHint(QPainter::Antialiasing, true);
// Ecken (corners) // Ecken (corners)
p.setPen(Qt::NoPen); // p.setPen(Qt::NoPen);
p.setBrush(palette().base()); // p.setBrush(palette().base());
p.drawRect(0, 0, 5, 5); // p.drawRect(0, 0, 5, 5);
p.drawRect(width() - 5, 0, 5, 5); // p.drawRect(width() - 5, 0, 5, 5);
p.drawRect(0, height() - 5, 5, 5); // p.drawRect(0, height() - 5, 5, 5);
p.drawRect(width() - 5, height() - 5, 5, 5); // p.drawRect(width() - 5, height() - 5, 5, 5);
// Rahmen (frame) // Rahmen (frame)
p.setPen(m_highlighted ? Qt::white : frame); p.setPen(m_highlighted ? Qt::white : frameColor);
p.setBrush(palette().window()); p.setBrush(palette().window());
QRectF r(rect()); QRectF r(rect());
r.adjust(0.5, 0.5, -0.5, -0.5); r.adjust(0.5, 0.5, -0.5, -0.5);
p.drawRoundedRect(r, 3.0, 3.0, Qt::AbsoluteSize); // p.drawRoundedRect(r, 3.0, 3.0, Qt::AbsoluteSize);
p.drawRect(r);
// // Titel-Hintergrund (Title background)
// p.setPen(Qt::NoPen);
// p.setBrush(m_titleColor);
// QPainterPath path;
// path.moveTo(1.5, fm.height() + 2.5);
// path.lineTo(width() - 1.5, fm.height() + 2.5);
// path.lineTo(width() - 1.5, 3.5);
// path.arcTo(QRectF(width() - 3.5, 0, 2.5, 2.5), 270, -90);
// path.lineTo(3.5, 1.5);
// path.arcTo(QRectF(1.5, 2.5, 2.5, 2.5), 90, 90);
// p.drawPath(path);
// // Titel-Abschlusslinie (Title closing line)
// p.setPen(frame);
// p.drawLine(QPointF(0.5, 2 + fm.height() + 1.5), QPointF(width() - 1.5, 2 + fm.height() + 1.5));
// // Aktiv-Button links
// p.setPen(QPen(palette().windowText().color(), 1.0));
// p.setBrush(palette().light());
// p.drawRoundedRect(QRectF(3.5, 3.5, fm.ascent(), fm.ascent()), 2.0, 2.0, Qt::AbsoluteSize);
// p.setPen(QPen(Qt::white, 1.0));
// p.drawText(QRectF(3.5, 2.5, fm.ascent(), fm.ascent()), Qt::AlignCenter, "c");
// if (m_channelWidget)
// {
// // Stromkanal-Button links (Current channel)
// p.setPen(QPen(palette().windowText().color(), 1.0));
// p.setBrush(palette().light());
// p.drawRoundedRect(QRectF(5.5 + fm.ascent(), 2.5, fm.ascent() + 2.0, fm.ascent() + 2.0), 2.0, 2.0, Qt::AbsoluteSize);
// p.setPen(QPen(Qt::white, 1.0));
// p.drawText(QRectF(5.5 + fm.ascent(), 2.5, fm.ascent() + 2.0, fm.ascent() + 2.0), Qt::AlignCenter, m_streamIndicator);
// }
// // Help button
// if (!m_helpURL.isEmpty())
// {
// p.setRenderHint(QPainter::Antialiasing, true);
// p.setPen(QPen(palette().windowText().color(), 1.0));
// p.setBrush(palette().light());
// r = QRectF(width() - 2*(3.5 + fm.ascent()), 3.5, fm.ascent(), fm.ascent());
// p.drawRoundedRect(r, 2.0, 2.0, Qt::AbsoluteSize);
// p.drawText(QRectF(width() - 2*(3.5 + fm.ascent()), 5, fm.ascent(), fm.ascent() - 2), Qt::AlignCenter, "?");
// }
// //p.drawLine(r.topLeft() + QPointF(1, 1), r.bottomRight() + QPointF(-1, -1));
// //p.drawLine(r.bottomLeft() + QPointF(1, -1), r.topRight() + QPointF(-1, 1));
// // Schließen-Button rechts (Close button on the right)
// p.setRenderHint(QPainter::Antialiasing, true);
// p.setPen(QPen(palette().windowText().color(), 1.0));
// p.setBrush(palette().light());
// r = QRectF(width() - 3.5 - fm.ascent(), 3.5, fm.ascent(), fm.ascent());
// p.drawRoundedRect(r, 2.0, 2.0, Qt::AbsoluteSize);
// p.setPen(QPen(palette().windowText().color(), 1.5));
// p.drawLine(r.topLeft() + QPointF(1, 1), r.bottomRight() + QPointF(-1, -1));
// p.drawLine(r.bottomLeft() + QPointF(1, -1), r.topRight() + QPointF(-1, 1));
// // Titel
// //p.setPen(palette().highlightedText().color());
// p.setPen(m_titleTextColor);
// p.drawText(QRect(2 + 2*fm.height() + 2, 2, width() - 6 - 3*fm.height(), fm.height()),
// fm.elidedText(windowTitle(), Qt::ElideMiddle, width() - 6 - 3*fm.height(), 0));
// Rollups // Rollups
int pos = 2; // fm.height() + 4; int pos = 2; // fm.height() + 4;
@ -396,11 +238,11 @@ void RollupContents::paintEvent(QPaintEvent*)
} }
} }
pos += paintRollup(qobject_cast<QWidget*>(*w), pos, &p, n == c.end(), frame); pos += paintRollup(qobject_cast<QWidget*>(*w), pos, &p, n == c.end(), frameColor);
} }
} }
int RollupContents::paintRollup(QWidget* rollup, int pos, QPainter* p, bool last, const QColor& frame) int RollupContents::paintRollup(QWidget* rollup, int pos, QPainter* p, bool last, const QColor& frameColor)
{ {
QFontMetrics fm(font()); QFontMetrics fm(font());
int height = 1; int height = 1;
@ -418,7 +260,7 @@ int RollupContents::paintRollup(QWidget* rollup, int pos, QPainter* p, bool last
{ {
if (!last) if (!last)
{ {
p->setPen(frame); p->setPen(frameColor);
p->drawLine(QPointF(1.5, pos + fm.height() + 1.5), QPointF(width() - 1.5, pos + fm.height() + 1.5)); p->drawLine(QPointF(1.5, pos + fm.height() + 1.5), QPointF(width() - 1.5, pos + fm.height() + 1.5));
height++; height++;
} }
@ -455,7 +297,7 @@ int RollupContents::paintRollup(QWidget* rollup, int pos, QPainter* p, bool last
if (!rollup->isHidden() && (!last)) if (!rollup->isHidden() && (!last))
{ {
// Rollup-Abschlusslinie // Rollup-Abschlusslinie
p->setPen(frame); p->setPen(frameColor);
p->drawLine(QPointF(1.5, pos + fm.height() + rollup->height() + 6.5), p->drawLine(QPointF(1.5, pos + fm.height() + rollup->height() + 6.5),
QPointF(width() - 1.5, pos + fm.height() + rollup->height() + 6.5)); QPointF(width() - 1.5, pos + fm.height() + rollup->height() + 6.5));
height += rollup->height() + 4; height += rollup->height() + 4;
@ -475,44 +317,6 @@ void RollupContents::mousePressEvent(QMouseEvent* event)
{ {
QFontMetrics fm(font()); QFontMetrics fm(font());
// // menu box left
// if (QRectF(3.5, 3.5, fm.ascent(), fm.ascent()).contains(event->pos()))
// {
// m_contextMenuType = ContextMenuChannelSettings;
// emit customContextMenuRequested(event->globalPos());
// return;
// }
// if (m_channelWidget)
// {
// // Stream channel menu left
// if (QRectF(5.5 + fm.ascent(), 2.5, fm.ascent() + 2.0, fm.ascent() + 2.0).contains(event->pos()))
// {
// m_contextMenuType = ContextMenuStreamSettings;
// emit customContextMenuRequested(event->globalPos());
// return;
// }
// }
// // help button
// if(!m_helpURL.isEmpty() && QRectF(width() - 2*(3.5 + fm.ascent()), 3.5, fm.ascent(), fm.ascent()).contains(event->pos()))
// {
// QString url;
// if (m_helpURL.startsWith("http")) {
// url = m_helpURL;
// } else {
// url = QString("https://github.com/f4exb/sdrangel/blob/master/%1").arg(m_helpURL); // Something like "plugins/channelrx/chanalyzer/readme.md"
// }
// QDesktopServices::openUrl(QUrl(url));
// return;
// }
// // close button right
// if(QRectF(width() - 3.5 - fm.ascent(), 3.5, fm.ascent(), fm.ascent()).contains(event->pos())) {
// close();
// return;
// }
// check if we need to change a rollup widget // check if we need to change a rollup widget
int pos = 2; // fm.height() + 4; int pos = 2; // fm.height() + 4;

View File

@ -31,10 +31,7 @@ class SDRGUI_API RollupContents : public QWidget {
public: public:
RollupContents(QWidget* parent = nullptr); RollupContents(QWidget* parent = nullptr);
void setHighlighted(bool highlighted); void setHighlighted(bool highlighted);
// void setChannelWidget(bool channelWidget) { m_channelWidget = channelWidget; }
// QByteArray saveState(int version = 0) const;
void saveState(RollupState& state) const; void saveState(RollupState& state) const;
// bool restoreState(const QByteArray& state, int version = 0);
void restoreState(const RollupState& state); void restoreState(const RollupState& state);
int arrangeRollups(); int arrangeRollups();
@ -51,7 +48,7 @@ protected:
QString m_helpURL; QString m_helpURL;
void paintEvent(QPaintEvent*); void paintEvent(QPaintEvent*);
int paintRollup(QWidget* rollup, int pos, QPainter* p, bool last, const QColor& frame); int paintRollup(QWidget* rollup, int pos, QPainter* p, bool last, const QColor& frameColor);
void resizeEvent(QResizeEvent* size); void resizeEvent(QResizeEvent* size);
void mousePressEvent(QMouseEvent* event); void mousePressEvent(QMouseEvent* event);