File: qtgui_tab_widget.xml

package info (click to toggle)
gnuradio 3.7.13.4-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 45,992 kB
  • sloc: cpp: 155,723; python: 88,934; xml: 42,165; ansic: 41,036; fortran: 927; asm: 803; sh: 224; lisp: 31; makefile: 17
file content (207 lines) | stat: -rw-r--r-- 5,980 bytes parent folder | download | duplicates (2)
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
<?xml version="1.0"?>
<!--
###################################################
##WX GUI Notebook
###################################################
 -->
<block>
	<name>QT GUI Tab Widget</name>
	<key>qtgui_tab_widget</key>
	<import>from PyQt5 import Qt</import>
	<make>#set $win = 'self.%s'%$id
Qt.QTabWidget()
#set $all_labels = [$label0, $label1, $label2, $label3, $label4,
                    $label5, $label6, $label7, $label8, $label9,
                    $label10, $label11, $label12, $label13, $label14,
                    $label15, $label16, $label17, $label18, $label19][:int($num_tabs())]
#for i, label in enumerate($all_labels)
self.$(id)_widget_$(i) = Qt.QWidget()
self.$(id)_layout_$(i) = Qt.QBoxLayout(Qt.QBoxLayout.TopToBottom, self.$(id)_widget_$(i))
self.$(id)_grid_layout_$(i) = Qt.QGridLayout()
self.$(id)_layout_$(i).addLayout(self.$(id)_grid_layout_$(i))
$(win).addTab(self.$(id)_widget_$(i), $label)
#end for
$(gui_hint() % $win)</make>

	<param>
		<name>Num Tabs</name>
		<key>num_tabs</key>
		<value>1</value>
		<type>enum</type>
		<option><name>1</name><key>1</key></option>
		<option><name>2</name><key>2</key></option>
		<option><name>3</name><key>3</key></option>
		<option><name>4</name><key>4</key></option>
		<option><name>5</name><key>5</key></option>
		<option><name>6</name><key>6</key></option>
		<option><name>7</name><key>7</key></option>
		<option><name>8</name><key>8</key></option>
		<option><name>9</name><key>9</key></option>
		<option><name>10</name><key>10</key></option>
		<option><name>11</name><key>11</key></option>
		<option><name>12</name><key>12</key></option>
		<option><name>13</name><key>13</key></option>
		<option><name>14</name><key>14</key></option>
		<option><name>15</name><key>15</key></option>
		<option><name>16</name><key>16</key></option>
		<option><name>17</name><key>17</key></option>
		<option><name>18</name><key>18</key></option>
		<option><name>19</name><key>19</key></option>
		<option><name>20</name><key>20</key></option>
	</param>
	<param>
		<name>Label 0</name>
		<key>label0</key>
		<value>Tab 0</value>
		<type>string</type>
		<hide>#if int($num_tabs()) > 0 then 'none' else 'all'#</hide>
	</param>
	<param>
		<name>Label 1</name>
		<key>label1</key>
		<value>Tab 1</value>
		<type>string</type>
		<hide>#if int($num_tabs()) > 1 then 'none' else 'all'#</hide>
	</param>
	<param>
		<name>Label 2</name>
		<key>label2</key>
		<value>Tab 2</value>
		<type>string</type>
		<hide>#if int($num_tabs()) > 2 then 'none' else 'all'#</hide>
	</param>
	<param>
		<name>Label 3</name>
		<key>label3</key>
		<value>Tab 3</value>
		<type>string</type>
		<hide>#if int($num_tabs()) > 3 then 'none' else 'all'#</hide>
	</param>
	<param>
		<name>Label 4</name>
		<key>label4</key>
		<value>Tab 4</value>
		<type>string</type>
		<hide>#if int($num_tabs()) > 4 then 'none' else 'all'#</hide>
	</param>
	<param>
		<name>Label 5</name>
		<key>label5</key>
		<value>Tab 5</value>
		<type>string</type>
		<hide>#if int($num_tabs()) > 5 then 'none' else 'all'#</hide>
	</param>
	<param>
		<name>Label 6</name>
		<key>label6</key>
		<value>Tab 6</value>
		<type>string</type>
		<hide>#if int($num_tabs()) > 6 then 'none' else 'all'#</hide>
	</param>
	<param>
		<name>Label 7</name>
		<key>label7</key>
		<value>Tab 7</value>
		<type>string</type>
		<hide>#if int($num_tabs()) > 7 then 'none' else 'all'#</hide>
	</param>
	<param>
		<name>Label 8</name>
		<key>label8</key>
		<value>Tab 8</value>
		<type>string</type>
		<hide>#if int($num_tabs()) > 8 then 'none' else 'all'#</hide>
	</param>
	<param>
		<name>Label 9</name>
		<key>label9</key>
		<value>Tab 9</value>
		<type>string</type>
		<hide>#if int($num_tabs()) > 9 then 'none' else 'all'#</hide>
	</param>
	<param>
		<name>Label 10</name>
		<key>label10</key>
		<value>Tab 10</value>
		<type>string</type>
		<hide>#if int($num_tabs()) > 10 then 'none' else 'all'#</hide>
	</param>
	<param>
		<name>Label 11</name>
		<key>label11</key>
		<value>Tab 11</value>
		<type>string</type>
		<hide>#if int($num_tabs()) > 11 then 'none' else 'all'#</hide>
	</param>
	<param>
		<name>Label 12</name>
		<key>label12</key>
		<value>Tab 12</value>
		<type>string</type>
		<hide>#if int($num_tabs()) > 12 then 'none' else 'all'#</hide>
	</param>
	<param>
		<name>Label 13</name>
		<key>label13</key>
		<value>Tab 13</value>
		<type>string</type>
		<hide>#if int($num_tabs()) > 13 then 'none' else 'all'#</hide>
	</param>
	<param>
		<name>Label 14</name>
		<key>label14</key>
		<value>Tab 14</value>
		<type>string</type>
		<hide>#if int($num_tabs()) > 14 then 'none' else 'all'#</hide>
	</param>
	<param>
		<name>Label 15</name>
		<key>label15</key>
		<value>Tab 15</value>
		<type>string</type>
		<hide>#if int($num_tabs()) > 15 then 'none' else 'all'#</hide>
	</param>
	<param>
		<name>Label 16</name>
		<key>label16</key>
		<value>Tab 16</value>
		<type>string</type>
		<hide>#if int($num_tabs()) > 16 then 'none' else 'all'#</hide>
	</param>
	<param>
		<name>Label 17</name>
		<key>label17</key>
		<value>Tab 17</value>
		<type>string</type>
		<hide>#if int($num_tabs()) > 17 then 'none' else 'all'#</hide>
	</param>
	<param>
		<name>Label 18</name>
		<key>label18</key>
		<value>Tab 18</value>
		<type>string</type>
		<hide>#if int($num_tabs()) > 18 then 'none' else 'all'#</hide>
	</param>
	<param>
		<name>Label 19</name>
		<key>label19</key>
		<value>Tab 19</value>
		<type>string</type>
		<hide>#if int($num_tabs()) > 19 then 'none' else 'all'#</hide>
	</param>
	<param>
		<name>GUI Hint</name>
		<key>gui_hint</key>
		<value></value>
		<type>gui_hint</type>
		<hide>part</hide>
	</param>
	<doc>
This block creates a tabbed widget to organize other widgets. \
The ID of this block can be used as the tab_id in the GUI hints of other widgets.

The GUI hint can be used to position the widget within the application. \
The hint is of the form [tab_id@tab_index]: [row, col, row_span, col_span]. \
Both the tab specification and the grid position are optional.
	</doc>
</block>