summaryrefslogtreecommitdiffstats
path: root/kommander/examples/tutorial/table.kmdr
blob: 8b219269173ff7a50934b68c15d0e2e86c43d1e6 (plain)
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
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
<class>Form1</class>
<widget class="Dialog">
    <property name="name">
        <cstring>Form1</cstring>
    </property>
    <property name="geometry">
        <rect>
            <x>0</x>
            <y>0</y>
            <width>629</width>
            <height>313</height>
        </rect>
    </property>
    <property name="caption">
        <string>Table Demo</string>
    </property>
    <widget class="Table">
        <column>
            <property name="text">
                <string>0</string>
            </property>
        </column>
        <column>
            <property name="text">
                <string>1</string>
            </property>
        </column>
        <row>
            <property name="text">
                <string>0</string>
            </property>
        </row>
        <row>
            <property name="text">
                <string>1</string>
            </property>
        </row>
        <row>
            <property name="text">
                <string>2</string>
            </property>
        </row>
        <row>
            <property name="text">
                <string>3</string>
            </property>
        </row>
        <row>
            <property name="text">
                <string>4</string>
            </property>
        </row>
        <property name="name">
            <cstring>Table</cstring>
        </property>
        <property name="geometry">
            <rect>
                <x>10</x>
                <y>10</y>
                <width>400</width>
                <height>240</height>
            </rect>
        </property>
        <property name="resizePolicy">
            <enum>AutoOneFit</enum>
        </property>
        <property name="numRows">
            <number>5</number>
        </property>
        <property name="numCols">
            <number>2</number>
        </property>
        <property name="associations" stdset="0">
            <stringlist>
                <string></string>
            </stringlist>
        </property>
    </widget>
    <widget class="TQLayoutWidget">
        <property name="name">
            <cstring>Layout3</cstring>
        </property>
        <property name="geometry">
            <rect>
                <x>470</x>
                <y>10</y>
                <width>135</width>
                <height>160</height>
            </rect>
        </property>
        <vbox>
            <property name="name">
                <cstring>unnamed</cstring>
            </property>
            <property name="margin">
                <number>0</number>
            </property>
            <property name="spacing">
                <number>6</number>
            </property>
            <widget class="ExecButton">
                <property name="name">
                    <cstring>AddRowButton</cstring>
                </property>
                <property name="text">
                    <string>Add row</string>
                </property>
                <property name="associations" stdset="0">
                    <stringlist>
                        <string>@Table.insertRow(@Table.currentRow, 1)</string>
                    </stringlist>
                </property>
            </widget>
            <widget class="ExecButton">
                <property name="name">
                    <cstring>AddColButton</cstring>
                </property>
                <property name="text">
                    <string>Add column</string>
                </property>
                <property name="associations" stdset="0">
                    <stringlist>
                        <string>@Table.insertColumn(@Table.currentColumn, 1)</string>
                    </stringlist>
                </property>
            </widget>
            <widget class="ExecButton">
                <property name="name">
                    <cstring>ExecButton5</cstring>
                </property>
                <property name="text">
                    <string>Remove row</string>
                </property>
                <property name="associations" stdset="0">
                    <stringlist>
                        <string>@Table.removeRow(@Table.currentRow, 1)</string>
                    </stringlist>
                </property>
            </widget>
            <widget class="ExecButton">
                <property name="name">
                    <cstring>ExecButton6</cstring>
                </property>
                <property name="text">
                    <string>Remove Column</string>
                </property>
                <property name="associations" stdset="0">
                    <stringlist>
                        <string>@Table.removeColumn(@Table.currentColumn, 1)</string>
                    </stringlist>
                </property>
            </widget>
            <spacer>
                <property name="name">
                    <cstring>Spacer1</cstring>
                </property>
                <property name="orientation">
                    <enum>Vertical</enum>
                </property>
                <property name="sizeType">
                    <enum>Expanding</enum>
                </property>
                <property name="sizeHint">
                    <size>
                        <width>0</width>
                        <height>30</height>
                    </size>
                </property>
            </spacer>
        </vbox>
    </widget>
    <widget class="TQLayoutWidget">
        <property name="name">
            <cstring>Layout4</cstring>
        </property>
        <property name="geometry">
            <rect>
                <x>20</x>
                <y>270</y>
                <width>585</width>
                <height>28</height>
            </rect>
        </property>
        <hbox>
            <property name="name">
                <cstring>unnamed</cstring>
            </property>
            <property name="margin">
                <number>0</number>
            </property>
            <property name="spacing">
                <number>6</number>
            </property>
            <widget class="ExecButton">
                <property name="name">
                    <cstring>GetButton</cstring>
                </property>
                <property name="text">
                    <string>Get text</string>
                </property>
                <property name="associations" stdset="0">
                    <stringlist>
                        <string>@CellText.setText(@Table.cellText(@Table.currentRow,
   @Table.currentColumn))</string>
                    </stringlist>
                </property>
            </widget>
            <widget class="LineEdit">
                <property name="name">
                    <cstring>CellText</cstring>
                </property>
            </widget>
            <widget class="ExecButton">
                <property name="name">
                    <cstring>SetButton</cstring>
                </property>
                <property name="text">
                    <string>Set text</string>
                </property>
                <property name="associations" stdset="0">
                    <stringlist>
                        <string>@Table.setCellText(@Table.currentRow, @Table.currentColumn,
   @CellText.text)</string>
                    </stringlist>
                </property>
            </widget>
            <widget class="ExecButton">
                <property name="name">
                    <cstring>ColumnCaptionButton</cstring>
                </property>
                <property name="text">
                    <string>Set column name</string>
                </property>
                <property name="associations" stdset="0">
                    <stringlist>
                        <string>@Table.setColumnCaption(@Table.currentColumn, @CellText.text)</string>
                    </stringlist>
                </property>
            </widget>
            <widget class="ExecButton">
                <property name="name">
                    <cstring>RowCaptionButton</cstring>
                </property>
                <property name="text">
                    <string>Set row name</string>
                </property>
                <property name="associations" stdset="0">
                    <stringlist>
                        <string>@Table.setRowCaption(@Table.currentRow, @CellText.text)</string>
                    </stringlist>
                </property>
            </widget>
        </hbox>
    </widget>
</widget>
<layoutdefaults spacing="6" margin="11"/>
</UI>