diff options
Diffstat (limited to 'clients/tde/src/widgets/tracewidget.cpp')
-rw-r--r-- | clients/tde/src/widgets/tracewidget.cpp | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/clients/tde/src/widgets/tracewidget.cpp b/clients/tde/src/widgets/tracewidget.cpp index 6754896..115169b 100644 --- a/clients/tde/src/widgets/tracewidget.cpp +++ b/clients/tde/src/widgets/tracewidget.cpp @@ -270,6 +270,11 @@ CursorData::CursorData(TraceWidget* parent, TQWidget* labelParent) : TQObject(), singleDecrBtn->hide(); multiIncrBtn->hide(); multiDecrBtn->hide(); + paramLabel->installEventFilter(this); + singleIncrBtn->installEventFilter(this); + singleDecrBtn->installEventFilter(this); + multiIncrBtn->installEventFilter(this); + multiDecrBtn->installEventFilter(this); connect(singleIncrBtn, SIGNAL(clicked()), this, SLOT(movePosOneTick())); connect(singleDecrBtn, SIGNAL(clicked()), this, SLOT(moveNegOneTick())); connect(multiIncrBtn, SIGNAL(clicked()), this, SLOT(movePosMultiTicks())); @@ -394,6 +399,26 @@ void CursorData::moveNegMultiTicks() { parentWidget->m_graticuleWidget->repaint(true); } +bool CursorData::eventFilter(TQObject *o, TQEvent *e) { + // Intercept mouse entry/leave events for cursor labels and movement buttons + if ((o == paramLabel) || (o == singleIncrBtn) || (o == singleDecrBtn) || (o == multiIncrBtn) || (o == multiDecrBtn)) { + if (e->type() == TQEvent::Enter) { + highlighted = true; + parentWidget->updateCursorText(); + parentWidget->m_graticuleWidget->updateGraticule(); + parentWidget->m_graticuleWidget->repaint(true); + } + if (e->type() == TQEvent::Leave) { + highlighted = false; + parentWidget->updateCursorText(); + parentWidget->m_graticuleWidget->updateGraticule(); + parentWidget->m_graticuleWidget->repaint(true); + } + } + // Allow event processing by other routines + return FALSE; +} + GraticuleWidget::GraticuleWidget(TraceWidget* parent, const char* name) : TQWidget(parent, name), m_base(parent), m_graticulePixmap(0), @@ -622,10 +647,6 @@ void GraticuleWidget::mouseMoveEvent(TQMouseEvent *e) { } else { setCursor(tqcrossCursor); - if (m_base->m_cursorArray[m_closestCursor]->highlighted) { - cursorHighlightChanged = true; - } - m_base->m_cursorArray[m_closestCursor]->highlighted = false; } } |