Use QGraphicsSceneEvent instead of QGraphicsSceneMouseEvent to make it more flexible (actually needed for the devicenotifier)
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=745315
This commit is contained in:
parent
d2514a373b
commit
9b112c42ae
@ -27,7 +27,7 @@
|
|||||||
#include <QMouseEvent>
|
#include <QMouseEvent>
|
||||||
#include <QX11Info>
|
#include <QX11Info>
|
||||||
#include <QGraphicsView>
|
#include <QGraphicsView>
|
||||||
#include <QtGui/QGraphicsSceneMouseEvent>
|
#include <QtGui/QGraphicsSceneEvent>
|
||||||
|
|
||||||
#include <KDebug>
|
#include <KDebug>
|
||||||
#include <NETRootInfo>
|
#include <NETRootInfo>
|
||||||
@ -166,7 +166,7 @@ void Dialog::paintBackground(QPainter* painter, const QRect &exposedRect)
|
|||||||
painter->drawPixmap(exposedRect, *m_cachedBackground, exposedRect);
|
painter->drawPixmap(exposedRect, *m_cachedBackground, exposedRect);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Dialog::position(QGraphicsSceneMouseEvent *event, const QRectF boundingRect, QPointF scenePos)
|
void Dialog::position(QGraphicsSceneEvent *event, const QRectF boundingRect, QPointF scenePos)
|
||||||
{
|
{
|
||||||
QWidget *viewWidget = event->widget() ? event->widget()->parentWidget() : 0;
|
QWidget *viewWidget = event->widget() ? event->widget()->parentWidget() : 0;
|
||||||
//QPointF scenePos = mapToScene(boundingRect.topLeft());
|
//QPointF scenePos = mapToScene(boundingRect.topLeft());
|
||||||
|
4
dialog.h
4
dialog.h
@ -23,7 +23,7 @@
|
|||||||
#define PLASMA_DIALOG_H
|
#define PLASMA_DIALOG_H
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include <QtGui/QGraphicsSceneMouseEvent>
|
#include <QtGui/QGraphicsSceneEvent>
|
||||||
|
|
||||||
#include <plasma/plasma_export.h>
|
#include <plasma/plasma_export.h>
|
||||||
|
|
||||||
@ -61,7 +61,7 @@ class PLASMA_EXPORT Dialog : public QWidget
|
|||||||
* @arg boundingRect the boundingRect() from the applet.
|
* @arg boundingRect the boundingRect() from the applet.
|
||||||
* @arg scenePos the absolute position on the scene.
|
* @arg scenePos the absolute position on the scene.
|
||||||
*/
|
*/
|
||||||
void position(QGraphicsSceneMouseEvent *event, const QRectF boundingRect, QPointF scenePos);
|
void position(QGraphicsSceneEvent *event, const QRectF boundingRect, QPointF scenePos);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user