Convert features.graphicsview to QT_[REQUIRE_]CONFIG
Change-Id: I1083097802772624e5d414678b4612308683a56f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>bb10
parent
306071e50e
commit
e6fad35155
|
|
@ -61,6 +61,8 @@
|
|||
|
||||
#include <float.h>
|
||||
|
||||
QT_REQUIRE_CONFIG(graphicsview);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
template <typename Vertex, typename EdgeData>
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@
|
|||
|
||||
*/
|
||||
#include "qgraphicsanchorlayout_p.h"
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
QGraphicsAnchor::QGraphicsAnchor(QGraphicsAnchorLayout *parentLayout)
|
||||
|
|
@ -531,5 +531,3 @@ QSizeF QGraphicsAnchorLayout::sizeHint(Qt::SizeHint which, const QSizeF &constra
|
|||
QT_END_NAMESPACE
|
||||
|
||||
#include "moc_qgraphicsanchorlayout.cpp"
|
||||
|
||||
#endif //QT_NO_GRAPHICSVIEW
|
||||
|
|
|
|||
|
|
@ -44,12 +44,10 @@
|
|||
#include <QtWidgets/qgraphicsitem.h>
|
||||
#include <QtWidgets/qgraphicslayout.h>
|
||||
|
||||
QT_REQUIRE_CONFIG(graphicsview);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
#if !defined(QT_NO_GRAPHICSVIEW)
|
||||
|
||||
class QGraphicsAnchorPrivate;
|
||||
class QGraphicsAnchorLayout;
|
||||
class QGraphicsAnchorLayoutPrivate;
|
||||
|
|
@ -115,8 +113,6 @@ private:
|
|||
friend class QGraphicsAnchor;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -50,7 +50,6 @@
|
|||
|
||||
#include <numeric>
|
||||
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
// To ensure that all variables inside the simplex solver are non-negative,
|
||||
|
|
@ -2976,4 +2975,3 @@ void QGraphicsAnchorLayoutPrivate::dumpGraph(const QString &name)
|
|||
#endif
|
||||
|
||||
QT_END_NAMESPACE
|
||||
#endif //QT_NO_GRAPHICSVIEW
|
||||
|
|
|
|||
|
|
@ -59,7 +59,9 @@
|
|||
#include "qgraphicsanchorlayout.h"
|
||||
#include "qgraph_p.h"
|
||||
#include "qsimplex_p.h"
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
|
||||
QT_REQUIRE_CONFIG(graphicsview);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
/*
|
||||
|
|
@ -591,6 +593,5 @@ public:
|
|||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
#endif //QT_NO_GRAPHICSVIEW
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -79,8 +79,6 @@
|
|||
|
||||
#include "qglobal.h"
|
||||
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
|
||||
#include "qapplication.h"
|
||||
#include "qwidget.h"
|
||||
#include "qgraphicslayout_p.h"
|
||||
|
|
@ -694,5 +692,3 @@ QSizePolicy::ControlTypes QGraphicsGridLayout::controlTypes(LayoutSide side) con
|
|||
#endif
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif //QT_NO_GRAPHICSVIEW
|
||||
|
|
|
|||
|
|
@ -44,11 +44,10 @@
|
|||
#include <QtWidgets/qgraphicsitem.h>
|
||||
#include <QtWidgets/qgraphicslayout.h>
|
||||
|
||||
QT_REQUIRE_CONFIG(graphicsview);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
#if !defined(QT_NO_GRAPHICSVIEW)
|
||||
|
||||
class QGraphicsGridLayoutPrivate;
|
||||
|
||||
class Q_WIDGETS_EXPORT QGraphicsGridLayout : public QGraphicsLayout
|
||||
|
|
@ -130,9 +129,6 @@ private:
|
|||
inline void QGraphicsGridLayout::addItem(QGraphicsLayoutItem *aitem, int arow, int acolumn, Qt::Alignment aalignment)
|
||||
{ addItem(aitem, arow, acolumn, 1, 1, aalignment); }
|
||||
|
||||
#endif
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -39,8 +39,6 @@
|
|||
|
||||
#include "qgraphicsgridlayoutengine_p.h"
|
||||
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
|
||||
#include "qgraphicslayoutitem_p.h"
|
||||
#include "qgraphicslayout_p.h"
|
||||
#include "qgraphicswidget.h"
|
||||
|
|
@ -118,7 +116,4 @@ int QGraphicsGridLayoutEngine::stretchFactor(QGraphicsLayoutItem *layoutItem, Qt
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_GRAPHICSVIEW
|
||||
|
|
|
|||
|
|
@ -54,13 +54,13 @@
|
|||
#include <QtWidgets/private/qtwidgetsglobal_p.h>
|
||||
#include <QtGui/private/qgridlayoutengine_p.h>
|
||||
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
|
||||
#include <QtWidgets/qsizepolicy.h>
|
||||
#include <QtWidgets/qstyle.h>
|
||||
#include <QtWidgets/qstyleoption.h>
|
||||
#include "qgraphicslayoutitem.h"
|
||||
|
||||
QT_REQUIRE_CONFIG(graphicsview);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QGraphicsLayoutPrivate;
|
||||
|
|
@ -138,6 +138,4 @@ public:
|
|||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_GRAPHICSVIEW
|
||||
|
||||
#endif // QGRAPHICSGRIDLAYOUTENGINE_P_H
|
||||
|
|
|
|||
|
|
@ -732,8 +732,6 @@
|
|||
|
||||
#include "qgraphicsitem.h"
|
||||
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
|
||||
#include "qgraphicsscene.h"
|
||||
#include "qgraphicsscene_p.h"
|
||||
#include "qgraphicssceneevent.h"
|
||||
|
|
@ -11635,5 +11633,3 @@ QDebug operator<<(QDebug debug, QGraphicsItem::GraphicsItemFlags flags)
|
|||
QT_END_NAMESPACE
|
||||
|
||||
#include "moc_qgraphicsitem.cpp"
|
||||
|
||||
#endif // QT_NO_GRAPHICSVIEW
|
||||
|
|
|
|||
|
|
@ -50,11 +50,10 @@
|
|||
|
||||
class tst_QGraphicsItem;
|
||||
|
||||
QT_REQUIRE_CONFIG(graphicsview);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
#if !defined(QT_NO_GRAPHICSVIEW)
|
||||
|
||||
class QBrush;
|
||||
class QCursor;
|
||||
class QFocusEvent;
|
||||
|
|
@ -1050,8 +1049,6 @@ Q_DECLARE_METATYPE(QGraphicsItem *)
|
|||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
#endif // QT_NO_GRAPHICSVIEW
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QGRAPHICSITEM_H
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@
|
|||
|
||||
#include <QtCore/qpoint.h>
|
||||
|
||||
#if !defined(QT_NO_GRAPHICSVIEW)
|
||||
QT_REQUIRE_CONFIG(graphicsview);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
|
@ -815,6 +815,4 @@ inline void QGraphicsItemPrivate::markParentDirty(bool updateBoundingRect)
|
|||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_GRAPHICSVIEW
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -81,8 +81,6 @@
|
|||
|
||||
#include "qgraphicsitemanimation.h"
|
||||
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
|
||||
#include "qgraphicsitem.h"
|
||||
|
||||
#include <QtCore/qtimeline.h>
|
||||
|
|
@ -595,5 +593,3 @@ void QGraphicsItemAnimation::afterAnimationStep(qreal step)
|
|||
QT_END_NAMESPACE
|
||||
|
||||
#include "moc_qgraphicsitemanimation.cpp"
|
||||
|
||||
#endif // QT_NO_GRAPHICSVIEW
|
||||
|
|
|
|||
|
|
@ -43,11 +43,10 @@
|
|||
#include <QtWidgets/qtwidgetsglobal.h>
|
||||
#include <QtCore/qobject.h>
|
||||
|
||||
#if !defined(QT_NO_GRAPHICSVIEW)
|
||||
QT_REQUIRE_CONFIG(graphicsview);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
class QGraphicsItem;
|
||||
class QMatrix;
|
||||
class QPointF;
|
||||
|
|
@ -110,5 +109,4 @@ private:
|
|||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_GRAPHICSVIEW
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@
|
|||
|
||||
#include "qapplication.h"
|
||||
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#include "qgraphicslayout.h"
|
||||
#include "qgraphicslayout_p.h"
|
||||
#include "qgraphicslayoutitem.h"
|
||||
|
|
@ -521,5 +520,3 @@ bool QGraphicsLayout::instantInvalidatePropagation()
|
|||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif //QT_NO_GRAPHICSVIEW
|
||||
|
|
|
|||
|
|
@ -43,11 +43,10 @@
|
|||
#include <QtWidgets/qtwidgetsglobal.h>
|
||||
#include <QtWidgets/qgraphicslayoutitem.h>
|
||||
|
||||
QT_REQUIRE_CONFIG(graphicsview);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
#if !defined(QT_NO_GRAPHICSVIEW)
|
||||
|
||||
class QGraphicsLayoutPrivate;
|
||||
class QGraphicsLayoutItem;
|
||||
class QGraphicsWidget;
|
||||
|
|
@ -86,9 +85,6 @@ private:
|
|||
|
||||
Q_DECLARE_INTERFACE(QGraphicsLayout, "org.qt-project.Qt.QGraphicsLayout")
|
||||
|
||||
#endif
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -39,8 +39,6 @@
|
|||
|
||||
#include "qglobal.h"
|
||||
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
|
||||
#include "qgraphicslayout_p.h"
|
||||
#include "qgraphicslayout.h"
|
||||
#include "qgraphicswidget.h"
|
||||
|
|
@ -195,7 +193,4 @@ void QGraphicsLayoutPrivate::activateRecursive(QGraphicsLayoutItem *item)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif //QT_NO_GRAPHICSVIEW
|
||||
|
|
|
|||
|
|
@ -53,14 +53,14 @@
|
|||
|
||||
#include <QtWidgets/private/qtwidgetsglobal_p.h>
|
||||
|
||||
#if !defined(QT_NO_GRAPHICSVIEW)
|
||||
|
||||
#include "qgraphicslayout.h"
|
||||
#include "qgraphicslayoutitem_p.h"
|
||||
#include <QtWidgets/qstyle.h>
|
||||
#include <QtWidgets/qwidget.h>
|
||||
#include <QtWidgets/qstyleoption.h>
|
||||
|
||||
QT_REQUIRE_CONFIG(graphicsview);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QGraphicsLayoutItem;
|
||||
|
|
@ -144,9 +144,6 @@ public:
|
|||
bool activated;
|
||||
};
|
||||
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif //QT_NO_GRAPHICSVIEW
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -39,8 +39,6 @@
|
|||
|
||||
#include "qglobal.h"
|
||||
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
|
||||
#include "qgraphicslayout.h"
|
||||
#include "qgraphicsscene.h"
|
||||
#include "qgraphicslayoutitem.h"
|
||||
|
|
@ -930,5 +928,3 @@ void QGraphicsLayoutItem::setGraphicsItem(QGraphicsItem *item)
|
|||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif //QT_NO_GRAPHICSVIEW
|
||||
|
|
|
|||
|
|
@ -45,11 +45,10 @@
|
|||
#include <QtWidgets/qsizepolicy.h>
|
||||
#include <QtGui/qevent.h>
|
||||
|
||||
QT_REQUIRE_CONFIG(graphicsview);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
#if !defined(QT_NO_GRAPHICSVIEW)
|
||||
|
||||
class QGraphicsLayoutItemPrivate;
|
||||
class QGraphicsItem;
|
||||
class Q_WIDGETS_EXPORT QGraphicsLayoutItem
|
||||
|
|
@ -141,8 +140,6 @@ inline qreal QGraphicsLayoutItem::maximumWidth() const
|
|||
inline qreal QGraphicsLayoutItem::maximumHeight() const
|
||||
{ return effectiveSizeHint(Qt::MaximumSize).height(); }
|
||||
|
||||
#endif
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -55,6 +55,8 @@
|
|||
#include <QtCore/QSizeF>
|
||||
#include <QtWidgets/QSizePolicy>
|
||||
|
||||
QT_REQUIRE_CONFIG(graphicsview);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QGraphicsLayoutItem;
|
||||
|
|
|
|||
|
|
@ -39,8 +39,6 @@
|
|||
|
||||
#include "qgraphicslayoutstyleinfo_p.h"
|
||||
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
|
||||
#include "qgraphicslayout_p.h"
|
||||
#include "qgraphicswidget.h"
|
||||
#include <QtWidgets/qstyle.h>
|
||||
|
|
@ -108,5 +106,3 @@ QStyle *QGraphicsLayoutStyleInfo::style() const
|
|||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_GRAPHICSVIEW
|
||||
|
|
|
|||
|
|
@ -54,6 +54,8 @@
|
|||
#include <QtGui/private/qabstractlayoutstyleinfo_p.h>
|
||||
#include <QtWidgets/qstyleoption.h>
|
||||
|
||||
QT_REQUIRE_CONFIG(graphicsview);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QStyle;
|
||||
|
|
|
|||
|
|
@ -113,8 +113,6 @@
|
|||
|
||||
#include "qapplication.h"
|
||||
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
|
||||
#include "qwidget.h"
|
||||
#include "qgraphicslayout_p.h"
|
||||
#include "qgraphicslayoutitem.h"
|
||||
|
|
@ -566,5 +564,3 @@ void QGraphicsLinearLayout::dump(int indent) const
|
|||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif //QT_NO_GRAPHICSVIEW
|
||||
|
|
|
|||
|
|
@ -44,11 +44,10 @@
|
|||
#include <QtWidgets/qgraphicsitem.h>
|
||||
#include <QtWidgets/qgraphicslayout.h>
|
||||
|
||||
QT_REQUIRE_CONFIG(graphicsview);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
#if !defined(QT_NO_GRAPHICSVIEW)
|
||||
|
||||
class QGraphicsLinearLayoutPrivate;
|
||||
|
||||
class Q_WIDGETS_EXPORT QGraphicsLinearLayout : public QGraphicsLayout
|
||||
|
|
@ -105,9 +104,6 @@ private:
|
|||
Q_DECLARE_PRIVATE(QGraphicsLinearLayout)
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -39,8 +39,6 @@
|
|||
|
||||
#include "qglobal.h"
|
||||
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
|
||||
#include "qgraphicslayout.h"
|
||||
#include "qgraphicsproxywidget.h"
|
||||
#include "private/qgraphicsproxywidget_p.h"
|
||||
|
|
@ -1606,5 +1604,3 @@ QGraphicsProxyWidget *QGraphicsProxyWidget::newProxyWidget(const QWidget *)
|
|||
QT_END_NAMESPACE
|
||||
|
||||
#include "moc_qgraphicsproxywidget.cpp"
|
||||
|
||||
#endif //QT_NO_GRAPHICSVIEW
|
||||
|
|
|
|||
|
|
@ -43,11 +43,10 @@
|
|||
#include <QtWidgets/qtwidgetsglobal.h>
|
||||
#include <QtWidgets/qgraphicswidget.h>
|
||||
|
||||
QT_REQUIRE_CONFIG(graphicsview);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
#if !defined(QT_NO_GRAPHICSVIEW)
|
||||
|
||||
class QGraphicsProxyWidgetPrivate;
|
||||
|
||||
class Q_WIDGETS_EXPORT QGraphicsProxyWidget : public QGraphicsWidget
|
||||
|
|
@ -133,9 +132,6 @@ private:
|
|||
friend class QGraphicsItem;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@
|
|||
#include "qgraphicsproxywidget.h"
|
||||
#include "private/qgraphicswidget_p.h"
|
||||
|
||||
#if !defined(QT_NO_GRAPHICSVIEW)
|
||||
QT_REQUIRE_CONFIG(graphicsview);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
|
@ -114,5 +114,3 @@ public:
|
|||
QT_END_NAMESPACE
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -203,8 +203,6 @@
|
|||
|
||||
#include "qgraphicsscene.h"
|
||||
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
|
||||
#include "qgraphicsitem.h"
|
||||
#include "qgraphicsitem_p.h"
|
||||
#include "qgraphicslayout.h"
|
||||
|
|
@ -6585,5 +6583,3 @@ void QGraphicsScenePrivate::ungrabGesture(QGraphicsItem *item, Qt::GestureType g
|
|||
QT_END_NAMESPACE
|
||||
|
||||
#include "moc_qgraphicsscene.cpp"
|
||||
|
||||
#endif // QT_NO_GRAPHICSVIEW
|
||||
|
|
|
|||
|
|
@ -50,11 +50,10 @@
|
|||
#include <QtGui/qmatrix.h>
|
||||
#include <QtGui/qpen.h>
|
||||
|
||||
QT_REQUIRE_CONFIG(graphicsview);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
#if !defined(QT_NO_GRAPHICSVIEW)
|
||||
|
||||
template<typename T> class QList;
|
||||
class QFocusEvent;
|
||||
class QFont;
|
||||
|
|
@ -328,8 +327,6 @@ private:
|
|||
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS(QGraphicsScene::SceneLayers)
|
||||
|
||||
#endif // QT_NO_GRAPHICSVIEW
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -39,8 +39,6 @@
|
|||
|
||||
#include "qgraphicsscene_bsp_p.h"
|
||||
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
|
||||
#include <QtCore/qstring.h>
|
||||
#include <private/qgraphicsitem_p.h>
|
||||
|
||||
|
|
@ -290,5 +288,3 @@ QRectF QGraphicsSceneBspTree::rectForIndex(int index) const
|
|||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_GRAPHICSVIEW
|
||||
|
|
|
|||
|
|
@ -54,12 +54,12 @@
|
|||
#include <QtWidgets/private/qtwidgetsglobal_p.h>
|
||||
#include <QtCore/qlist.h>
|
||||
|
||||
#if !defined(QT_NO_GRAPHICSVIEW)
|
||||
|
||||
#include <QtCore/qrect.h>
|
||||
#include <QtCore/qset.h>
|
||||
#include <QtCore/qvector.h>
|
||||
|
||||
QT_REQUIRE_CONFIG(graphicsview);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QGraphicsItem;
|
||||
|
|
@ -126,6 +126,4 @@ public:
|
|||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_GRAPHICSVIEW
|
||||
|
||||
#endif // QGRAPHICSSCENEBSPTREE_P_H
|
||||
|
|
|
|||
|
|
@ -54,8 +54,6 @@
|
|||
#include <QtWidgets/private/qtwidgetsglobal_p.h>
|
||||
#include "qgraphicsscene.h"
|
||||
|
||||
#if !defined(QT_NO_GRAPHICSVIEW)
|
||||
|
||||
#include "qgraphicssceneevent.h"
|
||||
#include "qgraphicsview.h"
|
||||
#include "qgraphicsview_p.h"
|
||||
|
|
@ -71,6 +69,8 @@
|
|||
#include <QtWidgets/qstyle.h>
|
||||
#include <QtWidgets/qstyleoption.h>
|
||||
|
||||
QT_REQUIRE_CONFIG(graphicsview);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QGraphicsSceneIndex;
|
||||
|
|
@ -356,6 +356,4 @@ static inline QRectF adjustedItemEffectiveBoundingRect(const QGraphicsItem *item
|
|||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_GRAPHICSVIEW
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -74,8 +74,6 @@
|
|||
|
||||
#include <QtCore/qglobal.h>
|
||||
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
|
||||
#include <private/qgraphicsscene_p.h>
|
||||
#include <private/qgraphicsscenebsptreeindex_p.h>
|
||||
#include <private/qgraphicssceneindex_p.h>
|
||||
|
|
@ -710,6 +708,3 @@ bool QGraphicsSceneBspTreeIndex::event(QEvent *event)
|
|||
QT_END_NAMESPACE
|
||||
|
||||
#include "moc_qgraphicsscenebsptreeindex_p.cpp"
|
||||
|
||||
#endif // QT_NO_GRAPHICSVIEW
|
||||
|
||||
|
|
|
|||
|
|
@ -53,8 +53,6 @@
|
|||
|
||||
#include <QtWidgets/private/qtwidgetsglobal_p.h>
|
||||
|
||||
#if !defined(QT_NO_GRAPHICSVIEW)
|
||||
|
||||
#include "qgraphicssceneindex_p.h"
|
||||
#include "qgraphicsitem_p.h"
|
||||
#include "qgraphicsscene_bsp_p.h"
|
||||
|
|
@ -62,6 +60,8 @@
|
|||
#include <QtCore/qrect.h>
|
||||
#include <QtCore/qlist.h>
|
||||
|
||||
QT_REQUIRE_CONFIG(graphicsview);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
static const int QGRAPHICSSCENE_INDEXTIMER_TIMEOUT = 2000;
|
||||
|
|
@ -199,6 +199,4 @@ static inline bool QRectF_intersects(const QRectF &s, const QRectF &r)
|
|||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_GRAPHICSVIEW
|
||||
|
||||
#endif // QGRAPHICSBSPTREEINDEX_H
|
||||
|
|
|
|||
|
|
@ -259,8 +259,6 @@
|
|||
|
||||
#include "qgraphicssceneevent.h"
|
||||
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
|
||||
#ifndef QT_NO_DEBUG
|
||||
#include <QtCore/qdebug.h>
|
||||
#endif
|
||||
|
|
@ -1733,5 +1731,3 @@ void QGraphicsSceneMoveEvent::setNewPos(const QPointF &pos)
|
|||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_GRAPHICSVIEW
|
||||
|
|
|
|||
|
|
@ -51,11 +51,10 @@
|
|||
#include <QtCore/qhash.h>
|
||||
#endif
|
||||
|
||||
QT_REQUIRE_CONFIG(graphicsview);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
#if !defined(QT_NO_GRAPHICSVIEW)
|
||||
|
||||
class QMimeData;
|
||||
class QPointF;
|
||||
class QSizeF;
|
||||
|
|
@ -321,8 +320,6 @@ public:
|
|||
void setNewPos(const QPointF &pos);
|
||||
};
|
||||
|
||||
#endif // QT_NO_GRAPHICSVIEW
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -61,8 +61,6 @@
|
|||
#include "qgraphicssceneindex_p.h"
|
||||
#include "qgraphicsscenebsptreeindex_p.h"
|
||||
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
namespace QtPrivate { // just to keep indentation of the following functions at the same level
|
||||
|
|
@ -627,5 +625,3 @@ void QGraphicsSceneIndex::prepareBoundingRectChange(const QGraphicsItem *item)
|
|||
QT_END_NAMESPACE
|
||||
|
||||
#include "moc_qgraphicssceneindex_p.cpp"
|
||||
|
||||
#endif // QT_NO_GRAPHICSVIEW
|
||||
|
|
|
|||
|
|
@ -60,11 +60,10 @@
|
|||
#include <QtCore/qobject.h>
|
||||
#include <QtGui/qtransform.h>
|
||||
|
||||
QT_REQUIRE_CONFIG(graphicsview);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
#if !defined(QT_NO_GRAPHICSVIEW)
|
||||
|
||||
class QGraphicsSceneIndexPrivate;
|
||||
class QPointF;
|
||||
class QRectF;
|
||||
|
|
@ -156,8 +155,6 @@ inline void QGraphicsSceneIndexPrivate::items_helper(const QRectF &rect, QGraphi
|
|||
}
|
||||
}
|
||||
|
||||
#endif // QT_NO_GRAPHICSVIEW
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QGRAPHICSSCENEINDEX_H
|
||||
|
|
|
|||
|
|
@ -53,15 +53,14 @@
|
|||
|
||||
#include <QtWidgets/private/qtwidgetsglobal_p.h>
|
||||
|
||||
#if !defined(QT_NO_GRAPHICSVIEW)
|
||||
|
||||
#include <QtCore/qrect.h>
|
||||
#include <QtCore/qlist.h>
|
||||
#include <QtWidgets/qgraphicsitem.h>
|
||||
#include <private/qgraphicssceneindex_p.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
QT_REQUIRE_CONFIG(graphicsview);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class Q_AUTOTEST_EXPORT QGraphicsSceneLinearIndex : public QGraphicsSceneIndex
|
||||
{
|
||||
|
|
@ -116,6 +115,4 @@ private:
|
|||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_GRAPHICSVIEW
|
||||
|
||||
#endif // QGRAPHICSSCENELINEARINDEX_H
|
||||
|
|
|
|||
|
|
@ -93,7 +93,6 @@
|
|||
#include <QtCore/qmath.h>
|
||||
#include <QtCore/qnumeric.h>
|
||||
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
QGraphicsTransformPrivate::~QGraphicsTransformPrivate()
|
||||
|
|
@ -597,4 +596,3 @@ void QGraphicsRotation::applyTo(QMatrix4x4 *matrix) const
|
|||
#include "moc_qgraphicstransform.cpp"
|
||||
|
||||
QT_END_NAMESPACE
|
||||
#endif //QT_NO_GRAPHICSVIEW
|
||||
|
|
|
|||
|
|
@ -46,9 +46,9 @@
|
|||
#include <QtGui/QTransform>
|
||||
#include <QtGui/QMatrix4x4>
|
||||
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
QT_BEGIN_NAMESPACE
|
||||
QT_REQUIRE_CONFIG(graphicsview);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QGraphicsItem;
|
||||
class QGraphicsTransformPrivate;
|
||||
|
|
@ -149,6 +149,4 @@ private:
|
|||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif //QT_NO_GRAPHICSVIEW
|
||||
|
||||
#endif // QFXTRANSFORM_H
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@
|
|||
#include <QtWidgets/private/qtwidgetsglobal_p.h>
|
||||
#include "private/qobject_p.h"
|
||||
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
QT_REQUIRE_CONFIG(graphicsview);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
|
@ -77,6 +77,4 @@ public:
|
|||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif //QT_NO_GRAPHICSVIEW
|
||||
|
||||
#endif // QGRAPHICSTRANSFORM_P_H
|
||||
|
|
|
|||
|
|
@ -271,8 +271,6 @@ static const int QGRAPHICSVIEW_PREALLOC_STYLE_OPTIONS = 503; // largest prime <
|
|||
#include "qgraphicsview.h"
|
||||
#include "qgraphicsview_p.h"
|
||||
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
|
||||
#include "qgraphicsitem.h"
|
||||
#include "qgraphicsitem_p.h"
|
||||
#include "qgraphicsscene.h"
|
||||
|
|
@ -3935,5 +3933,3 @@ QRectF QGraphicsViewPrivate::mapToScene(const QRectF &rect) const
|
|||
QT_END_NAMESPACE
|
||||
|
||||
#include "moc_qgraphicsview.cpp"
|
||||
|
||||
#endif // QT_NO_GRAPHICSVIEW
|
||||
|
|
|
|||
|
|
@ -46,11 +46,10 @@
|
|||
#include <QtWidgets/qscrollarea.h>
|
||||
#include <QtWidgets/qgraphicsscene.h>
|
||||
|
||||
QT_REQUIRE_CONFIG(graphicsview);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
#if !defined(QT_NO_GRAPHICSVIEW)
|
||||
|
||||
class QGraphicsItem;
|
||||
class QPainterPath;
|
||||
class QPolygonF;
|
||||
|
|
@ -313,8 +312,6 @@ inline QPoint QGraphicsView::mapFromScene(qreal ax, qreal ay) const
|
|||
inline QPolygon QGraphicsView::mapFromScene(qreal ax, qreal ay, qreal w, qreal h) const
|
||||
{ return mapFromScene(QRectF(ax, ay, w, h)); }
|
||||
|
||||
#endif // QT_NO_GRAPHICSVIEW
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QGRAPHICSVIEW_H
|
||||
|
|
|
|||
|
|
@ -54,8 +54,6 @@
|
|||
#include <QtWidgets/private/qtwidgetsglobal_p.h>
|
||||
#include "qgraphicsview.h"
|
||||
|
||||
#if !defined(QT_NO_GRAPHICSVIEW)
|
||||
|
||||
#include <QtGui/qevent.h>
|
||||
#include <QtCore/qcoreapplication.h>
|
||||
#include "qgraphicssceneevent.h"
|
||||
|
|
@ -63,6 +61,8 @@
|
|||
#include <private/qabstractscrollarea_p.h>
|
||||
#include <private/qapplication_p.h>
|
||||
|
||||
QT_REQUIRE_CONFIG(graphicsview);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class Q_WIDGETS_EXPORT QGraphicsViewPrivate : public QAbstractScrollAreaPrivate
|
||||
|
|
@ -231,6 +231,4 @@ public:
|
|||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_GRAPHICSVIEW
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -39,8 +39,6 @@
|
|||
|
||||
#include "qglobal.h"
|
||||
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
|
||||
#include "qgraphicswidget.h"
|
||||
#include "qgraphicswidget_p.h"
|
||||
#include "qgraphicslayout.h"
|
||||
|
|
@ -2425,5 +2423,3 @@ void QGraphicsWidget::dumpFocusChain()
|
|||
QT_END_NAMESPACE
|
||||
|
||||
#include "moc_qgraphicswidget.cpp"
|
||||
|
||||
#endif //QT_NO_GRAPHICSVIEW
|
||||
|
|
|
|||
|
|
@ -46,8 +46,9 @@
|
|||
#include <QtWidgets/qgraphicsitem.h>
|
||||
#include <QtGui/qpalette.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
QT_REQUIRE_CONFIG(graphicsview);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QFont;
|
||||
class QFontMetrics;
|
||||
|
|
@ -58,8 +59,6 @@ class QGraphicsSceneResizeEvent;
|
|||
class QStyle;
|
||||
class QStyleOption;
|
||||
|
||||
#if !defined(QT_NO_GRAPHICSVIEW)
|
||||
|
||||
class QGraphicsWidgetPrivate;
|
||||
|
||||
class Q_WIDGETS_EXPORT QGraphicsWidget : public QGraphicsObject, public QGraphicsLayoutItem
|
||||
|
|
@ -239,8 +238,6 @@ private:
|
|||
inline void QGraphicsWidget::setGeometry(qreal ax, qreal ay, qreal aw, qreal ah)
|
||||
{ setGeometry(QRectF(ax, ay, aw, ah)); }
|
||||
|
||||
#endif
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -39,8 +39,6 @@
|
|||
|
||||
#include "qglobal.h"
|
||||
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
|
||||
#include <QtCore/qdebug.h>
|
||||
#include <QtCore/qnumeric.h>
|
||||
#include "qgraphicswidget_p.h"
|
||||
|
|
@ -900,5 +898,3 @@ void QGraphicsWidgetPrivate::setGeometryFromSetPos()
|
|||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif //QT_NO_GRAPHICSVIEW
|
||||
|
|
|
|||
|
|
@ -60,13 +60,13 @@
|
|||
#include <QtWidgets/qsizepolicy.h>
|
||||
#include <QtWidgets/qstyle.h>
|
||||
|
||||
QT_REQUIRE_CONFIG(graphicsview);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QGraphicsLayout;
|
||||
class QStyleOptionTitleBar;
|
||||
|
||||
#if !defined(QT_NO_GRAPHICSVIEW)
|
||||
|
||||
class QGraphicsWidgetPrivate : public QGraphicsItemPrivate
|
||||
{
|
||||
Q_DECLARE_PUBLIC(QGraphicsWidget)
|
||||
|
|
@ -201,8 +201,6 @@ public:
|
|||
#endif
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif //QGRAPHICSWIDGET_P_H
|
||||
|
|
|
|||
|
|
@ -56,6 +56,8 @@
|
|||
#include <QtCore/qpair.h>
|
||||
#include <QtCore/qstring.h>
|
||||
|
||||
QT_REQUIRE_CONFIG(graphicsview);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
struct QSimplexVariable
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ void QActionPrivate::sendDataChanged()
|
|||
QWidget *w = widgets.at(i);
|
||||
QApplication::sendEvent(w, &e);
|
||||
}
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
for (int i = 0; i < graphicsWidgets.size(); ++i) {
|
||||
QGraphicsWidget *w = graphicsWidgets.at(i);
|
||||
QApplication::sendEvent(w, &e);
|
||||
|
|
@ -360,7 +360,7 @@ QList<QWidget *> QAction::associatedWidgets() const
|
|||
return d->widgets;
|
||||
}
|
||||
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
/*!
|
||||
\since 4.5
|
||||
Returns a list of widgets this action has been added to.
|
||||
|
|
@ -565,7 +565,7 @@ QAction::~QAction()
|
|||
QWidget *w = d->widgets.at(i);
|
||||
w->removeAction(this);
|
||||
}
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
for (int i = d->graphicsWidgets.size()-1; i >= 0; --i) {
|
||||
QGraphicsWidget *w = d->graphicsWidgets.at(i);
|
||||
w->removeAction(this);
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@ public:
|
|||
QWidget *parentWidget() const;
|
||||
|
||||
QList<QWidget *> associatedWidgets() const;
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
QList<QGraphicsWidget *> associatedGraphicsWidgets() const; // ### suboptimal
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -54,7 +54,9 @@
|
|||
#include <QtWidgets/private/qtwidgetsglobal_p.h>
|
||||
#include "QtWidgets/qaction.h"
|
||||
#include "QtWidgets/qmenu.h"
|
||||
#if QT_CONFIG(graphicsview)
|
||||
#include "private/qgraphicswidget_p.h"
|
||||
#endif
|
||||
#include "private/qobject_p.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
|
@ -111,7 +113,7 @@ public:
|
|||
QAction::Priority priority;
|
||||
|
||||
QList<QWidget *> widgets;
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
QList<QGraphicsWidget *> graphicsWidgets;
|
||||
#endif
|
||||
#ifndef QT_NO_SHORTCUT
|
||||
|
|
|
|||
|
|
@ -47,7 +47,10 @@
|
|||
#include "qevent.h"
|
||||
#include "qfile.h"
|
||||
#include "qfileinfo.h"
|
||||
#if QT_CONFIG(graphicsview)
|
||||
#include "qgraphicsscene.h"
|
||||
#include <QtWidgets/qgraphicsproxywidget.h>
|
||||
#endif
|
||||
#include "qhash.h"
|
||||
#include "qset.h"
|
||||
#include "qlayout.h"
|
||||
|
|
@ -70,7 +73,6 @@
|
|||
#include "qmessagebox.h"
|
||||
#endif
|
||||
#include "qwidgetwindow_p.h"
|
||||
#include <QtWidgets/qgraphicsproxywidget.h>
|
||||
#include <QtGui/qstylehints.h>
|
||||
#include <QtGui/qinputmethod.h>
|
||||
#include <QtGui/private/qwindow_p.h>
|
||||
|
|
@ -1443,13 +1445,13 @@ void QApplicationPrivate::setPalette_helper(const QPalette &palette, const char*
|
|||
}
|
||||
|
||||
// Send to all scenes as well.
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
QList<QGraphicsScene *> &scenes = qApp->d_func()->scene_list;
|
||||
for (QList<QGraphicsScene *>::ConstIterator it = scenes.constBegin();
|
||||
it != scenes.constEnd(); ++it) {
|
||||
QApplication::sendEvent(*it, &e);
|
||||
}
|
||||
#endif //QT_NO_GRAPHICSVIEW
|
||||
#endif // QT_CONFIG(graphicsview)
|
||||
}
|
||||
if (!className && (!QApplicationPrivate::sys_pal || !palette.isCopyOf(*QApplicationPrivate::sys_pal))) {
|
||||
if (!QApplicationPrivate::set_pal)
|
||||
|
|
@ -1627,14 +1629,14 @@ void QApplication::setFont(const QFont &font, const char *className)
|
|||
sendEvent(w, &e);
|
||||
}
|
||||
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
// Send to all scenes as well.
|
||||
QList<QGraphicsScene *> &scenes = qApp->d_func()->scene_list;
|
||||
for (QList<QGraphicsScene *>::ConstIterator it = scenes.constBegin();
|
||||
it != scenes.constEnd(); ++it) {
|
||||
QApplication::sendEvent(*it, &e);
|
||||
}
|
||||
#endif //QT_NO_GRAPHICSVIEW
|
||||
#endif // QT_CONFIG(graphicsview)
|
||||
}
|
||||
if (!className && (!QApplicationPrivate::sys_font || !font.isCopyOf(*QApplicationPrivate::sys_font))) {
|
||||
if (!QApplicationPrivate::set_font)
|
||||
|
|
@ -1769,7 +1771,7 @@ QWidget *QApplication::focusWidget()
|
|||
|
||||
void QApplicationPrivate::setFocusWidget(QWidget *focus, Qt::FocusReason reason)
|
||||
{
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
if (focus && focus->window()->graphicsProxyWidget())
|
||||
return;
|
||||
#endif
|
||||
|
|
@ -2076,7 +2078,7 @@ void QApplication::setActiveWindow(QWidget* act)
|
|||
if (QApplicationPrivate::active_window == window)
|
||||
return;
|
||||
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
if (window && window->graphicsProxyWidget()) {
|
||||
// Activate the proxy's view->viewport() ?
|
||||
return;
|
||||
|
|
@ -2386,7 +2388,7 @@ void QApplicationPrivate::dispatchEnterLeave(QWidget* enter, QWidget* leave, con
|
|||
//check that we will not call qt_x11_enforce_cursor twice with the same native widget
|
||||
if (parentOfLeavingCursor && (!enterOnAlien
|
||||
|| parentOfLeavingCursor->effectiveWinId() != enter->effectiveWinId())) {
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
if (!parentOfLeavingCursor->window()->graphicsProxyWidget())
|
||||
#endif
|
||||
{
|
||||
|
|
@ -2405,7 +2407,7 @@ void QApplicationPrivate::dispatchEnterLeave(QWidget* enter, QWidget* leave, con
|
|||
if (!cursorWidget)
|
||||
return;
|
||||
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
if (cursorWidget->window()->graphicsProxyWidget()) {
|
||||
QWidgetPrivate::nearestGraphicsProxyWidget(cursorWidget)->setCursor(cursorWidget->cursor());
|
||||
} else
|
||||
|
|
@ -3096,7 +3098,7 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
|
|||
case QEvent::KeyRelease:
|
||||
{
|
||||
bool isWidget = receiver->isWidgetType();
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
const bool isGraphicsWidget = !isWidget && qobject_cast<QGraphicsWidget *>(receiver);
|
||||
#endif
|
||||
QKeyEvent* key = static_cast<QKeyEvent*>(e);
|
||||
|
|
@ -3108,7 +3110,7 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
|
|||
else
|
||||
key->ignore();
|
||||
QWidget *w = isWidget ? static_cast<QWidget *>(receiver) : 0;
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
QGraphicsWidget *gw = isGraphicsWidget ? static_cast<QGraphicsWidget *>(receiver) : 0;
|
||||
#endif
|
||||
res = d->notify_helper(receiver, e);
|
||||
|
|
@ -3128,14 +3130,14 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
|
|||
*/
|
||||
|| !pr
|
||||
|| (isWidget && (w->isWindow() || !w->parentWidget()))
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
|| (isGraphicsWidget && (gw->isWindow() || !gw->parentWidget()))
|
||||
#endif
|
||||
) {
|
||||
break;
|
||||
}
|
||||
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
receiver = w ? (QObject *)w->parentWidget() : (QObject *)gw->parentWidget();
|
||||
#else
|
||||
receiver = w->parentWidget();
|
||||
|
|
@ -3428,7 +3430,7 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
|
|||
case QEvent::DragEnter: {
|
||||
QWidget* w = static_cast<QWidget *>(receiver);
|
||||
QDragEnterEvent *dragEvent = static_cast<QDragEnterEvent *>(e);
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
// QGraphicsProxyWidget handles its own propagation,
|
||||
// and we must not change QDragManagers currentTarget.
|
||||
QWExtra *extra = w->window()->d_func()->extra;
|
||||
|
|
@ -3456,7 +3458,7 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
|
|||
case QEvent::Drop:
|
||||
case QEvent::DragLeave: {
|
||||
QWidget* w = static_cast<QWidget *>(receiver);
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
// QGraphicsProxyWidget handles its own propagation,
|
||||
// and we must not change QDragManagers currentTarget.
|
||||
QWExtra *extra = w->window()->d_func()->extra;
|
||||
|
|
@ -3478,7 +3480,7 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
|
|||
}
|
||||
res = d->notify_helper(w, e);
|
||||
if (e->type() != QEvent::DragMove
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
&& !isProxyWidget
|
||||
#endif
|
||||
)
|
||||
|
|
|
|||
|
|
@ -165,7 +165,7 @@ public:
|
|||
static QWidget *focusNextPrevChild_helper(QWidget *toplevel, bool next,
|
||||
bool *wrappingOccurred = 0);
|
||||
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
// Maintain a list of all scenes to ensure font and palette propagation to
|
||||
// all scenes.
|
||||
QList<QGraphicsScene *> scene_list;
|
||||
|
|
|
|||
|
|
@ -40,7 +40,9 @@
|
|||
#include "qgesture.h"
|
||||
#include "private/qgesture_p.h"
|
||||
#include "private/qstandardgestures_p.h"
|
||||
#if QT_CONFIG(graphicsview)
|
||||
#include "qgraphicsview.h"
|
||||
#endif
|
||||
|
||||
#include <private/qdebug_p.h>
|
||||
#ifndef QT_NO_GESTURES
|
||||
|
|
@ -1067,7 +1069,7 @@ QWidget *QGestureEvent::widget() const
|
|||
return m_widget;
|
||||
}
|
||||
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
/*!
|
||||
Returns the scene-local coordinates if the \a gesturePoint is inside a
|
||||
graphics view.
|
||||
|
|
@ -1089,7 +1091,7 @@ QPointF QGestureEvent::mapToGraphicsScene(const QPointF &gesturePoint) const
|
|||
}
|
||||
return QPointF();
|
||||
}
|
||||
#endif //QT_NO_GRAPHICSVIEW
|
||||
#endif // QT_CONFIG(graphicsview)
|
||||
|
||||
#ifndef QT_NO_DEBUG_STREAM
|
||||
|
||||
|
|
|
|||
|
|
@ -301,7 +301,7 @@ public:
|
|||
void setWidget(QWidget *widget);
|
||||
QWidget *widget() const;
|
||||
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
QPointF mapToGraphicsScene(const QPointF &gesturePoint) const;
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -41,13 +41,15 @@
|
|||
#include "private/qstandardgestures_p.h"
|
||||
#include "private/qwidget_p.h"
|
||||
#include "private/qgesture_p.h"
|
||||
#if QT_CONFIG(graphicsview)
|
||||
#include "private/qgraphicsitem_p.h"
|
||||
#include "qgraphicsitem.h"
|
||||
#endif
|
||||
#include "private/qevent_p.h"
|
||||
#include "private/qapplication_p.h"
|
||||
#include "private/qwidgetwindow_p.h"
|
||||
#include "qgesture.h"
|
||||
#include "qevent.h"
|
||||
#include "qgraphicsitem.h"
|
||||
|
||||
#ifdef Q_OS_OSX
|
||||
#include "qmacgesturerecognizer_p.h"
|
||||
|
|
@ -209,7 +211,7 @@ QGesture *QGestureManager::getState(QObject *object, QGestureRecognizer *recogni
|
|||
return 0;
|
||||
} else if (QGesture *g = qobject_cast<QGesture *>(object)) {
|
||||
return g;
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
} else {
|
||||
Q_ASSERT(qobject_cast<QGraphicsObject *>(object));
|
||||
QGraphicsObject *graphicsObject = static_cast<QGraphicsObject *>(object);
|
||||
|
|
@ -512,7 +514,7 @@ bool QGestureManager::filterEvent(QWidget *receiver, QEvent *event)
|
|||
return contexts.isEmpty() ? false : filterEventThroughContexts(contexts, event);
|
||||
}
|
||||
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
bool QGestureManager::filterEvent(QGraphicsObject *receiver, QEvent *event)
|
||||
{
|
||||
QMap<Qt::GestureType, int> types;
|
||||
|
|
|
|||
|
|
@ -75,9 +75,9 @@ public:
|
|||
|
||||
bool filterEvent(QWidget *receiver, QEvent *event);
|
||||
bool filterEvent(QObject *receiver, QEvent *event);
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
bool filterEvent(QGraphicsObject *receiver, QEvent *event);
|
||||
#endif //QT_NO_GRAPHICSVIEW
|
||||
#endif // QT_CONFIG(graphicsview)
|
||||
|
||||
static QGestureManager* instance(); // declared in qapplication.cpp
|
||||
static bool gesturePending(QObject *o);
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ QT_BEGIN_NAMESPACE
|
|||
|
||||
|
||||
static bool correctWidgetContext(Qt::ShortcutContext context, QWidget *w, QWidget *active_window);
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
static bool correctGraphicsWidgetContext(Qt::ShortcutContext context, QGraphicsWidget *w, QWidget *active_window);
|
||||
#endif
|
||||
#ifndef QT_NO_ACTION
|
||||
|
|
@ -110,7 +110,7 @@ bool qWidgetShortcutContextMatcher(QObject *object, Qt::ShortcutContext context)
|
|||
return correctActionContext(context, a, active_window);
|
||||
#endif
|
||||
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
if (QGraphicsWidget *gw = qobject_cast<QGraphicsWidget *>(object))
|
||||
return correctGraphicsWidgetContext(context, gw, active_window);
|
||||
#endif
|
||||
|
|
@ -168,7 +168,7 @@ static bool correctWidgetContext(Qt::ShortcutContext context, QWidget *w, QWidge
|
|||
|
||||
// Below is Qt::WindowShortcut context
|
||||
QWidget *tlw = w->window();
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
if (QWExtra *topData = static_cast<QWidgetPrivate *>(QObjectPrivate::get(tlw))->extra) {
|
||||
if (topData->proxyWidget) {
|
||||
bool res = correctGraphicsWidgetContext(context, (QGraphicsWidget *)topData->proxyWidget, active_window);
|
||||
|
|
@ -204,7 +204,7 @@ static bool correctWidgetContext(Qt::ShortcutContext context, QWidget *w, QWidge
|
|||
return true;
|
||||
}
|
||||
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
static bool correctGraphicsWidgetContext(Qt::ShortcutContext context, QGraphicsWidget *w, QWidget *active_window)
|
||||
{
|
||||
bool visible = w->isVisible();
|
||||
|
|
@ -298,7 +298,7 @@ static bool correctActionContext(Qt::ShortcutContext context, QAction *a, QWidge
|
|||
return true;
|
||||
}
|
||||
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
const QList<QGraphicsWidget *> &graphicsWidgets = static_cast<QActionPrivate *>(QObjectPrivate::get(a))->graphicsWidgets;
|
||||
#if defined(DEBUG_QSHORTCUTMAP)
|
||||
if (graphicsWidgets.isEmpty())
|
||||
|
|
|
|||
|
|
@ -43,7 +43,9 @@
|
|||
#include "qevent.h"
|
||||
#include "qwidget.h"
|
||||
#include "qabstractscrollarea.h"
|
||||
#if QT_CONFIG(graphicsview)
|
||||
#include <qgraphicssceneevent.h>
|
||||
#endif
|
||||
#include "qdebug.h"
|
||||
|
||||
#ifndef QT_NO_GESTURES
|
||||
|
|
@ -511,7 +513,7 @@ QTapAndHoldGestureRecognizer::recognize(QGesture *state, QObject *object,
|
|||
enum { TapRadius = 40 };
|
||||
|
||||
switch (event->type()) {
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
case QEvent::GraphicsSceneMousePress: {
|
||||
const QGraphicsSceneMouseEvent *gsme = static_cast<const QGraphicsSceneMouseEvent *>(event);
|
||||
d->position = gsme->screenPos();
|
||||
|
|
@ -540,7 +542,7 @@ QTapAndHoldGestureRecognizer::recognize(QGesture *state, QObject *object,
|
|||
d->timerId = q->startTimer(QTapAndHoldGesturePrivate::Timeout);
|
||||
return QGestureRecognizer::MayBeGesture; // we don't show a sign of life until the timeout
|
||||
}
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
case QEvent::GraphicsSceneMouseRelease:
|
||||
#endif
|
||||
case QEvent::MouseButtonRelease:
|
||||
|
|
@ -563,7 +565,7 @@ QTapAndHoldGestureRecognizer::recognize(QGesture *state, QObject *object,
|
|||
return QGestureRecognizer::MayBeGesture;
|
||||
return QGestureRecognizer::CancelGesture;
|
||||
}
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
case QEvent::GraphicsSceneMouseMove: {
|
||||
const QGraphicsSceneMouseEvent *gsme = static_cast<const QGraphicsSceneMouseEvent *>(event);
|
||||
QPoint delta = gsme->screenPos() - d->position.toPoint();
|
||||
|
|
|
|||
|
|
@ -98,9 +98,11 @@
|
|||
#include <QtGui/private/qwindow_p.h>
|
||||
#include "qaction_p.h"
|
||||
#include "qlayout_p.h"
|
||||
#if QT_CONFIG(graphicsview)
|
||||
#include "QtWidgets/qgraphicsproxywidget.h"
|
||||
#include "QtWidgets/qgraphicsscene.h"
|
||||
#include "private/qgraphicsproxywidget_p.h"
|
||||
#endif
|
||||
#include "QtWidgets/qabstractscrollarea.h"
|
||||
#include "private/qabstractscrollarea_p.h"
|
||||
#include "private/qevent_p.h"
|
||||
|
|
@ -1615,7 +1617,7 @@ QWidget::~QWidget()
|
|||
|
||||
|
||||
QT_TRY {
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
const QWidget* w = this;
|
||||
while (w->d_func()->extra && w->d_func()->extra->focus_proxy)
|
||||
w = w->d_func()->extra->focus_proxy;
|
||||
|
|
@ -1802,7 +1804,7 @@ void QWidgetPrivate::createExtra()
|
|||
extra = new QWExtra;
|
||||
extra->glContext = 0;
|
||||
extra->topextra = 0;
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
extra->proxyWidget = 0;
|
||||
#endif
|
||||
#ifndef QT_NO_CURSOR
|
||||
|
|
@ -2018,12 +2020,12 @@ void QWidgetPrivate::propagatePaletteChange()
|
|||
{
|
||||
Q_Q(QWidget);
|
||||
// Propagate a new inherited mask to all children.
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
if (!q->parentWidget() && extra && extra->proxyWidget) {
|
||||
QGraphicsProxyWidget *p = extra->proxyWidget;
|
||||
inheritedPaletteResolveMask = p->d_func()->inheritedPaletteResolveMask | p->palette().resolve();
|
||||
} else
|
||||
#endif //QT_NO_GRAPHICSVIEW
|
||||
#endif // QT_CONFIG(graphicsview)
|
||||
if (q->isWindow() && !q->testAttribute(Qt::WA_WindowPropagation)) {
|
||||
inheritedPaletteResolveMask = 0;
|
||||
}
|
||||
|
|
@ -4042,7 +4044,7 @@ void QWidget::setMinimumSize(int minw, int minh)
|
|||
if (maximized)
|
||||
data->window_state = data->window_state | Qt::WindowMaximized;
|
||||
}
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
if (d->extra) {
|
||||
if (d->extra->proxyWidget)
|
||||
d->extra->proxyWidget->setMinimumSize(minw, minh);
|
||||
|
|
@ -4100,7 +4102,7 @@ void QWidget::setMaximumSize(int maxw, int maxh)
|
|||
setAttribute(Qt::WA_Resized, resized); //not a user resize
|
||||
}
|
||||
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
if (d->extra) {
|
||||
if (d->extra->proxyWidget)
|
||||
d->extra->proxyWidget->setMaximumSize(maxw, maxh);
|
||||
|
|
@ -4618,9 +4620,9 @@ QPalette QWidgetPrivate::naturalWidgetPalette(uint inheritedMask) const
|
|||
QPalette naturalPalette = QApplication::palette(q);
|
||||
if ((!q->testAttribute(Qt::WA_StyleSheet) || useStyleSheetPropagationInWidgetStyles)
|
||||
&& (!q->isWindow() || q->testAttribute(Qt::WA_WindowPropagation)
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
|| (extra && extra->proxyWidget)
|
||||
#endif //QT_NO_GRAPHICSVIEW
|
||||
#endif // QT_CONFIG(graphicsview)
|
||||
)) {
|
||||
if (QWidget *p = q->parentWidget()) {
|
||||
if (!p->testAttribute(Qt::WA_StyleSheet) || useStyleSheetPropagationInWidgetStyles) {
|
||||
|
|
@ -4633,13 +4635,13 @@ QPalette QWidgetPrivate::naturalWidgetPalette(uint inheritedMask) const
|
|||
}
|
||||
}
|
||||
}
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
else if (extra && extra->proxyWidget) {
|
||||
QPalette inheritedPalette = extra->proxyWidget->palette();
|
||||
inheritedPalette.resolve(inheritedMask);
|
||||
naturalPalette = inheritedPalette.resolve(naturalPalette);
|
||||
}
|
||||
#endif //QT_NO_GRAPHICSVIEW
|
||||
#endif // QT_CONFIG(graphicsview)
|
||||
}
|
||||
naturalPalette.resolve(0);
|
||||
return naturalPalette;
|
||||
|
|
@ -4766,9 +4768,9 @@ QFont QWidgetPrivate::naturalWidgetFont(uint inheritedMask) const
|
|||
QFont naturalFont = QApplication::font(q);
|
||||
if ((!q->testAttribute(Qt::WA_StyleSheet) || useStyleSheetPropagationInWidgetStyles)
|
||||
&& (!q->isWindow() || q->testAttribute(Qt::WA_WindowPropagation)
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
|| (extra && extra->proxyWidget)
|
||||
#endif //QT_NO_GRAPHICSVIEW
|
||||
#endif // QT_CONFIG(graphicsview)
|
||||
)) {
|
||||
if (QWidget *p = q->parentWidget()) {
|
||||
if (!p->testAttribute(Qt::WA_StyleSheet) || useStyleSheetPropagationInWidgetStyles) {
|
||||
|
|
@ -4783,7 +4785,7 @@ QFont QWidgetPrivate::naturalWidgetFont(uint inheritedMask) const
|
|||
}
|
||||
}
|
||||
}
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
else if (extra && extra->proxyWidget) {
|
||||
if (inheritedMask != 0) {
|
||||
QFont inheritedFont = extra->proxyWidget->font();
|
||||
|
|
@ -4791,7 +4793,7 @@ QFont QWidgetPrivate::naturalWidgetFont(uint inheritedMask) const
|
|||
naturalFont = inheritedFont.resolve(naturalFont);
|
||||
} // else nothing to do (naturalFont = naturalFont)
|
||||
}
|
||||
#endif //QT_NO_GRAPHICSVIEW
|
||||
#endif // QT_CONFIG(graphicsview)
|
||||
}
|
||||
naturalFont.resolve(0);
|
||||
return naturalFont;
|
||||
|
|
@ -4837,12 +4839,12 @@ void QWidgetPrivate::updateFont(const QFont &font)
|
|||
data.fnt.x11SetScreen(xinfo.screen());
|
||||
#endif
|
||||
// Combine new mask with natural mask and propagate to children.
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
if (!q->parentWidget() && extra && extra->proxyWidget) {
|
||||
QGraphicsProxyWidget *p = extra->proxyWidget;
|
||||
inheritedFontResolveMask = p->d_func()->inheritedFontResolveMask | p->font().resolve();
|
||||
} else
|
||||
#endif //QT_NO_GRAPHICSVIEW
|
||||
#endif // QT_CONFIG(graphicsview)
|
||||
if (q->isWindow() && !q->testAttribute(Qt::WA_WindowPropagation)) {
|
||||
inheritedFontResolveMask = 0;
|
||||
}
|
||||
|
|
@ -5840,9 +5842,9 @@ void QWidgetPrivate::paintSiblingsRecursive(QPaintDevice *pdev, const QObjectLis
|
|||
}
|
||||
|
||||
if (w->updatesEnabled()
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
&& (!w->d_func()->extra || !w->d_func()->extra->proxyWidget)
|
||||
#endif //QT_NO_GRAPHICSVIEW
|
||||
#endif // QT_CONFIG(graphicsview)
|
||||
) {
|
||||
QRegion wRegion(rgn);
|
||||
wRegion &= wd->effectiveRectFor(w->data->crect);
|
||||
|
|
@ -5930,7 +5932,7 @@ QPixmap QWidgetEffectSourcePrivate::pixmap(Qt::CoordinateSystem system, QPoint *
|
|||
}
|
||||
#endif // QT_CONFIG(graphicseffect)
|
||||
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
/*!
|
||||
\internal
|
||||
|
||||
|
|
@ -6481,13 +6483,13 @@ bool QWidget::hasFocus() const
|
|||
const QWidget* w = this;
|
||||
while (w->d_func()->extra && w->d_func()->extra->focus_proxy)
|
||||
w = w->d_func()->extra->focus_proxy;
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
if (QWidget *window = w->window()) {
|
||||
QWExtra *e = window->d_func()->extra;
|
||||
if (e && e->proxyWidget && e->proxyWidget->hasFocus() && window->focusWidget() == w)
|
||||
return true;
|
||||
}
|
||||
#endif // !QT_NO_GRAPHICSVIEW
|
||||
#endif // QT_CONFIG(graphicsview)
|
||||
return (QApplication::focusWidget() == w);
|
||||
}
|
||||
|
||||
|
|
@ -6542,7 +6544,7 @@ void QWidget::setFocus(Qt::FocusReason reason)
|
|||
)
|
||||
return;
|
||||
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
QWidget *previousProxyFocus = 0;
|
||||
if (QWExtra *topData = window()->d_func()->extra) {
|
||||
if (topData->proxyWidget && topData->proxyWidget->hasFocus()) {
|
||||
|
|
@ -6555,7 +6557,7 @@ void QWidget::setFocus(Qt::FocusReason reason)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
// Update proxy state
|
||||
if (QWExtra *topData = window()->d_func()->extra) {
|
||||
if (topData->proxyWidget && !topData->proxyWidget->hasFocus()) {
|
||||
|
|
@ -6597,7 +6599,7 @@ void QWidget::setFocus(Qt::FocusReason reason)
|
|||
QAccessible::updateAccessibility(&event);
|
||||
}
|
||||
#endif
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
if (QWExtra *topData = window()->d_func()->extra) {
|
||||
if (topData->proxyWidget) {
|
||||
if (previousProxyFocus && previousProxyFocus != f) {
|
||||
|
|
@ -6609,7 +6611,7 @@ void QWidget::setFocus(Qt::FocusReason reason)
|
|||
QApplication::sendEvent(that->style(), &event);
|
||||
}
|
||||
if (!isHidden()) {
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
// Update proxy state
|
||||
if (QWExtra *topData = window()->d_func()->extra)
|
||||
if (topData->proxyWidget && topData->proxyWidget->hasFocus())
|
||||
|
|
@ -6718,7 +6720,7 @@ void QWidget::clearFocus()
|
|||
emit extra->window->focusObjectChanged(extra->window->focusObject());
|
||||
}
|
||||
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
QWExtra *topData = d_func()->extra;
|
||||
if (topData && topData->proxyWidget)
|
||||
topData->proxyWidget->clearFocus();
|
||||
|
|
@ -6790,7 +6792,7 @@ bool QWidget::focusNextPrevChild(bool next)
|
|||
bool isSubWindow = (windowType() == Qt::SubWindow);
|
||||
if (!isWindow() && !isSubWindow && p)
|
||||
return p->focusNextPrevChild(next);
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
Q_D(QWidget);
|
||||
if (d->extra && d->extra->proxyWidget)
|
||||
return d->extra->proxyWidget->focusNextPrevChild(next);
|
||||
|
|
@ -6884,7 +6886,7 @@ bool QWidget::isActiveWindow() const
|
|||
if(tlw == QApplication::activeWindow() || (isVisible() && (tlw->windowType() == Qt::Popup)))
|
||||
return true;
|
||||
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
if (QWExtra *tlwExtra = tlw->d_func()->extra) {
|
||||
if (isVisible() && tlwExtra->proxyWidget)
|
||||
return tlwExtra->proxyWidget->isActiveWindow();
|
||||
|
|
@ -7895,7 +7897,7 @@ void QWidgetPrivate::show_helper()
|
|||
|
||||
|
||||
const bool isWindow = q->isWindow();
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
bool isEmbedded = isWindow && q->graphicsProxyWidget() != Q_NULLPTR;
|
||||
#else
|
||||
bool isEmbedded = false;
|
||||
|
|
@ -7919,7 +7921,7 @@ void QWidgetPrivate::show_helper()
|
|||
|
||||
// Automatic embedding of child windows of widgets already embedded into
|
||||
// QGraphicsProxyWidget when they are shown the first time.
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
if (isWindow) {
|
||||
if (!isEmbedded && !bypassGraphicsProxyWidget(q)) {
|
||||
QGraphicsProxyWidget *ancestorProxy = nearestGraphicsProxyWidget(q->parentWidget());
|
||||
|
|
@ -7982,7 +7984,7 @@ void QWidgetPrivate::show_sys()
|
|||
q->setAttribute(Qt::WA_Mapped);
|
||||
// add our window the modal window list (native dialogs)
|
||||
if (window && q->isWindow()
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
&& (!extra || !extra->proxyWidget)
|
||||
#endif
|
||||
&& q->windowModality() != Qt::NonModal) {
|
||||
|
|
@ -8056,7 +8058,7 @@ void QWidgetPrivate::hide_helper()
|
|||
Q_Q(QWidget);
|
||||
|
||||
bool isEmbedded = false;
|
||||
#if !defined QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
isEmbedded = q->isWindow() && !bypassGraphicsProxyWidget(q) && nearestGraphicsProxyWidget(q->parentWidget()) != 0;
|
||||
#else
|
||||
Q_UNUSED(isEmbedded);
|
||||
|
|
@ -8120,7 +8122,7 @@ void QWidgetPrivate::hide_sys()
|
|||
q->setAttribute(Qt::WA_Mapped, false);
|
||||
// remove our window from the modal window list (native dialogs)
|
||||
if (window && q->isWindow()
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
&& (!extra || !extra->proxyWidget)
|
||||
#endif
|
||||
&& q->windowModality() != Qt::NonModal) {
|
||||
|
|
@ -10238,7 +10240,7 @@ void QWidget::setSizePolicy(QSizePolicy policy)
|
|||
|
||||
d->size_policy = policy;
|
||||
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
if (QWExtra *extra = d->extra) {
|
||||
if (extra->proxyWidget)
|
||||
extra->proxyWidget->setSizePolicy(policy);
|
||||
|
|
@ -10669,7 +10671,7 @@ void QWidget::setParent(QWidget *parent, Qt::WindowFlags f)
|
|||
|
||||
d->updateIsOpaque();
|
||||
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
// Embed the widget into a proxy if the parent is embedded.
|
||||
// ### Doesn't handle reparenting out of an embedded widget.
|
||||
if (oldtlw->graphicsProxyWidget()) {
|
||||
|
|
@ -10811,7 +10813,7 @@ void QWidget::scroll(int dx, int dy)
|
|||
if (dx == 0 && dy == 0)
|
||||
return;
|
||||
Q_D(QWidget);
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
if (QGraphicsProxyWidget *proxy = QWidgetPrivate::nearestGraphicsProxyWidget(this)) {
|
||||
// Graphics View maintains its own dirty region as a list of rects;
|
||||
// until we can connect item updates directly to the view, we must
|
||||
|
|
@ -10851,7 +10853,7 @@ void QWidget::scroll(int dx, int dy, const QRect &r)
|
|||
if (dx == 0 && dy == 0)
|
||||
return;
|
||||
Q_D(QWidget);
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
if (QGraphicsProxyWidget *proxy = QWidgetPrivate::nearestGraphicsProxyWidget(this)) {
|
||||
// Graphics View maintains its own dirty region as a list of rects;
|
||||
// until we can connect item updates directly to the view, we must
|
||||
|
|
@ -11430,7 +11432,7 @@ void QWidget::setWindowOpacity(qreal opacity)
|
|||
if (!testAttribute(Qt::WA_WState_Created))
|
||||
return;
|
||||
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
if (QGraphicsProxyWidget *proxy = graphicsProxyWidget()) {
|
||||
// Avoid invalidating the cache if set.
|
||||
if (proxy->cacheMode() == QGraphicsItem::NoCache)
|
||||
|
|
@ -12298,7 +12300,7 @@ Q_WIDGETS_EXPORT QWidgetPrivate *qt_widget_private(QWidget *widget)
|
|||
}
|
||||
|
||||
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
/*!
|
||||
\since 4.5
|
||||
|
||||
|
|
@ -12448,7 +12450,7 @@ static inline bool canMapPosition(QWindow *window)
|
|||
return window->handle() && !qt_window_private(window)->resizeEventPending;
|
||||
}
|
||||
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
static inline QGraphicsProxyWidget *graphicsProxyWidget(const QWidget *w)
|
||||
{
|
||||
QGraphicsProxyWidget *result = Q_NULLPTR;
|
||||
|
|
@ -12457,7 +12459,7 @@ static inline QGraphicsProxyWidget *graphicsProxyWidget(const QWidget *w)
|
|||
result = d->extra->proxyWidget;
|
||||
return result;
|
||||
}
|
||||
#endif // !QT_NO_GRAPHICSVIEW
|
||||
#endif // QT_CONFIG(graphicsview)
|
||||
|
||||
struct MapToGlobalTransformResult {
|
||||
QTransform transform;
|
||||
|
|
@ -12469,7 +12471,7 @@ static MapToGlobalTransformResult mapToGlobalTransform(const QWidget *w)
|
|||
MapToGlobalTransformResult result;
|
||||
result.window = Q_NULLPTR;
|
||||
for ( ; w ; w = w->parentWidget()) {
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
if (QGraphicsProxyWidget *qgpw = graphicsProxyWidget(w)) {
|
||||
if (const QGraphicsScene *scene = qgpw->scene()) {
|
||||
const QList <QGraphicsView *> views = scene->views();
|
||||
|
|
@ -12480,7 +12482,7 @@ static MapToGlobalTransformResult mapToGlobalTransform(const QWidget *w)
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif // !QT_NO_GRAPHICSVIEW
|
||||
#endif // QT_CONFIG(graphicsview)
|
||||
QWindow *window = w->windowHandle();
|
||||
if (window && canMapPosition(window)) {
|
||||
result.window = window;
|
||||
|
|
|
|||
|
|
@ -451,7 +451,7 @@ public:
|
|||
inline bool updatesEnabled() const;
|
||||
void setUpdatesEnabled(bool enable);
|
||||
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
QGraphicsProxyWidget *graphicsProxyWidget() const;
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -67,9 +67,11 @@
|
|||
#if QT_CONFIG(graphicseffect)
|
||||
#include <private/qgraphicseffect_p.h>
|
||||
#endif
|
||||
#if QT_CONFIG(graphicsview)
|
||||
#include "QtWidgets/qgraphicsproxywidget.h"
|
||||
#include "QtWidgets/qgraphicsscene.h"
|
||||
#include "QtWidgets/qgraphicsview.h"
|
||||
#endif
|
||||
#include <private/qgesture_p.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
|
@ -232,7 +234,7 @@ struct QWExtra {
|
|||
// Regular pointers (keep them together to avoid gaps on 64 bits architectures).
|
||||
void *glContext; // if the widget is hijacked by QGLWindowSurface
|
||||
QTLWExtra *topextra; // only useful for TLWs
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
QGraphicsProxyWidget *proxyWidget; // if the widget is embedded
|
||||
#endif
|
||||
#ifndef QT_NO_CURSOR
|
||||
|
|
@ -404,7 +406,7 @@ public:
|
|||
const QRegion &rgn, const QPoint &offset, int flags,
|
||||
QPainter *sharedPainter, QWidgetBackingStore *backingStore);
|
||||
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
static QGraphicsProxyWidget * nearestGraphicsProxyWidget(const QWidget *origin);
|
||||
#endif
|
||||
void repaint_sys(const QRegion &rgn);
|
||||
|
|
@ -532,7 +534,7 @@ public:
|
|||
static QRect screenGeometry(const QWidget *widget)
|
||||
{
|
||||
QRect screen;
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
QGraphicsProxyWidget *ancestorProxy = widget->d_func()->nearestGraphicsProxyWidget(widget);
|
||||
//It's embedded if it has an ancestor
|
||||
if (ancestorProxy) {
|
||||
|
|
|
|||
|
|
@ -48,7 +48,9 @@
|
|||
#include <QtGui/qevent.h>
|
||||
#include <QtWidgets/qapplication.h>
|
||||
#include <QtGui/qpaintengine.h>
|
||||
#if QT_CONFIG(graphicsview)
|
||||
#include <QtWidgets/qgraphicsproxywidget.h>
|
||||
#endif
|
||||
|
||||
#include <private/qwidget_p.h>
|
||||
#include <private/qapplication_p.h>
|
||||
|
|
@ -823,7 +825,7 @@ void QWidgetPrivate::moveRect(const QRect &rect, int dx, int dy)
|
|||
const bool nativeWithTextureChild = textureChildSeen && q->internalWinId();
|
||||
|
||||
bool accelerateMove = accelEnv && isOpaque && !nativeWithTextureChild
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
// No accelerate move for proxy widgets.
|
||||
&& !tlw->d_func()->extra->proxyWidget
|
||||
#endif
|
||||
|
|
@ -1239,7 +1241,7 @@ void QWidgetBackingStore::doSync()
|
|||
: wd->dirty);
|
||||
toClean += widgetDirty;
|
||||
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
if (tlw->d_func()->extra->proxyWidget) {
|
||||
resetWidget(w);
|
||||
continue;
|
||||
|
|
@ -1324,7 +1326,7 @@ void QWidgetBackingStore::doSync()
|
|||
dirtyRenderToTextureWidgets.clear();
|
||||
#endif
|
||||
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
if (tlw->d_func()->extra->proxyWidget) {
|
||||
updateStaticContentsSize();
|
||||
dirty = QRegion();
|
||||
|
|
|
|||
|
|
@ -40,7 +40,10 @@
|
|||
#include <QtCore/qstatemachine.h>
|
||||
#include <private/qstatemachine_p.h>
|
||||
#include <QtGui/qevent.h>
|
||||
#include <QtWidgets/qtwidgetsglobal.h>
|
||||
#if QT_CONFIG(graphicsview)
|
||||
#include <QtWidgets/qgraphicssceneevent.h>
|
||||
#endif
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
|
@ -285,7 +288,7 @@ static QEvent *cloneEvent(QEvent *e)
|
|||
case QEvent::ZeroTimerEvent:
|
||||
Q_ASSERT_X(false, "cloneEvent()", "not implemented");
|
||||
break;
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
case QEvent::GraphicsSceneMouseMove:
|
||||
case QEvent::GraphicsSceneMousePress:
|
||||
case QEvent::GraphicsSceneMouseRelease:
|
||||
|
|
@ -396,7 +399,7 @@ static QEvent *cloneEvent(QEvent *e)
|
|||
case QEvent::FutureCallOut:
|
||||
Q_ASSERT_X(false, "cloneEvent()", "not implemented");
|
||||
break;
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
case QEvent::GraphicsSceneResize: {
|
||||
QGraphicsSceneResizeEvent *re = static_cast<QGraphicsSceneResizeEvent*>(e);
|
||||
QGraphicsSceneResizeEvent *re2 = new QGraphicsSceneResizeEvent();
|
||||
|
|
|
|||
|
|
@ -117,7 +117,9 @@
|
|||
#endif
|
||||
#include <qmath.h>
|
||||
#include <QtWidgets/qgraphicsproxywidget.h>
|
||||
#if QT_CONFIG(graphicsview)
|
||||
#include <QtWidgets/qgraphicsview.h>
|
||||
#endif
|
||||
#include <QtCore/qvariant.h>
|
||||
#include <private/qstylehelper_p.h>
|
||||
#include <private/qstyleanimation_p.h>
|
||||
|
|
@ -6962,7 +6964,7 @@ bool QMacStyle::event(QEvent *e)
|
|||
if(e->type() == QEvent::FocusIn) {
|
||||
QWidget *f = 0;
|
||||
QWidget *focusWidget = QApplication::focusWidget();
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
if (QGraphicsView *graphicsView = qobject_cast<QGraphicsView *>(focusWidget)) {
|
||||
QGraphicsItem *focusItem = graphicsView->scene() ? graphicsView->scene()->focusItem() : 0;
|
||||
if (focusItem && focusItem->type() == QGraphicsProxyWidget::Type) {
|
||||
|
|
|
|||
|
|
@ -41,10 +41,12 @@
|
|||
#include "qapplication.h"
|
||||
#include "qevent.h"
|
||||
#include "qwidget.h"
|
||||
#if QT_CONFIG(graphicsview)
|
||||
#include "qgraphicsitem.h"
|
||||
#include "qgraphicsscene.h"
|
||||
#include "qgraphicssceneevent.h"
|
||||
#include "qgraphicsview.h"
|
||||
#endif
|
||||
#include "qscroller.h"
|
||||
#include <QtGui/qtouchdevice.h>
|
||||
#include "private/qapplication_p.h"
|
||||
|
|
@ -77,7 +79,7 @@ static QMouseEvent *copyMouseEvent(QEvent *e)
|
|||
me->button(), me->buttons(), me->modifiers(), me->source());
|
||||
return cme;
|
||||
}
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
case QEvent::GraphicsSceneMousePress:
|
||||
case QEvent::GraphicsSceneMouseRelease:
|
||||
case QEvent::GraphicsSceneMouseMove: {
|
||||
|
|
@ -110,7 +112,7 @@ static QMouseEvent *copyMouseEvent(QEvent *e)
|
|||
return copy;
|
||||
#endif
|
||||
}
|
||||
#endif // QT_NO_GRAPHICSVIEW
|
||||
#endif // QT_CONFIG(graphicsview)
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -275,7 +277,7 @@ protected:
|
|||
if (mouseTarget) {
|
||||
sendingEvent = true;
|
||||
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
QGraphicsItem *grabber = 0;
|
||||
if (mouseTarget->parentWidget()) {
|
||||
if (QGraphicsView *gv = qobject_cast<QGraphicsView *>(mouseTarget->parentWidget())) {
|
||||
|
|
@ -294,7 +296,7 @@ protected:
|
|||
}
|
||||
#else
|
||||
Q_UNUSED(flags);
|
||||
#endif // QT_NO_GRAPHICSVIEW
|
||||
#endif // QT_CONFIG(graphicsview)
|
||||
|
||||
if (me) {
|
||||
QMouseEvent copy(me->type(), mouseTarget->mapFromGlobal(me->globalPos()),
|
||||
|
|
@ -303,7 +305,7 @@ protected:
|
|||
qt_sendSpontaneousEvent(mouseTarget, ©);
|
||||
}
|
||||
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
if (grabber && (flags & RegrabMouseAfterwards)) {
|
||||
// GraphicsView Mouse Handling Workaround #2:
|
||||
// we need to re-grab the mouse after sending a faked mouse
|
||||
|
|
@ -376,7 +378,7 @@ QFlickGestureRecognizer::QFlickGestureRecognizer(Qt::MouseButton button)
|
|||
*/
|
||||
QGesture *QFlickGestureRecognizer::create(QObject *target)
|
||||
{
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
QGraphicsObject *go = qobject_cast<QGraphicsObject*>(target);
|
||||
if (go && button == Qt::NoButton) {
|
||||
go->setAcceptTouchEvents(true);
|
||||
|
|
@ -410,7 +412,7 @@ QGestureRecognizer::Result QFlickGestureRecognizer::recognize(QGesture *state,
|
|||
return Ignore; // nothing to do without a scroller?
|
||||
|
||||
QWidget *receiverWidget = qobject_cast<QWidget *>(d->receiver);
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
QGraphicsObject *receiverGraphicsObject = qobject_cast<QGraphicsObject *>(d->receiver);
|
||||
#endif
|
||||
|
||||
|
|
@ -421,7 +423,7 @@ QGestureRecognizer::Result QFlickGestureRecognizer::recognize(QGesture *state,
|
|||
}
|
||||
|
||||
const QMouseEvent *me = 0;
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
const QGraphicsSceneMouseEvent *gsme = 0;
|
||||
#endif
|
||||
const QTouchEvent *te = 0;
|
||||
|
|
@ -440,7 +442,7 @@ QGestureRecognizer::Result QFlickGestureRecognizer::recognize(QGesture *state,
|
|||
globalPos = me->globalPos();
|
||||
}
|
||||
break;
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
case QEvent::GraphicsSceneMousePress:
|
||||
case QEvent::GraphicsSceneMouseRelease:
|
||||
case QEvent::GraphicsSceneMouseMove:
|
||||
|
|
@ -494,7 +496,7 @@ QGestureRecognizer::Result QFlickGestureRecognizer::recognize(QGesture *state,
|
|||
}
|
||||
|
||||
if (!me
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
&& !gsme
|
||||
#endif
|
||||
&& !te) // Neither mouse nor touch
|
||||
|
|
@ -527,7 +529,7 @@ QGestureRecognizer::Result QFlickGestureRecognizer::recognize(QGesture *state,
|
|||
}
|
||||
break;
|
||||
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
case QEvent::GraphicsSceneMousePress:
|
||||
if (gsme && gsme->button() == button && gsme->buttons() == button) {
|
||||
point = gsme->scenePos();
|
||||
|
|
@ -590,7 +592,7 @@ QGestureRecognizer::Result QFlickGestureRecognizer::recognize(QGesture *state,
|
|||
|
||||
if (QWidget *w = qobject_cast<QWidget *>(as->target())) {
|
||||
scrollerRegion = QRect(w->mapToGlobal(QPoint(0, 0)), w->size());
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
} else if (QGraphicsObject *go = qobject_cast<QGraphicsObject *>(as->target())) {
|
||||
if (const auto *scene = go->scene()) {
|
||||
const auto goBoundingRectMappedToScene = go->mapToScene(go->boundingRect());
|
||||
|
|
@ -615,7 +617,7 @@ QGestureRecognizer::Result QFlickGestureRecognizer::recognize(QGesture *state,
|
|||
if (inputType) {
|
||||
if (QWidget *w = qobject_cast<QWidget *>(d->receiver))
|
||||
point = w->mapFromGlobal(point.toPoint());
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
else if (QGraphicsObject *go = qobject_cast<QGraphicsObject *>(d->receiver))
|
||||
point = go->mapFromScene(point);
|
||||
#endif
|
||||
|
|
@ -632,7 +634,7 @@ QGestureRecognizer::Result QFlickGestureRecognizer::recognize(QGesture *state,
|
|||
// Consume all mouse events while dragging or scrolling to avoid nasty
|
||||
// side effects with Qt's standard widgets.
|
||||
if ((me
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
|| gsme
|
||||
#endif
|
||||
) && scrollerIsActive)
|
||||
|
|
@ -644,7 +646,7 @@ QGestureRecognizer::Result QFlickGestureRecognizer::recognize(QGesture *state,
|
|||
// states of Qt's widgets (a QPushButton would stay in 'pressed' state
|
||||
// forever, if it doesn't receive a MouseRelease).
|
||||
if (me
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
|| gsme
|
||||
#endif
|
||||
) {
|
||||
|
|
@ -659,7 +661,7 @@ QGestureRecognizer::Result QFlickGestureRecognizer::recognize(QGesture *state,
|
|||
} else {
|
||||
switch (event->type()) {
|
||||
case QEvent::MouseButtonPress:
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
case QEvent::GraphicsSceneMousePress:
|
||||
#endif
|
||||
if (scroller->state() == QScroller::Pressed) {
|
||||
|
|
@ -678,7 +680,7 @@ QGestureRecognizer::Result QFlickGestureRecognizer::recognize(QGesture *state,
|
|||
break;
|
||||
|
||||
case QEvent::MouseMove:
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
case QEvent::GraphicsSceneMouseMove:
|
||||
#endif
|
||||
if (PressDelayHandler::instance()->isDelaying())
|
||||
|
|
@ -688,7 +690,7 @@ QGestureRecognizer::Result QFlickGestureRecognizer::recognize(QGesture *state,
|
|||
result |= scrollerIsActive ? TriggerGesture : Ignore;
|
||||
break;
|
||||
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
case QEvent::GraphicsSceneMouseRelease:
|
||||
#endif
|
||||
case QEvent::MouseButtonRelease:
|
||||
|
|
|
|||
|
|
@ -52,9 +52,11 @@
|
|||
#include <QMap>
|
||||
#include <QApplication>
|
||||
#include <QAbstractScrollArea>
|
||||
#if QT_CONFIG(graphicsview)
|
||||
#include <QGraphicsObject>
|
||||
#include <QGraphicsScene>
|
||||
#include <QGraphicsView>
|
||||
#endif
|
||||
#include <QDesktopWidget>
|
||||
#include <QVector2D>
|
||||
#include <QtCore/qmath.h>
|
||||
|
|
@ -429,12 +431,12 @@ Qt::GestureType QScroller::grabGesture(QObject *target, ScrollerGestureType scro
|
|||
widget->grabGesture(sp->recognizerType);
|
||||
if (scrollGestureType == TouchGesture)
|
||||
widget->setAttribute(Qt::WA_AcceptTouchEvents);
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
} else if (QGraphicsObject *go = qobject_cast<QGraphicsObject*>(target)) {
|
||||
if (scrollGestureType == TouchGesture)
|
||||
go->setAcceptTouchEvents(true);
|
||||
go->grabGesture(sp->recognizerType);
|
||||
#endif // QT_NO_GRAPHICSVIEW
|
||||
#endif // QT_CONFIG(graphicsview)
|
||||
}
|
||||
return sp->recognizerType;
|
||||
}
|
||||
|
|
@ -473,7 +475,7 @@ void QScroller::ungrabGesture(QObject *target)
|
|||
if (target->isWidgetType()) {
|
||||
QWidget *widget = static_cast<QWidget *>(target);
|
||||
widget->ungrabGesture(sp->recognizerType);
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
} else if (QGraphicsObject *go = qobject_cast<QGraphicsObject*>(target)) {
|
||||
go->ungrabGesture(sp->recognizerType);
|
||||
#endif
|
||||
|
|
@ -571,7 +573,7 @@ QPointF QScroller::pixelPerMeter() const
|
|||
Q_D(const QScroller);
|
||||
QPointF ppm = d->pixelPerMeter;
|
||||
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
if (QGraphicsObject *go = qobject_cast<QGraphicsObject *>(d->target)) {
|
||||
QTransform viewtr;
|
||||
//TODO: the first view isn't really correct - maybe use an additional field in the prepare event?
|
||||
|
|
@ -589,7 +591,7 @@ QPointF QScroller::pixelPerMeter() const
|
|||
ppm.ry() /= QLineF(p0, py).length();
|
||||
}
|
||||
}
|
||||
#endif // QT_NO_GRAPHICSVIEW
|
||||
#endif // QT_CONFIG(graphicsview)
|
||||
return ppm;
|
||||
}
|
||||
|
||||
|
|
@ -1466,7 +1468,7 @@ bool QScrollerPrivate::prepareScrolling(const QPointF &position)
|
|||
|
||||
if (QWidget *w = qobject_cast<QWidget *>(target))
|
||||
setDpiFromWidget(w);
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
if (QGraphicsObject *go = qobject_cast<QGraphicsObject *>(target)) {
|
||||
//TODO: the first view isn't really correct - maybe use an additional field in the prepare event?
|
||||
if (const auto *scene = go->scene()) {
|
||||
|
|
|
|||
|
|
@ -1475,7 +1475,7 @@ bool QAbstractScrollAreaPrivate::canStartScrollingAt( const QPoint &startPos )
|
|||
{
|
||||
Q_Q(QAbstractScrollArea);
|
||||
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
// don't start scrolling when a drag mode has been set.
|
||||
// don't start scrolling on a movable item.
|
||||
if (QGraphicsView *view = qobject_cast<QGraphicsView *>(q)) {
|
||||
|
|
|
|||
|
|
@ -741,7 +741,7 @@ void QComboBoxPrivateContainer::hideEvent(QHideEvent *)
|
|||
{
|
||||
emit resetButton();
|
||||
combo->update();
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
// QGraphicsScenePrivate::removePopup closes the combo box popup, it hides it non-explicitly.
|
||||
// Hiding/showing the QComboBox after this will unexpectedly show the popup as well.
|
||||
// Re-hiding the popup container makes sure it is explicitly hidden.
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@
|
|||
#include "qinputmethod.h"
|
||||
#include "qlist.h"
|
||||
#endif
|
||||
#include <qpainter.h>
|
||||
#include <qpropertyanimation.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
|
|
|||
|
|
@ -2319,7 +2319,7 @@ void QMenu::popup(const QPoint &p, QAction *atAction)
|
|||
const bool actionListChanged = d->itemsDirty;
|
||||
|
||||
QRect screen;
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
bool isEmbedded = !bypassGraphicsProxyWidget(this) && d->nearestGraphicsProxyWidget(this);
|
||||
if (isEmbedded)
|
||||
screen = d->popupGeometry(this);
|
||||
|
|
@ -3589,7 +3589,7 @@ void QMenu::internalDelayedPopup()
|
|||
d->activeMenu->d_func()->causedPopup.action = d->currentAction;
|
||||
|
||||
QRect screen;
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
bool isEmbedded = !bypassGraphicsProxyWidget(this) && d->nearestGraphicsProxyWidget(this);
|
||||
if (isEmbedded)
|
||||
screen = d->popupGeometry(this);
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@
|
|||
#endif
|
||||
|
||||
#include "qapplication.h"
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
#include "qgraphicssceneevent.h"
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -58,7 +58,9 @@
|
|||
#include "private/qtextdocument_p.h"
|
||||
#include "qtextlist.h"
|
||||
#include "private/qwidgettextcontrol_p.h"
|
||||
#if QT_CONFIG(graphicsview)
|
||||
#include "qgraphicssceneevent.h"
|
||||
#endif
|
||||
#include "qpagedpaintdevice.h"
|
||||
#include "private/qpagedpaintdevice_p.h"
|
||||
#include "qtextdocumentwriter.h"
|
||||
|
|
@ -983,7 +985,7 @@ void QWidgetTextControl::processEvent(QEvent *e, const QMatrix &matrix, QWidget
|
|||
|
||||
if (!d->contextWidget) {
|
||||
switch (e->type()) {
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
case QEvent::GraphicsSceneMouseMove:
|
||||
case QEvent::GraphicsSceneMousePress:
|
||||
case QEvent::GraphicsSceneMouseRelease:
|
||||
|
|
@ -1001,7 +1003,7 @@ void QWidgetTextControl::processEvent(QEvent *e, const QMatrix &matrix, QWidget
|
|||
d->contextWidget = ev->widget();
|
||||
break;
|
||||
}
|
||||
#endif // QT_NO_GRAPHICSVIEW
|
||||
#endif // QT_CONFIG(graphicsview)
|
||||
default: break;
|
||||
};
|
||||
}
|
||||
|
|
@ -1080,7 +1082,7 @@ void QWidgetTextControl::processEvent(QEvent *e, const QMatrix &matrix, QWidget
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifndef QT_NO_GRAPHICSVIEW
|
||||
#if QT_CONFIG(graphicsview)
|
||||
case QEvent::GraphicsSceneMousePress: {
|
||||
QGraphicsSceneMouseEvent *ev = static_cast<QGraphicsSceneMouseEvent *>(e);
|
||||
d->mousePressEvent(ev, ev->button(), matrix.map(ev->pos()), ev->modifiers(), ev->buttons(),
|
||||
|
|
@ -1130,7 +1132,7 @@ void QWidgetTextControl::processEvent(QEvent *e, const QMatrix &matrix, QWidget
|
|||
if (d->dropEvent(ev->mimeData(), matrix.map(ev->pos()), ev->dropAction(), ev->source()))
|
||||
ev->accept();
|
||||
break; }
|
||||
#endif // QT_NO_GRAPHICSVIEW
|
||||
#endif // QT_CONFIG(graphicsview)
|
||||
#ifdef QT_KEYPAD_NAVIGATION
|
||||
case QEvent::EnterEditFocus:
|
||||
case QEvent::LeaveEditFocus:
|
||||
|
|
|
|||
Loading…
Reference in New Issue