remove unused QGraphics* includes
This commit is contained in:
parent
8eb21b7e21
commit
620478614a
@ -135,7 +135,6 @@ protected:
|
||||
void mousePressEvent(QMouseEvent *event);
|
||||
void mouseReleaseEvent(QMouseEvent *) {}
|
||||
bool childMouseEventFilter(QQuickItem *item, QEvent *event);
|
||||
//bool sceneEventFilter(QGraphicsItem *item, QEvent *event);
|
||||
|
||||
private:
|
||||
QQmlComponent* m_delegate;
|
||||
|
@ -25,7 +25,6 @@
|
||||
#define DECLARATIVEDRAGDROPEVENT_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QGraphicsSceneDragDropEvent>
|
||||
#include "DeclarativeMimeData.h"
|
||||
#include "DeclarativeDropArea.h"
|
||||
|
||||
|
@ -24,7 +24,6 @@
|
||||
#include "DeclarativeDropArea.h"
|
||||
#include "DeclarativeDragDropEvent.h"
|
||||
|
||||
#include <QGraphicsSceneDragDropEvent>
|
||||
#include <QMimeData>
|
||||
|
||||
#include <QDebug>
|
||||
|
@ -20,8 +20,7 @@
|
||||
#include "resourceinstance.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QGraphicsObject>
|
||||
#include <QGraphicsView>
|
||||
#include <QWindow>
|
||||
#include <QTimer>
|
||||
|
||||
#include <KActivities/ResourceInstance>
|
||||
@ -41,43 +40,14 @@ ResourceInstance::~ResourceInstance()
|
||||
|
||||
}
|
||||
|
||||
QGraphicsView *ResourceInstance::view() const
|
||||
{
|
||||
// It's assumed that we won't be visible on more than one view here.
|
||||
// Anything that actually needs view() should only really care about
|
||||
// one of them anyway though.
|
||||
if (!scene()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
QGraphicsView *found = 0;
|
||||
QGraphicsView *possibleFind = 0;
|
||||
//kDebug() << "looking through" << scene()->views().count() << "views";
|
||||
foreach (QGraphicsView *view, scene()->views()) {
|
||||
//kDebug() << " checking" << view << view->sceneRect()
|
||||
// << "against" << sceneBoundingRect() << scenePos();
|
||||
if (view->sceneRect().intersects(sceneBoundingRect()) ||
|
||||
view->sceneRect().contains(scenePos())) {
|
||||
//kDebug() << " found something!" << view->isActiveWindow();
|
||||
if (view->isActiveWindow()) {
|
||||
found = view;
|
||||
} else {
|
||||
possibleFind = view;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return found ? found : possibleFind;
|
||||
}
|
||||
|
||||
void ResourceInstance::syncWid()
|
||||
{
|
||||
QGraphicsView *v = view();
|
||||
if (!v) {
|
||||
QWindow *w = window();
|
||||
if (!w) {
|
||||
return;
|
||||
}
|
||||
|
||||
WId wid = v->topLevelWidget()->effectiveWinId();
|
||||
WId wid = w->winId();
|
||||
if (!m_resourceInstance || m_resourceInstance->winId() != wid) {
|
||||
delete m_resourceInstance;
|
||||
|
||||
|
@ -27,7 +27,6 @@ namespace KActivities {
|
||||
}
|
||||
|
||||
class QTimer;
|
||||
class QGraphicsView;
|
||||
|
||||
class ResourceInstance : public QQuickItem
|
||||
{
|
||||
@ -51,9 +50,6 @@ public:
|
||||
QString title() const;
|
||||
void setTitle(const QString &title);
|
||||
|
||||
protected:
|
||||
QGraphicsView *view() const;
|
||||
|
||||
protected Q_SLOTS:
|
||||
void syncWid();
|
||||
|
||||
|
@ -94,7 +94,7 @@ void MouseEventListener::mousePressEvent(QMouseEvent *me)
|
||||
return;
|
||||
}
|
||||
|
||||
//FIXME: when a popup window is visible: a click anywhere hides it: but the old qgraphicswidget will continue to think it's under the mouse
|
||||
//FIXME: when a popup window is visible: a click anywhere hides it: but the old qquickitem will continue to think it's under the mouse
|
||||
//doesn't seem to be any good way to properly reset this.
|
||||
//this msolution will still caused a missed click after the popup is gone, but gets the situation unblocked.
|
||||
if (!isUnderMouse()) {
|
||||
@ -164,7 +164,6 @@ QPointF MouseEventListener::buttonDownPos(int btn) const
|
||||
}
|
||||
|
||||
|
||||
// bool MouseEventListener::sceneEventFilter(QGraphicsItem *item, QEvent *event)
|
||||
bool MouseEventListener::childMouseEventFilter(QQuickItem *item, QEvent *event)
|
||||
{
|
||||
if (!isEnabled()) {
|
||||
|
@ -27,7 +27,6 @@
|
||||
#include "package.h"
|
||||
|
||||
class KShortcutsDialog;
|
||||
class QGraphicsWidget;
|
||||
|
||||
namespace Plasma
|
||||
{
|
||||
|
@ -20,7 +20,6 @@
|
||||
#include "applet.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QGraphicsLinearLayout>
|
||||
|
||||
#include <KService>
|
||||
#include <KServiceTypeTrader>
|
||||
|
@ -346,19 +346,4 @@ inline QScriptValue wrapPointer(QScriptEngine *eng, T *ptr, uint flags = 0)
|
||||
|
||||
} // namespace QScript
|
||||
|
||||
#ifdef QGRAPHICSITEM_H
|
||||
|
||||
namespace QScript {
|
||||
|
||||
template <class T>
|
||||
inline QScriptValue wrapGVPointer(QScriptEngine *eng, T *item)
|
||||
{
|
||||
uint flags = item->parentItem() ? UserOwnership : 0;
|
||||
return wrapPointer<T>(eng, item, flags);
|
||||
}
|
||||
|
||||
} // namespace QScript
|
||||
|
||||
#endif // QGRAPHICSITEM_H
|
||||
|
||||
#endif // QTSCRIPTEXTENSIONS_GLOBAL_H
|
||||
|
@ -20,7 +20,6 @@
|
||||
#include "widget.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QGraphicsLinearLayout>
|
||||
|
||||
#include <Plasma/Applet>
|
||||
#include <Plasma/Containment>
|
||||
|
Loading…
Reference in New Issue
Block a user