diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-07-13 18:19:16 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-07-13 18:19:16 -0500 |
commit | 4c3a139ef580238043aacce847c1580a24d42f07 (patch) | |
tree | d9cb8eed4bead006b01f7e3f84248e058a12bbfc /clients/tde | |
parent | 5622d7cf2c00002201e724774669aaedcfb451c3 (diff) | |
download | ulab-4c3a139ef580238043aacce847c1580a24d42f07.tar.gz ulab-4c3a139ef580238043aacce847c1580a24d42f07.zip |
Add ability to change trace widget colors
Diffstat (limited to 'clients/tde')
-rw-r--r-- | clients/tde/src/widgets/tracewidget.cpp | 25 | ||||
-rw-r--r-- | clients/tde/src/widgets/tracewidget.h | 3 |
2 files changed, 28 insertions, 0 deletions
diff --git a/clients/tde/src/widgets/tracewidget.cpp b/clients/tde/src/widgets/tracewidget.cpp index 9902a57..911bf70 100644 --- a/clients/tde/src/widgets/tracewidget.cpp +++ b/clients/tde/src/widgets/tracewidget.cpp @@ -609,6 +609,31 @@ TraceWidget::~TraceWidget() { } } +void TraceWidget::setForegroundColor(const TQColor color) { + setPaletteForegroundColor(color); + m_graticuleWidget->setPaletteForegroundColor(color); +} + +void TraceWidget::setBackgroundColor(const TQColor color) { + setPaletteBackgroundColor(color); + m_graticuleWidget->setPaletteBackgroundColor(color); + for (uint trace=0;trace<m_traceArray.count();trace++) { + m_traceArray[trace]->paramLabel->setPaletteBackgroundColor(color); + m_traceArray[trace]->graphStatusLabel->setPaletteBackgroundColor(color); + m_traceArray[trace]->graphStatusLabelInner->setPaletteBackgroundColor(color); + m_traceArray[trace]->singleIncrBtn->setPaletteBackgroundColor(color); + m_traceArray[trace]->singleDecrBtn->setPaletteBackgroundColor(color); + m_traceArray[trace]->posResetBtn->setPaletteBackgroundColor(color); + } + for (uint cursor=0;cursor<m_cursorArray.count();cursor++) { + m_cursorArray[cursor]->paramLabel->setPaletteBackgroundColor(color); + m_cursorArray[cursor]->singleIncrBtn->setPaletteBackgroundColor(color); + m_cursorArray[cursor]->singleDecrBtn->setPaletteBackgroundColor(color); + m_cursorArray[cursor]->multiIncrBtn->setPaletteBackgroundColor(color); + m_cursorArray[cursor]->multiDecrBtn->setPaletteBackgroundColor(color); + } +} + void TraceWidget::setNumberOfSamples(uint traceNumber, unsigned int samples) { VERIFY_TRACE_ARRAY_SIZE diff --git a/clients/tde/src/widgets/tracewidget.h b/clients/tde/src/widgets/tracewidget.h index c8789ee..b569074 100644 --- a/clients/tde/src/widgets/tracewidget.h +++ b/clients/tde/src/widgets/tracewidget.h @@ -194,6 +194,9 @@ class TraceWidget : public TQWidget TQt::Orientation cursorOrientation(uint cursorNumber); void setCursorOrientation(uint cursorNumber, TQt::Orientation orient); + void setForegroundColor(const TQColor color); + void setBackgroundColor(const TQColor color); + TQRectF zoomBox(); void setZoomBoxEnabled(bool enabled); TQRectF zoomCursorBox(); |