Commit 3c8a339b authored by Bernd Gehrmann's avatar Bernd Gehrmann
Browse files

implement mouseMoveEvent() instead of eventFilter()

svn path=/trunk/kdesdk/cervisia/; revision=163108
parent 05e6891c
......@@ -434,16 +434,14 @@ void LogTreeView::mousePressEvent(QMouseEvent *e)
}
void LogTreeView::windowActivationChange( bool )
{
hideLabel();
}
bool LogTreeView::eventFilter(QObject *o, QEvent *e)
void LogTreeView::mouseMoveEvent(QMouseEvent *e)
{
#if 0
if (o != this || e->type() != QEvent::MouseMove || !isActiveWindow())
return QtTableView::eventFilter(o, e);
#endif
if (!isActiveWindow())
return;
int row = findRow(static_cast<QMouseEvent*>(e)->y());
int col = findCol(static_cast<QMouseEvent*>(e)->x());
......@@ -499,8 +497,20 @@ bool LogTreeView::eventFilter(QObject *o, QEvent *e)
currentCol = col;
}
}
}
return QtTableView::eventFilter(o, e);
void LogTreeView::windowActivationChange(bool oldActive)
{
hideLabel();
QtTableView::windowActivationChange(oldActive);
}
void LogTreeView::leaveEvent(QEvent *e)
{
hideLabel();
QtTableView::leaveEvent(e);
}
......
......@@ -49,9 +49,11 @@ signals:
void revisionClicked(QString rev, bool rmb);
protected:
virtual void windowActivationChange(bool oldActive);
virtual bool eventFilter(QObject *o, QEvent *e);
// virtual bool eventFilter(QObject *o, QEvent *e);
virtual void mousePressEvent(QMouseEvent *e);
virtual void mouseMoveEvent(QMouseEvent *e);
virtual void windowActivationChange(bool oldActive);
virtual void leaveEvent(QEvent *e);
virtual void setupPainter(QPainter *p);
virtual void paintCell(QPainter *p, int row, int col);
virtual int cellWidth(int col);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment