we no longer need to check for spontaneity; move the trick up to Applet as well to avoid repaints where possible
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=868200
This commit is contained in:
parent
f7b31b3372
commit
06e71be8c3
10
applet.cpp
10
applet.cpp
@ -1519,6 +1519,16 @@ QSizeF Applet::sizeHint(Qt::SizeHint which, const QSizeF & constraint) const
|
||||
return hint;
|
||||
}
|
||||
|
||||
void Applet::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
|
||||
{
|
||||
Q_UNUSED(event)
|
||||
}
|
||||
|
||||
void Applet::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
|
||||
{
|
||||
Q_UNUSED(event)
|
||||
}
|
||||
|
||||
void Applet::timerEvent(QTimerEvent *event)
|
||||
{
|
||||
if (d->transient) {
|
||||
|
10
applet.h
10
applet.h
@ -785,6 +785,16 @@ class PLASMA_EXPORT Applet : public QGraphicsWidget
|
||||
*/
|
||||
QSizeF sizeHint(Qt::SizeHint which, const QSizeF & constraint = QSizeF()) const;
|
||||
|
||||
/**
|
||||
* Reimplemented from QGraphicsLayoutItem
|
||||
*/
|
||||
void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
|
||||
|
||||
/**
|
||||
* Reimplemented from QGraphicsLayoutItem
|
||||
*/
|
||||
void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
|
||||
|
||||
/**
|
||||
* Reimplemented from QObject
|
||||
*/
|
||||
|
@ -1006,26 +1006,6 @@ void Containment::resizeEvent(QGraphicsSceneResizeEvent *event)
|
||||
}
|
||||
}
|
||||
|
||||
void Containment::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
|
||||
{
|
||||
//FIXME Qt4.4 check to see if this is still necessary to avoid unnecessary repaints
|
||||
// check with QT_FLUSH_PAINT=1 and mouse through applets that accept hover,
|
||||
// applets that don't and system windows
|
||||
if (event->spontaneous()) {
|
||||
Applet::hoverEnterEvent(event);
|
||||
}
|
||||
Q_UNUSED(event)
|
||||
}
|
||||
|
||||
void Containment::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
|
||||
{
|
||||
//FIXME Qt4.4 check to see if this is still necessary to avoid unnecessary repaints
|
||||
// check with QT_FLUSH_PAINT=1 and mouse through applets that accept hover,
|
||||
// applets that don't and system windows
|
||||
// Applet::hoverLeaveEvent(event);
|
||||
Q_UNUSED(event)
|
||||
}
|
||||
|
||||
void Containment::keyPressEvent(QKeyEvent *event)
|
||||
{
|
||||
//kDebug() << "keyPressEvent with" << event->key() << "and hoping and wishing for a" << Qt::Key_Tab;
|
||||
|
@ -461,8 +461,6 @@ class PLASMA_EXPORT Containment : public Applet
|
||||
void mousePressEvent(QGraphicsSceneMouseEvent *event);
|
||||
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
|
||||
void contextMenuEvent(QGraphicsSceneContextMenuEvent *event);
|
||||
void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
|
||||
void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
|
||||
void keyPressEvent(QKeyEvent *event);
|
||||
void wheelEvent(QGraphicsSceneWheelEvent *event);
|
||||
bool sceneEventFilter(QGraphicsItem *watched, QEvent *event);
|
||||
|
Loading…
Reference in New Issue
Block a user