Add ability to change trace widget colors

master
Timothy Pearson 12 years ago
parent 5622d7cf2c
commit 4c3a139ef5

@ -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

@ -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();

Loading…
Cancel
Save