summaryrefslogtreecommitdiffstats
path: root/kommander/examples/tutorial/slots.kmdr
blob: 46d0a6b1098af1ebe7fb2bc9d4ec258418bbd95e (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
<!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>396</width>
            <height>386</height>
        </rect>
    </property>
    <property name="caption">
        <string>Archive viewer</string>
    </property>
    <property name="associations" stdset="0">
        <stringlist>
            <string></string>
        </stringlist>
    </property>
    <grid>
        <property name="name">
            <cstring>unnamed</cstring>
        </property>
        <property name="margin">
            <number>11</number>
        </property>
        <property name="spacing">
            <number>6</number>
        </property>
        <widget class=TQLAYOUTWIDGET_OBJECT_NAME_STRING row="0" column="0">
            <property name="name">
                <cstring>Layout1</cstring>
            </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=TQLABEL_OBJECT_NAME_STRING>
                    <property name="name">
                        <cstring>TextLabel1</cstring>
                    </property>
                    <property name="text">
                        <string>Archive name:</string>
                    </property>
                </widget>
                <widget class="FileSelector">
                    <property name="name">
                        <cstring>FileSelector</cstring>
                    </property>
                    <property name="associations" stdset="0">
                        <stringlist>
                            <string>@widgetText</string>
                        </stringlist>
                    </property>
                    <property name="selectionFilter">
                        <string>*.tar.gz</string>
                        <comment>Tar archives</comment>
                    </property>
                </widget>
            </hbox>
        </widget>
        <widget class=TQLAYOUTWIDGET_OBJECT_NAME_STRING row="1" column="0">
            <property name="name">
                <cstring>Layout2</cstring>
            </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=TQLABEL_OBJECT_NAME_STRING>
                    <property name="name">
                        <cstring>TextLabel2</cstring>
                    </property>
                    <property name="text">
                        <string>List of files:</string>
                    </property>
                </widget>
                <widget class="ListBox">
                    <property name="name">
                        <cstring>FileListBox</cstring>
                    </property>
                    <property name="populationText">
                        <string>@exec("tar tzf @FileSelector")</string>
                    </property>
                    <property name="associations" stdset="0">
                        <stringlist>
                            <string>@selectedWidgetText</string>
                        </stringlist>
                    </property>
                </widget>
            </vbox>
        </widget>
        <widget class=TQLAYOUTWIDGET_OBJECT_NAME_STRING row="2" column="0">
            <property name="name">
                <cstring>Layout3</cstring>
            </property>
            <hbox>
                <property name="name">
                    <cstring>unnamed</cstring>
                </property>
                <property name="margin">
                    <number>0</number>
                </property>
                <property name="spacing">
                    <number>6</number>
                </property>
                <spacer>
                    <property name="name">
                        <cstring>Spacer1</cstring>
                    </property>
                    <property name="orientation">
                        <enum>Horizontal</enum>
                    </property>
                    <property name="sizeType">
                        <enum>Expanding</enum>
                    </property>
                    <property name="tqsizeHint">
                        <size>
                            <width>30</width>
                            <height>0</height>
                        </size>
                    </property>
                </spacer>
                <widget class="ExecButton">
                    <property name="name">
                        <cstring>ExecButton1</cstring>
                    </property>
                    <property name="text">
                        <string>View</string>
                    </property>
                    <property name="associations" stdset="0">
                        <stringlist>
                            <string>if [ "@FileSelector" -a "@FileListBox" ]; then
   tar xzf "@FileSelector" -C /tmp "@FileListBox" 
   konqueror "/tmp/@FileListBox"
fi
</string>
                        </stringlist>
                    </property>
                </widget>
                <widget class="CloseButton">
                    <property name="name">
                        <cstring>CloseButton1</cstring>
                    </property>
                    <property name="text">
                        <string>&amp;Close</string>
                    </property>
                </widget>
                <spacer>
                    <property name="name">
                        <cstring>Spacer2</cstring>
                    </property>
                    <property name="orientation">
                        <enum>Horizontal</enum>
                    </property>
                    <property name="sizeType">
                        <enum>Expanding</enum>
                    </property>
                    <property name="tqsizeHint">
                        <size>
                            <width>30</width>
                            <height>0</height>
                        </size>
                    </property>
                </spacer>
            </hbox>
        </widget>
    </grid>
</widget>
<connections>
    <connection>
        <sender>FileSelector</sender>
        <signal>widgetTextChanged(const QString&amp;)</signal>
        <receiver>FileListBox</receiver>
        <slot>populate()</slot>
    </connection>
    <connection>
        <sender>FileListBox</sender>
        <signal>doubleClicked(QListBoxItem*)</signal>
        <receiver>ExecButton1</receiver>
        <slot>startProcess()</slot>
    </connection>
</connections>
<layoutdefaults spacing="6" margin="11"/>
</UI>