From 4c3a139ef580238043aacce847c1580a24d42f07 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 13 Jul 2012 18:19:16 -0500 Subject: Add ability to change trace widget colors --- clients/tde/src/widgets/tracewidget.cpp | 25 +++++++++++++++++++++++++ clients/tde/src/widgets/tracewidget.h | 3 +++ 2 files changed, 28 insertions(+) (limited to 'clients/tde') 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;traceparamLabel->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;cursorparamLabel->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(); -- cgit v1.2.1