1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324
|
// qquickitem.sip generated by MetaSIP
//
// This file is part of the QtQuick Python extension module.
//
// Copyright (c) 2018 Riverbank Computing Limited <info@riverbankcomputing.com>
//
// This file is part of PyQt5.
//
// This file may be used under the terms of the GNU General Public License
// version 3.0 as published by the Free Software Foundation and appearing in
// the file LICENSE included in the packaging of this file. Please review the
// following information to ensure the GNU General Public License version 3.0
// requirements will be met: http://www.gnu.org/copyleft/gpl.html.
//
// If you do not wish to use this file under the terms of the GPL version 3.0
// then you may purchase a commercial license. For more information contact
// info@riverbankcomputing.com.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
class QQuickItem : QObject, QQmlParserStatus /ExportDerived/
{
%TypeHeaderCode
#include <qquickitem.h>
%End
public:
enum Flag
{
ItemClipsChildrenToShape,
ItemAcceptsInputMethod,
ItemIsFocusScope,
ItemHasContents,
ItemAcceptsDrops,
};
typedef QFlags<QQuickItem::Flag> Flags;
enum ItemChange
{
ItemChildAddedChange,
ItemChildRemovedChange,
ItemSceneChange,
ItemVisibleHasChanged,
ItemParentHasChanged,
ItemOpacityHasChanged,
ItemActiveFocusHasChanged,
ItemRotationHasChanged,
%If (Qt_5_3_0 -)
ItemAntialiasingHasChanged,
%End
%If (Qt_5_6_0 -)
ItemDevicePixelRatioHasChanged,
%End
%If (Qt_5_10_0 -)
ItemEnabledHasChanged,
%End
};
struct ItemChangeData
{
%TypeHeaderCode
#include <qquickitem.h>
%End
ItemChangeData(QQuickItem *v);
ItemChangeData(QQuickWindow *v);
ItemChangeData(qreal v /Constrained/);
ItemChangeData(bool v /Constrained/);
QQuickItem *item;
QQuickWindow *window;
qreal realValue;
bool boolValue;
};
enum TransformOrigin
{
TopLeft,
Top,
TopRight,
Left,
Center,
Right,
BottomLeft,
Bottom,
BottomRight,
};
%If (Qt_5_6_1 -)
explicit QQuickItem(QQuickItem *parent /TransferThis/ = 0);
%End
%If (- Qt_5_6_1)
QQuickItem(QQuickItem *parent /TransferThis/ = 0);
%End
virtual ~QQuickItem();
QQuickWindow *window() const;
QQuickItem *parentItem() const;
void setParentItem(QQuickItem *parent);
void stackBefore(const QQuickItem *);
void stackAfter(const QQuickItem *);
QRectF childrenRect();
QList<QQuickItem *> childItems() const;
bool clip() const;
void setClip(bool);
QString state() const;
void setState(const QString &);
qreal baselineOffset() const;
void setBaselineOffset(qreal);
qreal x() const;
qreal y() const;
void setX(qreal);
void setY(qreal);
qreal width() const;
void setWidth(qreal);
void resetWidth();
void setImplicitWidth(qreal);
qreal implicitWidth() const;
qreal height() const;
void setHeight(qreal);
void resetHeight();
void setImplicitHeight(qreal);
qreal implicitHeight() const;
QQuickItem::TransformOrigin transformOrigin() const;
void setTransformOrigin(QQuickItem::TransformOrigin);
qreal z() const;
void setZ(qreal);
qreal rotation() const;
void setRotation(qreal);
qreal scale() const;
void setScale(qreal);
qreal opacity() const;
void setOpacity(qreal);
bool isVisible() const;
void setVisible(bool);
bool isEnabled() const;
void setEnabled(bool);
bool smooth() const;
void setSmooth(bool);
bool antialiasing() const;
void setAntialiasing(bool);
QQuickItem::Flags flags() const;
void setFlag(QQuickItem::Flag flag, bool enabled = true);
void setFlags(QQuickItem::Flags flags);
bool hasActiveFocus() const;
bool hasFocus() const;
void setFocus(bool);
bool isFocusScope() const;
QQuickItem *scopedFocusItem() const;
Qt::MouseButtons acceptedMouseButtons() const;
void setAcceptedMouseButtons(Qt::MouseButtons buttons);
bool acceptHoverEvents() const;
void setAcceptHoverEvents(bool enabled);
QCursor cursor() const;
void setCursor(const QCursor &cursor);
void unsetCursor();
void grabMouse();
void ungrabMouse();
bool keepMouseGrab() const;
void setKeepMouseGrab(bool);
bool filtersChildMouseEvents() const;
void setFiltersChildMouseEvents(bool filter);
void grabTouchPoints(const QVector<int> &ids);
void ungrabTouchPoints();
bool keepTouchGrab() const;
void setKeepTouchGrab(bool);
virtual bool contains(const QPointF &point) const;
QPointF mapToItem(const QQuickItem *item, const QPointF &point) const;
QPointF mapToScene(const QPointF &point) const;
QRectF mapRectToItem(const QQuickItem *item, const QRectF &rect) const;
QRectF mapRectToScene(const QRectF &rect) const;
QPointF mapFromItem(const QQuickItem *item, const QPointF &point) const;
QPointF mapFromScene(const QPointF &point) const;
QRectF mapRectFromItem(const QQuickItem *item, const QRectF &rect) const;
QRectF mapRectFromScene(const QRectF &rect) const;
void polish();
void forceActiveFocus();
QQuickItem *childAt(qreal x, qreal y) const;
virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const;
struct UpdatePaintNodeData
{
%TypeHeaderCode
#include <qquickitem.h>
%End
QSGTransformNode *transformNode;
private:
UpdatePaintNodeData();
};
virtual bool isTextureProvider() const;
virtual QSGTextureProvider *textureProvider() const;
public slots:
void update() /ReleaseGIL/;
protected:
virtual bool event(QEvent *);
bool isComponentComplete() const;
virtual void itemChange(QQuickItem::ItemChange, const QQuickItem::ItemChangeData &);
void updateInputMethod(Qt::InputMethodQueries queries = Qt::ImQueryInput);
bool widthValid() const;
bool heightValid() const;
virtual void classBegin();
virtual void componentComplete();
virtual void keyPressEvent(QKeyEvent *event);
virtual void keyReleaseEvent(QKeyEvent *event);
virtual void inputMethodEvent(QInputMethodEvent *);
virtual void focusInEvent(QFocusEvent *);
virtual void focusOutEvent(QFocusEvent *);
virtual void mousePressEvent(QMouseEvent *event);
virtual void mouseMoveEvent(QMouseEvent *event);
virtual void mouseReleaseEvent(QMouseEvent *event);
virtual void mouseDoubleClickEvent(QMouseEvent *event);
virtual void mouseUngrabEvent();
virtual void touchUngrabEvent();
virtual void wheelEvent(QWheelEvent *event);
virtual void touchEvent(QTouchEvent *event);
virtual void hoverEnterEvent(QHoverEvent *event);
virtual void hoverMoveEvent(QHoverEvent *event);
virtual void hoverLeaveEvent(QHoverEvent *event);
virtual void dragEnterEvent(QDragEnterEvent *);
virtual void dragMoveEvent(QDragMoveEvent *);
virtual void dragLeaveEvent(QDragLeaveEvent *);
virtual void dropEvent(QDropEvent *);
virtual bool childMouseEventFilter(QQuickItem *, QEvent *);
virtual void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry);
virtual QSGNode *updatePaintNode(QSGNode *, QQuickItem::UpdatePaintNodeData *);
%VirtualCatcherCode
PyObject *res;
res = sipCallMethod(&sipIsErr, sipMethod, "DD",
a0, sipType_QSGNode, NULL,
a1, sipType_QQuickItem_UpdatePaintNodeData, NULL);
if (res)
{
sipParseResult(&sipIsErr, sipMethod, res, "H0", sipType_QSGNode, &sipRes);
if (!sipIsErr && sipRes && (sipRes->flags() & QSGNode::OwnedByParent))
sipTransferTo(res, (PyObject *)sipPySelf);
Py_DECREF(res);
}
%End
virtual void releaseResources();
virtual void updatePolish();
public:
%If (Qt_5_1_0 -)
bool activeFocusOnTab() const;
%End
%If (Qt_5_1_0 -)
void setActiveFocusOnTab(bool);
%End
%If (Qt_5_1_0 -)
void setFocus(bool focus, Qt::FocusReason reason);
%End
%If (Qt_5_1_0 -)
void forceActiveFocus(Qt::FocusReason reason);
%End
%If (Qt_5_1_0 -)
QQuickItem *nextItemInFocusChain(bool forward = true);
%End
signals:
%If (Qt_5_1_0 -)
void windowChanged(QQuickWindow *window);
%End
public:
%If (Qt_5_3_0 -)
void resetAntialiasing();
%End
%If (Qt_5_4_0 -)
QQuickItemGrabResult *grabToImage(const QSize &targetSize = QSize()) /Factory/;
%MethodCode
QSharedPointer<QQuickItemGrabResult> *grab;
Py_BEGIN_ALLOW_THREADS
// This will leak but there seems to be no way to detach the object.
grab = new QSharedPointer<QQuickItemGrabResult>(sipCpp->grabToImage(*a0));
Py_END_ALLOW_THREADS
sipRes = grab->data();
%End
%End
%If (Qt_5_7_0 -)
bool isAncestorOf(const QQuickItem *child) const;
%End
%If (Qt_5_7_0 -)
QPointF mapToGlobal(const QPointF &point) const;
%End
%If (Qt_5_7_0 -)
QPointF mapFromGlobal(const QPointF &point) const;
%End
%If (Qt_5_10_0 -)
QSizeF size() const;
%End
%If (Qt_5_10_0 -)
bool acceptTouchEvents() const;
%End
%If (Qt_5_10_0 -)
void setAcceptTouchEvents(bool accept);
%End
%If (Qt_5_11_0 -)
QObject *containmentMask() const;
%End
%If (Qt_5_11_0 -)
void setContainmentMask(QObject *mask /KeepReference/);
%End
signals:
%If (Qt_5_11_0 -)
void containmentMaskChanged();
%End
};
QFlags<QQuickItem::Flag> operator|(QQuickItem::Flag f1, QFlags<QQuickItem::Flag> f2);
|