File: qgslayouttablecolumn.sip.in

package info (click to toggle)
qgis 3.40.11%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,183,800 kB
  • sloc: cpp: 1,595,841; python: 372,637; xml: 23,474; sh: 3,761; perl: 3,664; ansic: 2,257; sql: 2,137; yacc: 1,068; lex: 577; javascript: 540; lisp: 411; makefile: 154
file content (262 lines) | stat: -rw-r--r-- 7,658 bytes parent folder | download | duplicates (14)
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
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/core/layout/qgslayouttablecolumn.h                               *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/





class QgsLayoutTableColumn
{
%Docstring(signature="appended")
Stores properties of a column for a :py:class:`QgsLayoutTable`.

Some properties of a :py:class:`QgsLayoutTableColumn` are applicable
only in certain contexts. For instance, the attribute and setAttribute
methods only have an effect for
:py:class:`QgsLayoutItemAttributeTables`, and have no effect for
:py:class:`QgsLayoutItemTextTables`.
%End

%TypeHeaderCode
#include "qgslayouttablecolumn.h"
%End
  public:

    QgsLayoutTableColumn( const QString &heading = QString() );
%Docstring
Constructor for QgsLayoutTableColumn.

:param heading: column heading
%End

    bool writeXml( QDomElement &columnElem, QDomDocument &doc ) const;
%Docstring
Writes the column's properties to xml for storage.

:param columnElem: an existing QDomElement in which to store the
                   column's properties.
:param doc: QDomDocument for the destination xml.

.. seealso:: :py:func:`readXml`
%End

    bool readXml( const QDomElement &columnElem );
%Docstring
Reads the column's properties from xml.

:param columnElem: a QDomElement holding the column's desired
                   properties.

.. seealso:: :py:func:`writeXml`
%End

    double width() const;
%Docstring
Returns the width for the column in mm, or 0 if column width is
automatically calculated.

.. seealso:: :py:func:`setWidth`
%End

    void setWidth( const double width );
%Docstring
Sets the width for a column in mm. Set the ``width`` to 0 if the column
width is to be automatically calculated.

.. seealso:: :py:func:`width`
%End

    QString heading() const;
%Docstring
Returns the heading for a column, which is the value displayed in the
column's header cell.

.. seealso:: :py:func:`setHeading`
%End

    void setHeading( const QString &heading );
%Docstring
Sets the ``heading`` for a column, which is the value displayed in the
column's header cell.

.. seealso:: :py:func:`heading`
%End

    Qt::AlignmentFlag hAlignment() const;
%Docstring
Returns the horizontal alignment for a column, which controls the
alignment used for drawing column values within cells.

.. seealso:: :py:func:`setHAlignment`

.. seealso:: :py:func:`vAlignment`
%End

    void setHAlignment( Qt::AlignmentFlag alignment );
%Docstring
Sets the horizontal ``alignment`` for a column, which controls the
alignment used for drawing column values within cells.

.. seealso:: :py:func:`hAlignment`

.. seealso:: :py:func:`setVAlignment`
%End

    Qt::AlignmentFlag vAlignment() const;
%Docstring
Returns the vertical alignment for a column, which controls the
alignment used for drawing column values within cells.

.. seealso:: :py:func:`setVAlignment`

.. seealso:: :py:func:`hAlignment`
%End

    void setVAlignment( Qt::AlignmentFlag alignment );
%Docstring
Sets the vertical ``alignment`` for a column, which controls the
alignment used for drawing column values within cells.

.. seealso:: :py:func:`vAlignment`

.. seealso:: :py:func:`setHAlignment`
%End

    QString attribute() const;
%Docstring
Returns the attribute name or expression used for the column's values.
This property is only used when the column is part of a
:py:class:`QgsLayoutItemAttributeTable`.

.. note::

   only applicable when used in a :py:class:`QgsLayoutItemAttributeTable`

.. seealso:: :py:func:`setAttribute`
%End

    void setAttribute( const QString &attribute );
%Docstring
Sets the ``attribute`` name or expression used for the column's values.
This property is only used when the column is part of a
:py:class:`QgsLayoutItemAttributeTable`.

.. note::

   only applicable when used in a :py:class:`QgsLayoutItemAttributeTable`

.. seealso:: :py:func:`attribute`
%End

    Qt::SortOrder sortOrder() const;
%Docstring
Returns the sort order for the column. This property is only used when
the column is part of a :py:class:`QgsLayoutItemAttributeTable` and when
sortByRank is > 0.

.. note::

   only applicable when used in a :py:class:`QgsLayoutItemAttributeTable`

.. seealso:: :py:func:`setSortOrder`

.. seealso:: :py:func:`sortByRank`
%End

    void setSortOrder( Qt::SortOrder order );
%Docstring
Sets the sort ``order`` for the column. This property is only used when
the column is part of a :py:class:`QgsLayoutItemAttributeTable` and when
:py:func:`~QgsLayoutTableColumn.sortByRank` is > 0.

.. note::

   only applicable when used in a :py:class:`QgsLayoutItemAttributeTable`

.. seealso:: :py:func:`sortOrder`

.. seealso:: :py:func:`setSortByRank`
%End

 int sortByRank() const /Deprecated/;
%Docstring
Returns the sort rank for the column. If the sort rank is > 0 then the
column will be sorted in the table. The sort rank specifies the priority
given to the column when the table is sorted by multiple columns, with
lower sort ranks having higher priority. This property is only used when
the column is part of a :py:class:`QgsLayoutItemAttributeTable`.

If sort rank is <= 0 then the column is not being sorted.

.. note::

   only applicable when used in a :py:class:`QgsLayoutItemAttributeTable`

.. seealso:: :py:func:`setSortByRank`

.. seealso:: :py:func:`sortOrder`

.. deprecated:: 3.14

   The order is now hold in a dedicated model.
%End

 void setSortByRank( int rank ) /Deprecated/;
%Docstring
Sets the sort ``rank`` for the column. If the sort rank is > 0 then the
column will be sorted in the table. The sort rank specifies the priority
given to the column when the table is sorted by multiple columns, with
lower sort ranks having higher priority. This property is only used when
the column is part of a :py:class:`QgsLayoutItemAttributeTable`. If the
sort ``rank`` is <= 0 then the column is not being sorted.

.. note::

   only applicable when used in a :py:class:`QgsLayoutItemAttributeTable`

.. seealso:: :py:func:`sortByRank`

.. seealso:: :py:func:`setSortOrder`

.. deprecated:: 3.14

   The order is now hold in a dedicated model.
%End

 QgsLayoutTableColumn *clone() /Deprecated,Factory/;
%Docstring
Creates a duplicate column which is a deep copy of this column.

:return: a new QgsLayoutTableColumn with same properties as this column.

.. deprecated:: 3.14

   Use a copy instead.
%End

    bool operator==( const QgsLayoutTableColumn &other ) const;


    SIP_PYOBJECT __repr__();
%MethodCode
    QString str;
    if ( sipCpp->heading() != sipCpp->attribute() && !sipCpp->heading().isEmpty() )
      str = QStringLiteral( "<QgsLayoutTableColumn: %1 (\"%2\")>" ).arg( sipCpp->attribute(), sipCpp->heading() );
    else
      str = QStringLiteral( "<QgsLayoutTableColumn: %1>" ).arg( sipCpp->attribute() );
    sipRes = PyUnicode_FromString( str.toUtf8().constData() );
%End

};
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/core/layout/qgslayouttablecolumn.h                               *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/