File: qtablewidget.sip

package info (click to toggle)
python-qt4 4.7.3-1%2Bsqueeze1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 28,504 kB
  • ctags: 4,680
  • sloc: python: 28,738; cpp: 8,897; sh: 245; xml: 243; makefile: 150
file content (301 lines) | stat: -rw-r--r-- 9,543 bytes parent folder | download
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
// qtablewidget.sip generated by MetaSIP on Fri Apr 16 11:32:08 2010
//
// This file is part of the QtGui Python extension module.
//
// Copyright (c) 2010 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.
// 
// Please review the following information to ensure GNU General
// Public Licensing requirements will be met:
// http://trolltech.com/products/qt/licenses/licensing/opensource/. If
// you are unsure which license is appropriate for your use, please
// review the following information:
// http://trolltech.com/products/qt/licenses/licensing/licensingoverview
// or 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.


%ModuleCode
#include <qtablewidget.h>
%End

class QTableWidgetSelectionRange
{

%TypeHeaderCode
#include <qtablewidget.h>
%End

public:
    QTableWidgetSelectionRange();
    QTableWidgetSelectionRange(int, int, int, int);
    QTableWidgetSelectionRange(const QTableWidgetSelectionRange &);
    ~QTableWidgetSelectionRange();
    int topRow() const;
    int bottomRow() const;
    int leftColumn() const;
    int rightColumn() const;
    int rowCount() const;
    int columnCount() const;
};

class QTableWidgetItem /Supertype=sip.wrapper/
{

%TypeHeaderCode
#include <qtablewidget.h>
%End

public:
%If (Qt_4_2_0 -)

    enum ItemType
    {
        Type,
        UserType,
    };

%End
%If (- Qt_4_2_0)

    enum
    {
        Type,
        UserType,
    };

%End
    QTableWidgetItem(int type = Type);
    QTableWidgetItem(const QString &, int type = Type);
%If (Qt_4_2_0 -)
    QTableWidgetItem(const QIcon &, const QString &, int type = Type);
%End
    QTableWidgetItem(const QTableWidgetItem &);
    virtual ~QTableWidgetItem();
    virtual QTableWidgetItem *clone() const /Factory/;
    QTableWidget *tableWidget() const;
    Qt::ItemFlags flags() const;
    QString text() const;
    QIcon icon() const;
    QString statusTip() const;
%If (PyQt_ToolTip)
    QString toolTip() const;
%End
%If (PyQt_WhatsThis)
    QString whatsThis() const;
%End
    QFont font() const;
    int textAlignment() const;
    void setTextAlignment(int);
    QColor backgroundColor() const;
    void setBackgroundColor(const QColor &);
    QColor textColor() const;
    void setTextColor(const QColor &);
    Qt::CheckState checkState() const;
    void setCheckState(Qt::CheckState);
    virtual QVariant data(int) const;
    virtual void setData(int, const QVariant &);
    virtual bool operator<(const QTableWidgetItem & /NoCopy/) const;
    virtual void read(QDataStream &) /ReleaseGIL/;
    virtual void write(QDataStream &) const /ReleaseGIL/;
    int type() const;
    void setFlags(Qt::ItemFlags);
    void setText(const QString &);
    void setIcon(const QIcon &);
    void setStatusTip(const QString &);
%If (PyQt_ToolTip)
    void setToolTip(const QString &);
%End
%If (PyQt_WhatsThis)
    void setWhatsThis(const QString &);
%End
    void setFont(const QFont &);
    QSize sizeHint() const;
    void setSizeHint(const QSize &);
%If (Qt_4_2_0 -)
    QBrush background() const;
%End
%If (Qt_4_2_0 -)
    void setBackground(const QBrush &);
%End
%If (Qt_4_2_0 -)
    QBrush foreground() const;
%End
%If (Qt_4_2_0 -)
    void setForeground(const QBrush &);
%End
%If (Qt_4_2_0 -)
    int row() const;
%End
%If (Qt_4_2_0 -)
    int column() const;
%End
%If (Qt_4_2_0 -)
    void setSelected(bool);
%End
%If (Qt_4_2_0 -)
    bool isSelected() const;
%End
};

QDataStream &operator>>(QDataStream &, QTableWidgetItem & /Constrained/);
QDataStream &operator<<(QDataStream &, const QTableWidgetItem & /Constrained/);

class QTableWidget : QTableView
{

%TypeHeaderCode
#include <qtablewidget.h>
%End

public:
    explicit QTableWidget(QWidget *parent /TransferThis/ = 0);
    QTableWidget(int, int, QWidget *parent /TransferThis/ = 0);
    virtual ~QTableWidget();
    void setRowCount(int);
    int rowCount() const;
    void setColumnCount(int);
    int columnCount() const;
    int row(const QTableWidgetItem *) const;
    int column(const QTableWidgetItem *) const;
    QTableWidgetItem *item(int, int) const;
    void setItem(int, int, QTableWidgetItem * /Transfer/);
    QTableWidgetItem *takeItem(int, int) /TransferBack/;
    QTableWidgetItem *verticalHeaderItem(int) const;
    void setVerticalHeaderItem(int, QTableWidgetItem * /Transfer/);
    QTableWidgetItem *takeVerticalHeaderItem(int) /TransferBack/;
    QTableWidgetItem *horizontalHeaderItem(int) const;
    void setHorizontalHeaderItem(int, QTableWidgetItem * /Transfer/);
    QTableWidgetItem *takeHorizontalHeaderItem(int) /TransferBack/;
    void setVerticalHeaderLabels(const QStringList &);
    void setHorizontalHeaderLabels(const QStringList &);
    int currentRow() const;
    int currentColumn() const;
    QTableWidgetItem *currentItem() const;
    void setCurrentItem(QTableWidgetItem *);
%If (Qt_4_4_0 -)
    void setCurrentItem(QTableWidgetItem *, QFlags<QItemSelectionModel::SelectionFlag>);
%End
    void setCurrentCell(int, int);
%If (Qt_4_4_0 -)
    void setCurrentCell(int, int, QFlags<QItemSelectionModel::SelectionFlag>);
%End
    void sortItems(int, Qt::SortOrder order = Qt::AscendingOrder);
    void setSortingEnabled(bool);
    bool isSortingEnabled() const;
    void editItem(QTableWidgetItem *);
    void openPersistentEditor(QTableWidgetItem *);
    void closePersistentEditor(QTableWidgetItem *);
    QWidget *cellWidget(int, int) const;
    void setCellWidget(int, int, QWidget * /Transfer/);
%MethodCode
        // We have to break the association with any existing widget.
        QWidget *w = sipCpp->cellWidget(a0, a1);
        
        if (w)
        {
            PyObject *wo = sipGetPyObject(w, sipType_QWidget);
        
            if (wo)
                sipTransferBreak(wo);
        }
        
        Py_BEGIN_ALLOW_THREADS
        sipCpp->setCellWidget(a0, a1, a2);
        Py_END_ALLOW_THREADS
%End

%If (Qt_4_3_0 -)
    void removeCellWidget(int, int);
%MethodCode
        // We have to break the association with any existing widget.
        QWidget *w = sipCpp->cellWidget(a0, a1);
        
        if (w)
        {
            PyObject *wo = sipGetPyObject(w, sipType_QWidget);
        
            if (wo)
                sipTransferBreak(wo);
        }
        
        Py_BEGIN_ALLOW_THREADS
        sipCpp->removeCellWidget(a0, a1);
        Py_END_ALLOW_THREADS
%End

%End
    bool isItemSelected(const QTableWidgetItem *) const;
    void setItemSelected(const QTableWidgetItem *, bool);
    void setRangeSelected(const QTableWidgetSelectionRange &, bool);
    QList<QTableWidgetSelectionRange> selectedRanges() const;
    QList<QTableWidgetItem*> selectedItems();
    QList<QTableWidgetItem*> findItems(const QString &, Qt::MatchFlags) const;
    int visualRow(int) const;
    int visualColumn(int) const;
    QTableWidgetItem *itemAt(const QPoint &) const;
    QTableWidgetItem *itemAt(int, int) const;
    QRect visualItemRect(const QTableWidgetItem *) const;
    const QTableWidgetItem *itemPrototype() const;
    void setItemPrototype(const QTableWidgetItem * /Transfer/);

public slots:
    void scrollToItem(const QTableWidgetItem *, QAbstractItemView::ScrollHint hint = QAbstractItemView::EnsureVisible);
    void insertRow(int);
    void insertColumn(int);
    void removeRow(int);
    void removeColumn(int);
    void clear();
%If (Qt_4_2_0 -)
    void clearContents();
%End

signals:
    void itemPressed(QTableWidgetItem *);
    void itemClicked(QTableWidgetItem *);
    void itemDoubleClicked(QTableWidgetItem *);
    void itemActivated(QTableWidgetItem *);
    void itemEntered(QTableWidgetItem *);
    void itemChanged(QTableWidgetItem *);
    void currentItemChanged(QTableWidgetItem *, QTableWidgetItem *);
    void itemSelectionChanged();
    void cellPressed(int, int);
    void cellClicked(int, int);
    void cellDoubleClicked(int, int);
    void cellActivated(int, int);
    void cellEntered(int, int);
    void cellChanged(int, int);
    void currentCellChanged(int, int, int, int);

protected:
    virtual QStringList mimeTypes() const;
    virtual QMimeData *mimeData(const QList<QTableWidgetItem*>) const /TransferBack/;
    virtual bool dropMimeData(int, int, const QMimeData *, Qt::DropAction);
    virtual Qt::DropActions supportedDropActions() const;
    QList<QTableWidgetItem*> items(const QMimeData *) const;
    QModelIndex indexFromItem(QTableWidgetItem *) const;
    QTableWidgetItem *itemFromIndex(const QModelIndex &) const;
    virtual bool event(QEvent *);
%If (Qt_4_2_0 -)
    virtual void dropEvent(QDropEvent *);
%End

private:
    virtual void setModel(QAbstractItemModel * /KeepReference/);
    QTableWidget(const QTableWidget &);
};