This file is indexed.

/usr/share/sip/PyQt4/QtGui/qgraphicsscene.sip is in python-qt4-dev 4.9.1-2ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
// qgraphicsscene.sip generated by MetaSIP on Fri Feb 10 10:35:12 2012
//
// This file is part of the QtGui Python extension module.
//
// Copyright (c) 2011 Riverbank Computing Limited <info@riverbankcomputing.com>
// 
// This file is part of PyQt.
// 
// This file may be used under the terms of the GNU General Public
// License versions 2.0 or 3.0 as published by the Free Software
// Foundation and appearing in the files LICENSE.GPL2 and LICENSE.GPL3
// included in the packaging of this file.  Alternatively you may (at
// your option) use any later version of the GNU General Public
// License if such license has been publicly approved by Riverbank
// Computing Limited (or its successors, if any) and the KDE Free Qt
// Foundation. In addition, as a special exception, Riverbank gives you
// certain additional rights. These rights are described in the Riverbank
// GPL Exception version 1.1, which can be found in the file
// GPL_EXCEPTION.txt in this package.
// 
// If you are unsure which license is appropriate for your use, please
// contact the sales department at sales@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.


%If (Qt_4_2_0 -)
%ModuleCode
#include <qgraphicsscene.h>
%End
%End

%If (Qt_4_2_0 -)

class QGraphicsScene : QObject
{
%TypeHeaderCode
#include <qgraphicsscene.h>
%End

public:
    enum ItemIndexMethod
    {
        BspTreeIndex,
        NoIndex,
    };

    QGraphicsScene(QObject *parent /TransferThis/ = 0);
    QGraphicsScene(const QRectF &sceneRect, QObject *parent /TransferThis/ = 0);
    QGraphicsScene(qreal x, qreal y, qreal width, qreal height, QObject *parent /TransferThis/ = 0);
    virtual ~QGraphicsScene();
    QRectF sceneRect() const;
    qreal width() const;
    qreal height() const;
    void setSceneRect(const QRectF &rect);
    void setSceneRect(qreal x, qreal y, qreal w, qreal h);
    void render(QPainter *painter, const QRectF &target = QRectF(), const QRectF &source = QRectF(), Qt::AspectRatioMode mode = Qt::KeepAspectRatio);
    QGraphicsScene::ItemIndexMethod itemIndexMethod() const;
    void setItemIndexMethod(QGraphicsScene::ItemIndexMethod method);
    QRectF itemsBoundingRect() const;
    QList<QGraphicsItem*> items() const;
    QList<QGraphicsItem*> items(const QPointF &pos) const;
    QList<QGraphicsItem*> items(const QRectF &rectangle, Qt::ItemSelectionMode mode = Qt::IntersectsItemShape) const;
    QList<QGraphicsItem*> items(const QPolygonF &polygon, Qt::ItemSelectionMode mode = Qt::IntersectsItemShape) const;
    QList<QGraphicsItem*> items(const QPainterPath &path, Qt::ItemSelectionMode mode = Qt::IntersectsItemShape) const;
%If (Qt_4_3_0 -)
    QList<QGraphicsItem*> items(qreal x, qreal y, qreal w, qreal h, Qt::ItemSelectionMode mode = Qt::IntersectsItemShape) const;
%End
    QList<QGraphicsItem*> collidingItems(const QGraphicsItem *item, Qt::ItemSelectionMode mode = Qt::IntersectsItemShape) const;
    QGraphicsItem *itemAt(const QPointF &pos) const;
    QGraphicsItem *itemAt(qreal x, qreal y) const;
    QList<QGraphicsItem*> selectedItems() const;
    void setSelectionArea(const QPainterPath &path);
    void clearSelection();
    QGraphicsItemGroup *createItemGroup(const QList<QGraphicsItem*> &items /Transfer/);
    void destroyItemGroup(QGraphicsItemGroup *group /Transfer/);
    void addItem(QGraphicsItem *item /Transfer/);
    QGraphicsEllipseItem *addEllipse(const QRectF &rect, const QPen &pen = QPen(), const QBrush &brush = QBrush());
%If (Qt_4_3_0 -)
    QGraphicsEllipseItem *addEllipse(qreal x, qreal y, qreal w, qreal h, const QPen &pen = QPen(), const QBrush &brush = QBrush());
%End
    QGraphicsLineItem *addLine(const QLineF &line, const QPen &pen = QPen());
%If (Qt_4_3_0 -)
    QGraphicsLineItem *addLine(qreal x1, qreal y1, qreal x2, qreal y2, const QPen &pen = QPen());
%End
    QGraphicsPathItem *addPath(const QPainterPath &path, const QPen &pen = QPen(), const QBrush &brush = QBrush());
    QGraphicsPixmapItem *addPixmap(const QPixmap &pixmap);
    QGraphicsPolygonItem *addPolygon(const QPolygonF &polygon, const QPen &pen = QPen(), const QBrush &brush = QBrush());
    QGraphicsRectItem *addRect(const QRectF &rect, const QPen &pen = QPen(), const QBrush &brush = QBrush());
%If (Qt_4_3_0 -)
    QGraphicsRectItem *addRect(qreal x, qreal y, qreal w, qreal h, const QPen &pen = QPen(), const QBrush &brush = QBrush());
%End
%If (Qt_4_3_0 -)
    QGraphicsSimpleTextItem *addSimpleText(const QString &text, const QFont &font = QFont());
%End
    QGraphicsTextItem *addText(const QString &text, const QFont &font = QFont());
    void removeItem(QGraphicsItem *item /TransferBack/);
    QGraphicsItem *focusItem() const;
    void setFocusItem(QGraphicsItem *item, Qt::FocusReason focusReason = Qt::OtherFocusReason);
    bool hasFocus() const;
    void setFocus(Qt::FocusReason focusReason = Qt::OtherFocusReason);
    void clearFocus();
    QGraphicsItem *mouseGrabberItem() const;
    QBrush backgroundBrush() const;
    void setBackgroundBrush(const QBrush &brush);
    QBrush foregroundBrush() const;
    void setForegroundBrush(const QBrush &brush);
    virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const;
    QList<QGraphicsView*> views() const;

public slots:
    void advance();
    void update(const QRectF &rect = QRectF());
%If (Qt_4_3_0 -)
    void invalidate(const QRectF &rect = QRectF(), QFlags<QGraphicsScene::SceneLayer> layers = QGraphicsScene::AllLayers);
%End
%If (Qt_4_4_0 -)
    void clear();
%End

signals:
    void changed(const QList<QRectF> &region);
    void sceneRectChanged(const QRectF &rect);
%If (Qt_4_3_0 -)
    void selectionChanged();
%End

protected:
    virtual bool event(QEvent *event);
    virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *event);
    virtual void dragEnterEvent(QGraphicsSceneDragDropEvent *event);
    virtual void dragMoveEvent(QGraphicsSceneDragDropEvent *event);
    virtual void dragLeaveEvent(QGraphicsSceneDragDropEvent *event);
    virtual void dropEvent(QGraphicsSceneDragDropEvent *event);
    virtual void focusInEvent(QFocusEvent *event);
    virtual void focusOutEvent(QFocusEvent *event);
    virtual void helpEvent(QGraphicsSceneHelpEvent *event);
    virtual void keyPressEvent(QKeyEvent *event);
    virtual void keyReleaseEvent(QKeyEvent *event);
    virtual void mousePressEvent(QGraphicsSceneMouseEvent *event);
    virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
    virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
    virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event);
    virtual void wheelEvent(QGraphicsSceneWheelEvent *event);
    virtual void inputMethodEvent(QInputMethodEvent *event);
    virtual void drawBackground(QPainter *painter, const QRectF &rect);
    virtual void drawForeground(QPainter *painter, const QRectF &rect);
    virtual void drawItems(QPainter *painter, SIP_PYLIST items /DocType="list-of-QGraphicsItem"/, SIP_PYLIST options /DocType="list-of-QStyleOptionGraphicsItem"/, QWidget *widget = 0) [void (QPainter *painter, int numItems, QGraphicsItem **items, const QStyleOptionGraphicsItem *options, QWidget *widget = 0)];
%MethodCode
        // PyQt takes lists as the items and options arguments.
        
        // Adjust the number items according to the actual list lengths.
        SIP_SSIZE_T numItems = PyList_GET_SIZE(a1);
        
        if (numItems > PyList_GET_SIZE(a2))
            numItems = PyList_GET_SIZE(a2);
        
        // Allocate temporary storage for the C++ conversions.
        QGraphicsItem **items = new QGraphicsItem *[numItems];
        QStyleOptionGraphicsItem *options = new QStyleOptionGraphicsItem[numItems];
        
        for (int i = 0; i < numItems; ++i)
        {
            void *cpp;
        
            cpp = sipForceConvertToType(PyList_GET_ITEM(a1, i), sipType_QGraphicsItem, NULL, SIP_NO_CONVERTORS, NULL, &sipIsErr);
            items[i] = reinterpret_cast<QGraphicsItem *>(cpp);
        
            cpp = sipForceConvertToType(PyList_GET_ITEM(a2, i), sipType_QStyleOptionGraphicsItem, NULL, SIP_NOT_NONE|SIP_NO_CONVERTORS, NULL, &sipIsErr);
            options[i] = *reinterpret_cast<QStyleOptionGraphicsItem *>(cpp);
        }
        
        if (!sipIsErr)
        {
            Py_BEGIN_ALLOW_THREADS
        #if defined(SIP_PROTECTED_IS_PUBLIC)
            if (sipSelfWasArg)
                sipCpp->QGraphicsScene::drawItems(a0, numItems, items, options, a3);
            else
                sipCpp->drawItems(a0, numItems, items, options, a3);
        #else
            sipCpp->sipProtectVirt_drawItems(sipSelfWasArg, a0, numItems, items, options, a3);
        #endif
            Py_END_ALLOW_THREADS
        }
        
        delete[] items;
        delete[] options;
%End

%VirtualCatcherCode
        // PyQt handles the items and options arguments as lists, but keeps the
        // numItems argument.
        PyObject *items = PyList_New(a1);
        PyObject *options = PyList_New(a1);
        
        sipIsErr = (!items || !options);
        
        if (!sipIsErr)
            for (int i = 0; i < a1; ++i)
            {
                PyObject *obj;
        
                obj = sipConvertFromType(a2[i], sipType_QGraphicsItem, 0);
        
                if (!obj)
                {
                    sipIsErr = true;
                    break;
                }
        
                PyList_SET_ITEM(items, i, obj);
        
                obj = sipConvertFromType(const_cast<QStyleOptionGraphicsItem *>(&a3[i]), sipType_QStyleOptionGraphicsItem, 0);
        
                if (!obj)
                {
                    sipIsErr = true;
                    break;
                }
        
                PyList_SET_ITEM(options, i, obj);
            }
        
        if (!sipIsErr)
        {
            PyObject *res = sipCallMethod(&sipIsErr, sipMethod, "DSSD", a0, sipType_QPainter, NULL, items, options, a4, sipType_QWidget, NULL);
        
            if (res)
            {
                sipParseResult(&sipIsErr, sipMethod, res, "Z");
                Py_DECREF(res);
            }
        }
        
        Py_XDECREF(items);
        Py_XDECREF(options);
%End

public:
%If (Qt_4_3_0 -)

    enum SceneLayer
    {
        ItemLayer,
        BackgroundLayer,
        ForegroundLayer,
        AllLayers,
    };

%End
%If (Qt_4_3_0 -)
    typedef QFlags<QGraphicsScene::SceneLayer> SceneLayers;
%End
%If (Qt_4_3_0 -)
    int bspTreeDepth() const;
%End
%If (Qt_4_3_0 -)
    void setBspTreeDepth(int depth);
%End
%If (Qt_4_3_0 -)
    QPainterPath selectionArea() const;
%End
%If (Qt_4_3_0 -)
    void setSelectionArea(const QPainterPath &path, Qt::ItemSelectionMode);
%End
%If (Qt_4_3_0 -)
    void update(qreal x, qreal y, qreal w, qreal h);
%End
%If (Qt_4_3_0 -)
    void invalidate(qreal x, qreal y, qreal w, qreal h, QFlags<QGraphicsScene::SceneLayer> layers = QGraphicsScene::AllLayers);
%End
%If (Qt_4_4_0 -)
    QGraphicsProxyWidget *addWidget(QWidget *widget /Transfer/, Qt::WindowFlags flags = 0);
%End
%If (Qt_4_4_0 -)
    QStyle *style() const;
%End
%If (Qt_4_4_0 -)
    void setStyle(QStyle *style /Transfer/);
%End
%If (Qt_4_4_0 -)
    QFont font() const;
%End
%If (Qt_4_4_0 -)
    void setFont(const QFont &font);
%End
%If (Qt_4_4_0 -)
    QPalette palette() const;
%End
%If (Qt_4_4_0 -)
    void setPalette(const QPalette &palette);
%End
%If (Qt_4_4_0 -)
    QGraphicsWidget *activeWindow() const;
%End
%If (Qt_4_4_0 -)
    void setActiveWindow(QGraphicsWidget *widget);
%End

protected:
%If (Qt_4_4_0 -)
    virtual bool eventFilter(QObject *watched, QEvent *event);
%End
%If (Qt_4_4_0 -)
    bool focusNextPrevChild(bool next);
%End

public:
%If (Qt_4_5_0 -)
    bool isSortCacheEnabled() const;
%End
%If (Qt_4_5_0 -)
    void setSortCacheEnabled(bool enabled);
%End
%If (Qt_4_5_0 -)
    void setStickyFocus(bool enabled);
%End
%If (Qt_4_5_0 -)
    bool stickyFocus() const;
%End
%If (Qt_4_6_0 -)
    QList<QGraphicsItem*> items(Qt::SortOrder order) const;
%End
%If (Qt_4_6_0 -)
    QList<QGraphicsItem*> items(const QPointF &pos, Qt::ItemSelectionMode mode, Qt::SortOrder order, const QTransform &deviceTransform = QTransform()) const;
%End
%If (Qt_4_6_0 -)
    QList<QGraphicsItem*> items(const QRectF &rect, Qt::ItemSelectionMode mode, Qt::SortOrder order, const QTransform &deviceTransform = QTransform()) const;
%End
%If (Qt_4_6_0 -)
    QList<QGraphicsItem*> items(const QPolygonF &polygon, Qt::ItemSelectionMode mode, Qt::SortOrder order, const QTransform &deviceTransform = QTransform()) const;
%End
%If (Qt_4_6_0 -)
    QList<QGraphicsItem*> items(const QPainterPath &path, Qt::ItemSelectionMode mode, Qt::SortOrder order, const QTransform &deviceTransform = QTransform()) const;
%End
%If (Qt_4_6_0 -)
    QList<QGraphicsItem*> items(qreal x, qreal y, qreal w, qreal h, Qt::ItemSelectionMode mode, Qt::SortOrder order, const QTransform &deviceTransform = QTransform()) const;
%End
%If (Qt_4_6_0 -)
    QGraphicsItem *itemAt(const QPointF &pos, const QTransform &deviceTransform) const;
%End
%If (Qt_4_6_0 -)
    QGraphicsItem *itemAt(qreal x, qreal y, const QTransform &deviceTransform) const;
%End
%If (Qt_4_6_0 -)
    void setSelectionArea(const QPainterPath &path, const QTransform &deviceTransform);
%End
%If (Qt_4_6_0 -)
    void setSelectionArea(const QPainterPath &path, Qt::ItemSelectionMode mode, const QTransform &deviceTransform);
%End
%If (Qt_4_6_0 -)
    bool isActive() const;
%End
%If (Qt_4_6_0 -)
    QGraphicsItem *activePanel() const;
%End
%If (Qt_4_6_0 -)
    void setActivePanel(QGraphicsItem *item);
%End
%If (Qt_4_6_0 -)
    bool sendEvent(QGraphicsItem *item, QEvent *event);
%End

private:
%If (Qt_4_4_0 -)
    QGraphicsScene(const QGraphicsScene &);
%End
};

%End
%If (Qt_4_3_0 -)
QFlags<QGraphicsScene::SceneLayer> operator|(QGraphicsScene::SceneLayer f1, QFlags<QGraphicsScene::SceneLayer> f2);
%End