MCPcopy Create free account
hub / github.com/BatchDrake/SigDigger / setColorConfig

Method setColorConfig

Components/MainSpectrum.cpp:468–498  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

466}
467
468void
469MainSpectrum::setColorConfig(ColorConfig const &cfg)
470{
471 QString styleSheet =
472 "background-color: " + cfg.lcdBackground.name() + "; \
473 color: " + cfg.lcdForeground.name() + "; \
474 font-size: 12px; \
475 font-family: Monospace; \
476 font-weight: bold;";
477
478 this->ui->fcLcd->setForegroundColor(cfg.lcdForeground);
479 this->ui->fcLcd->setBackgroundColor(cfg.lcdBackground);
480 this->ui->loLcd->setForegroundColor(cfg.lcdForeground);
481 this->ui->loLcd->setBackgroundColor(cfg.lcdBackground);
482 this->ui->lnbLcd->setForegroundColor(cfg.lcdForeground);
483 this->ui->lnbLcd->setBackgroundColor(cfg.lcdBackground);
484
485 this->ui->loLabel->setStyleSheet(styleSheet);
486 this->ui->lnbLabel->setStyleSheet(styleSheet);
487 this->ui->captureModeLabel->setStyleSheet(styleSheet);
488 this->ui->throttlingLabel->setStyleSheet(styleSheet);
489
490 WATERFALL_CALL(setFftPlotColor(cfg.spectrumForeground));
491 WATERFALL_CALL(setFftAxesColor(cfg.spectrumAxes));
492 WATERFALL_CALL(setFftBgColor(cfg.spectrumBackground));
493 WATERFALL_CALL(setFftTextColor(cfg.spectrumText));
494 WATERFALL_CALL(setFilterBoxColor(cfg.filterBox));
495 WATERFALL_CALL(setTimeStampColor(cfg.spectrumTimeStamps));
496
497 this->lastColorConfig = cfg;
498}
499
500void
501MainSpectrum::setGuiConfig(GuiConfig const &cfg)

Callers 1

setGuiConfigMethod · 0.95

Calls 1

nameMethod · 0.45

Tested by

no test coverage detected