13
13
class QgsLayoutTableColumn : QObject
14
14
{
15
15
%Docstring
16
- Stores properties of a column for a QgsLayoutTable. Some properties of aQgsLayoutTableColumn
17
- are applicable only in certain contexts. For instance, the attribute and setAttribute methods only
18
- have an effect for QgsLayoutItemAttributeTables, and have no effect for QgsLayoutItemTextTables.
16
+ Stores properties of a column for a QgsLayoutTable.
17
+ Some properties of a QgsLayoutTableColumn are applicable only in certain contexts.
18
+ For instance, the attribute and setAttribute methods only have an effect
19
+ for QgsLayoutItemAttributeTables, and have no effect for QgsLayoutItemTextTables.
19
20
20
21
.. versionadded:: 3.0
21
22
%End
@@ -146,7 +147,7 @@ is only used when the column is part of a :py:class:`QgsLayoutItemAttributeTable
146
147
.. seealso:: :py:func:`attribute`
147
148
%End
148
149
149
- Qt::SortOrder sortOrder() const;
150
+ Qt::SortOrder sortOrder() const /Deprecated/ ;
150
151
%Docstring
151
152
Returns the sort order for the column. This property is only used when the column
152
153
is part of a QgsLayoutItemAttributeTable and when sortByRank is > 0.
@@ -158,9 +159,12 @@ is part of a QgsLayoutItemAttributeTable and when sortByRank is > 0.
158
159
.. seealso:: :py:func:`setSortOrder`
159
160
160
161
.. seealso:: :py:func:`sortByRank`
162
+
163
+ .. deprecated:: QGIS 3.14
164
+ the order is now hold in a distinct model
161
165
%End
162
166
163
- void setSortOrder( Qt::SortOrder order );
167
+ void setSortOrder( Qt::SortOrder order ) /Deprecated/ ;
164
168
%Docstring
165
169
Sets the sort ``order`` for the column. This property is only used when the column
166
170
is part of a QgsLayoutItemAttributeTable and when sortByRank() is > 0.
@@ -172,9 +176,12 @@ is part of a QgsLayoutItemAttributeTable and when sortByRank() is > 0.
172
176
.. seealso:: :py:func:`sortOrder`
173
177
174
178
.. seealso:: :py:func:`setSortByRank`
179
+
180
+ .. deprecated:: QGIS 3.14
181
+ the order is now hold in a distinct model
175
182
%End
176
183
177
- int sortByRank() const;
184
+ int sortByRank() const /Deprecated/ ;
178
185
%Docstring
179
186
Returns the sort rank for the column. If the sort rank is > 0 then the column
180
187
will be sorted in the table. The sort rank specifies the priority given to the
@@ -191,9 +198,12 @@ If sort rank is <= 0 then the column is not being sorted.
191
198
.. seealso:: :py:func:`setSortByRank`
192
199
193
200
.. seealso:: :py:func:`sortOrder`
201
+
202
+ .. deprecated:: QGIS 3.14
203
+ the order is now hold in a distinct model
194
204
%End
195
205
196
- void setSortByRank( int rank );
206
+ void setSortByRank( int rank ) /Deprecated/ ;
197
207
%Docstring
198
208
Sets the sort ``rank`` for the column. If the sort rank is > 0 then the column
199
209
will be sorted in the table. The sort rank specifies the priority given to the
@@ -209,6 +219,9 @@ If the sort ``rank`` is <= 0 then the column is not being sorted.
209
219
.. seealso:: :py:func:`sortByRank`
210
220
211
221
.. seealso:: :py:func:`setSortOrder`
222
+
223
+ .. deprecated:: QGIS 3.14
224
+ the order is now hold in a distinct model
212
225
%End
213
226
214
227
QgsLayoutTableColumn *clone() /Factory/;
@@ -220,6 +233,106 @@ Creates a duplicate column which is a deep copy of this column.
220
233
221
234
};
222
235
236
+ class QgsLayoutTableSortColumn : QObject
237
+ {
238
+ %Docstring
239
+ Stores properties of a column for the sorting of a :py:class:`QgsLayoutTable`.
240
+
241
+ .. versionadded:: 3.14
242
+ %End
243
+
244
+ %TypeHeaderCode
245
+ #include "qgslayouttablecolumn.h"
246
+ %End
247
+ public:
248
+
249
+ QgsLayoutTableSortColumn();
250
+ %Docstring
251
+ Constructor for :py:class:`QgsLayoutTableColumn`.
252
+
253
+ :param heading: column heading
254
+ %End
255
+
256
+ bool writeXml( QDomElement &columnElem, QDomDocument &doc ) const;
257
+ %Docstring
258
+ Writes the column's properties to xml for storage.
259
+
260
+ :param columnElem: an existing QDomElement in which to store the column's properties.
261
+ :param doc: QDomDocument for the destination xml.
262
+
263
+ .. seealso:: :py:func:`readXml`
264
+ %End
265
+
266
+ bool readXml( const QDomElement &columnElem );
267
+ %Docstring
268
+ Reads the column's properties from xml.
269
+
270
+ :param columnElem: a QDomElement holding the column's desired properties.
271
+
272
+ .. seealso:: :py:func:`writeXml`
273
+ %End
274
+
275
+ QString attribute() const;
276
+ %Docstring
277
+ Returns the attribute name or expression used for the column's values. This property
278
+ is only used when the column is part of a :py:class:`QgsLayoutItemAttributeTable`.
279
+
280
+ .. note::
281
+
282
+ only applicable when used in a :py:class:`QgsLayoutItemAttributeTable`
283
+
284
+ .. seealso:: :py:func:`setAttribute`
285
+ %End
286
+
287
+ void setAttribute( const QString &attribute );
288
+ %Docstring
289
+ Sets the ``attribute`` name or expression used for the column's values. This property
290
+ is only used when the column is part of a :py:class:`QgsLayoutItemAttributeTable`.
291
+
292
+ .. note::
293
+
294
+ only applicable when used in a :py:class:`QgsLayoutItemAttributeTable`
295
+
296
+ .. seealso:: :py:func:`attribute`
297
+ %End
298
+
299
+ Qt::SortOrder sortOrder() const;
300
+ %Docstring
301
+ Returns the sort order for the column. This property is only used when the column
302
+ is part of a QgsLayoutItemAttributeTable and when sortByRank is > 0.
303
+
304
+ .. note::
305
+
306
+ only applicable when used in a :py:class:`QgsLayoutItemAttributeTable`
307
+
308
+ .. seealso:: :py:func:`setSortOrder`
309
+
310
+ .. seealso:: :py:func:`sortByRank`
311
+ %End
312
+
313
+ void setSortOrder( Qt::SortOrder order );
314
+ %Docstring
315
+ Sets the sort ``order`` for the column. This property is only used when the column
316
+ is part of a QgsLayoutItemAttributeTable and when sortByRank() is > 0.
317
+
318
+ .. note::
319
+
320
+ only applicable when used in a :py:class:`QgsLayoutItemAttributeTable`
321
+
322
+ .. seealso:: :py:func:`sortOrder`
323
+
324
+ .. seealso:: :py:func:`setSortByRank`
325
+ %End
326
+
327
+ QgsLayoutTableSortColumn *clone() /Factory/;
328
+ %Docstring
329
+ Creates a duplicate column which is a deep copy of this column.
330
+
331
+ :return: a new QgsLayoutTableSortColumn with same properties as this column.
332
+ %End
333
+
334
+ };
335
+
223
336
/************************************************************************
224
337
* This file has been generated automatically from *
225
338
* *
0 commit comments