source: tspsg-svn/trunk/ui/mainwindow.ui @ 91

Last change on this file since 91 was 80, checked in by laleppa, 15 years ago

+ Added Wait Cursor on city number change, because it can take some time (e.g. when changing from 5 to 50 cities).

  • Moved platform specific action definitions from .ui to source.
  • Changed random generation to include defined maximum (it was up to maximum previously).
  • Reverted from native to Qt open/save file dialog under WinCE, because it is more convenient than the native one.
  • English translation is now always loaded at application start before any other language is loaded. This is done to support plurals and some special characters that Qt translation system doesn't "like".
  • Updated translations to reflect recent changes.
  • Property svn:keywords set to Id
File size: 17.5 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<ui version="4.0">
3 <author>Lёppa: $Id: mainwindow.ui 80 2009-12-22 19:56:21Z laleppa $</author>
4 <class>MainWindow</class>
5 <widget class="QMainWindow" name="MainWindow">
6  <property name="geometry">
7   <rect>
8    <x>0</x>
9    <y>0</y>
10    <width>297</width>
11    <height>353</height>
12   </rect>
13  </property>
14  <property name="windowTitle">
15   <string>Travelling Salesman Problem</string>
16  </property>
17  <property name="windowIcon">
18   <iconset resource="../resources/tspsg.qrc">
19    <normaloff>:/images/tspsg.png</normaloff>:/images/tspsg.png</iconset>
20  </property>
21  <widget class="QWidget" name="centralwidget">
22   <widget class="QTabWidget" name="tabWidget">
23    <property name="geometry">
24     <rect>
25      <x>0</x>
26      <y>0</y>
27      <width>287</width>
28      <height>298</height>
29     </rect>
30    </property>
31    <property name="sizePolicy">
32     <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
33      <horstretch>0</horstretch>
34      <verstretch>0</verstretch>
35     </sizepolicy>
36    </property>
37    <property name="tabPosition">
38     <enum>QTabWidget::North</enum>
39    </property>
40    <property name="currentIndex">
41     <number>0</number>
42    </property>
43    <widget class="QWidget" name="tabTask">
44     <attribute name="title">
45      <string>Task</string>
46     </attribute>
47     <layout class="QVBoxLayout">
48      <item>
49       <layout class="QHBoxLayout">
50        <item>
51         <spacer>
52          <property name="orientation">
53           <enum>Qt::Horizontal</enum>
54          </property>
55          <property name="sizeHint" stdset="0">
56           <size>
57            <width>40</width>
58            <height>20</height>
59           </size>
60          </property>
61         </spacer>
62        </item>
63        <item>
64         <widget class="QLabel" name="labelVariant">
65          <property name="text">
66           <string>&amp;Variant:</string>
67          </property>
68          <property name="buddy">
69           <cstring>spinVariant</cstring>
70          </property>
71         </widget>
72        </item>
73        <item>
74         <widget class="QSpinBox" name="spinVariant">
75          <property name="cursor">
76           <cursorShape>PointingHandCursor</cursorShape>
77          </property>
78          <property name="statusTip">
79           <string>Number of variant</string>
80          </property>
81          <property name="minimum">
82           <number>1</number>
83          </property>
84         </widget>
85        </item>
86        <item>
87         <widget class="QLabel" name="labelCities">
88          <property name="text">
89           <string>&amp;Cities:</string>
90          </property>
91          <property name="buddy">
92           <cstring>spinCities</cstring>
93          </property>
94         </widget>
95        </item>
96        <item>
97         <widget class="QSpinBox" name="spinCities">
98          <property name="cursor">
99           <cursorShape>PointingHandCursor</cursorShape>
100          </property>
101          <property name="statusTip">
102           <string>Number of cities</string>
103          </property>
104          <property name="minimum">
105           <number>3</number>
106          </property>
107          <property name="value">
108           <number>5</number>
109          </property>
110         </widget>
111        </item>
112        <item>
113         <spacer>
114          <property name="orientation">
115           <enum>Qt::Horizontal</enum>
116          </property>
117          <property name="sizeHint" stdset="0">
118           <size>
119            <width>40</width>
120            <height>20</height>
121           </size>
122          </property>
123         </spacer>
124        </item>
125       </layout>
126      </item>
127      <item>
128       <widget class="QTableView" name="taskView">
129        <property name="statusTip">
130         <string>Cost of travel from city to city</string>
131        </property>
132        <property name="selectionMode">
133         <enum>QAbstractItemView::NoSelection</enum>
134        </property>
135       </widget>
136      </item>
137      <item>
138       <layout class="QHBoxLayout">
139        <item>
140         <spacer>
141          <property name="orientation">
142           <enum>Qt::Horizontal</enum>
143          </property>
144          <property name="sizeHint" stdset="0">
145           <size>
146            <width>40</width>
147            <height>20</height>
148           </size>
149          </property>
150         </spacer>
151        </item>
152        <item>
153         <widget class="QPushButton" name="buttonRandom">
154          <property name="cursor">
155           <cursorShape>PointingHandCursor</cursorShape>
156          </property>
157          <property name="statusTip">
158           <string>Fill table with random numbers</string>
159          </property>
160          <property name="text">
161           <string>Random</string>
162          </property>
163          <property name="icon">
164           <iconset resource="../resources/tspsg.qrc">
165            <normaloff>:/images/icons/roll.png</normaloff>:/images/icons/roll.png</iconset>
166          </property>
167         </widget>
168        </item>
169        <item>
170         <widget class="QPushButton" name="buttonSolve">
171          <property name="cursor">
172           <cursorShape>PointingHandCursor</cursorShape>
173          </property>
174          <property name="statusTip">
175           <string>Solve current task</string>
176          </property>
177          <property name="text">
178           <string>Solve</string>
179          </property>
180          <property name="icon">
181           <iconset resource="../resources/tspsg.qrc">
182            <normaloff>:/images/icons/button_ok.png</normaloff>:/images/icons/button_ok.png</iconset>
183          </property>
184         </widget>
185        </item>
186       </layout>
187      </item>
188     </layout>
189    </widget>
190    <widget class="QWidget" name="tabSolution">
191     <attribute name="title">
192      <string>Solution</string>
193     </attribute>
194     <layout class="QVBoxLayout" name="verticalLayout">
195      <item>
196       <widget class="QTextEdit" name="solutionText">
197        <property name="enabled">
198         <bool>false</bool>
199        </property>
200        <property name="statusTip">
201         <string>Solution steps</string>
202        </property>
203        <property name="readOnly">
204         <bool>true</bool>
205        </property>
206        <property name="textInteractionFlags">
207         <set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
208        </property>
209       </widget>
210      </item>
211      <item>
212       <layout class="QHBoxLayout" name="horizontalLayout">
213        <item>
214         <widget class="QPushButton" name="buttonSaveSolution">
215          <property name="enabled">
216           <bool>false</bool>
217          </property>
218          <property name="cursor">
219           <cursorShape>PointingHandCursor</cursorShape>
220          </property>
221          <property name="statusTip">
222           <string>Save solution to a file</string>
223          </property>
224          <property name="text">
225           <string>Save Solution</string>
226          </property>
227          <property name="icon">
228           <iconset resource="../resources/tspsg.qrc">
229            <normaloff>:/images/icons/filesaveas.png</normaloff>:/images/icons/filesaveas.png</iconset>
230          </property>
231         </widget>
232        </item>
233        <item>
234         <spacer name="horizontalSpacer">
235          <property name="orientation">
236           <enum>Qt::Horizontal</enum>
237          </property>
238          <property name="sizeHint" stdset="0">
239           <size>
240            <width>40</width>
241            <height>20</height>
242           </size>
243          </property>
244         </spacer>
245        </item>
246        <item>
247         <widget class="QPushButton" name="buttonBackToTask">
248          <property name="cursor">
249           <cursorShape>PointingHandCursor</cursorShape>
250          </property>
251          <property name="statusTip">
252           <string>Go back to Task tab</string>
253          </property>
254          <property name="text">
255           <string>Back to Task</string>
256          </property>
257          <property name="icon">
258           <iconset resource="../resources/tspsg.qrc">
259            <normaloff>:/images/icons/back.png</normaloff>:/images/icons/back.png</iconset>
260          </property>
261         </widget>
262        </item>
263       </layout>
264      </item>
265     </layout>
266    </widget>
267   </widget>
268  </widget>
269  <widget class="QMenuBar" name="menubar">
270   <property name="geometry">
271    <rect>
272     <x>0</x>
273     <y>0</y>
274     <width>297</width>
275     <height>21</height>
276    </rect>
277   </property>
278   <widget class="QMenu" name="menuFile">
279    <property name="windowIcon">
280     <iconset>
281      <normaloff/>
282     </iconset>
283    </property>
284    <property name="title">
285     <string>&amp;File</string>
286    </property>
287    <widget class="QMenu" name="menuFileSaveAs">
288     <property name="title">
289      <string>Save &amp;As</string>
290     </property>
291     <property name="icon">
292      <iconset resource="../resources/tspsg.qrc">
293       <normaloff>:/images/icons/filesaveas.png</normaloff>:/images/icons/filesaveas.png</iconset>
294     </property>
295     <addaction name="actionFileSaveAsTask"/>
296     <addaction name="actionFileSaveAsSolution"/>
297    </widget>
298    <addaction name="actionFileNew"/>
299    <addaction name="actionFileOpen"/>
300    <addaction name="actionFileSave"/>
301    <addaction name="menuFileSaveAs"/>
302    <addaction name="separator"/>
303    <addaction name="actionFileExit"/>
304   </widget>
305   <widget class="QMenu" name="menuSettings">
306    <property name="title">
307     <string>&amp;Settings</string>
308    </property>
309    <widget class="QMenu" name="menuSettingsLanguage">
310     <property name="toolTip">
311      <string>Select language</string>
312     </property>
313     <property name="statusTip">
314      <string>Select application language</string>
315     </property>
316     <property name="title">
317      <string comment="Please, append &quot; / Language&quot; when translating this string.">&amp;Language</string>
318     </property>
319     <property name="icon">
320      <iconset resource="../resources/tspsg.qrc">
321       <normaloff>:/images/icons/locale.png</normaloff>:/images/icons/locale.png</iconset>
322     </property>
323     <addaction name="actionSettingsLanguageAutodetect"/>
324     <addaction name="separator"/>
325     <addaction name="actionSettingsLanguageEnglish"/>
326    </widget>
327    <addaction name="menuSettingsLanguage"/>
328    <addaction name="separator"/>
329    <addaction name="actionSettingsPreferences"/>
330   </widget>
331   <widget class="QMenu" name="menuHelp">
332    <property name="title">
333     <string>&amp;Help</string>
334    </property>
335    <addaction name="actionHelpContents"/>
336    <addaction name="actionHelpContextual"/>
337    <addaction name="separator"/>
338    <addaction name="actionHelpAboutQt"/>
339    <addaction name="actionHelpAbout"/>
340   </widget>
341   <addaction name="menuFile"/>
342   <addaction name="menuSettings"/>
343   <addaction name="menuHelp"/>
344  </widget>
345  <widget class="QToolBar" name="toolBar">
346   <property name="cursor">
347    <cursorShape>ArrowCursor</cursorShape>
348   </property>
349   <property name="windowTitle">
350    <string>Toolbar</string>
351   </property>
352   <attribute name="toolBarArea">
353    <enum>TopToolBarArea</enum>
354   </attribute>
355   <attribute name="toolBarBreak">
356    <bool>false</bool>
357   </attribute>
358   <addaction name="actionFileNew"/>
359   <addaction name="actionFileOpen"/>
360   <addaction name="actionFileSave"/>
361   <addaction name="separator"/>
362   <addaction name="actionSettingsPreferences"/>
363   <addaction name="separator"/>
364   <addaction name="actionFileExit"/>
365  </widget>
366  <action name="actionFileSaveAsSolution">
367   <property name="enabled">
368    <bool>false</bool>
369   </property>
370   <property name="text">
371    <string>&amp;Solution...</string>
372   </property>
373   <property name="toolTip">
374    <string>Save solution</string>
375   </property>
376   <property name="statusTip">
377    <string>Save solution to a file</string>
378   </property>
379  </action>
380  <action name="actionFileNew">
381   <property name="icon">
382    <iconset resource="../resources/tspsg.qrc">
383     <normaloff>:/images/icons/filenew.png</normaloff>:/images/icons/filenew.png</iconset>
384   </property>
385   <property name="text">
386    <string>&amp;New</string>
387   </property>
388   <property name="toolTip">
389    <string>New task</string>
390   </property>
391   <property name="statusTip">
392    <string>Create new task</string>
393   </property>
394   <property name="shortcut">
395    <string>Ctrl+N</string>
396   </property>
397  </action>
398  <action name="actionFileOpen">
399   <property name="icon">
400    <iconset resource="../resources/tspsg.qrc">
401     <normaloff>:/images/icons/fileopen.png</normaloff>:/images/icons/fileopen.png</iconset>
402   </property>
403   <property name="text">
404    <string>&amp;Open...</string>
405   </property>
406   <property name="toolTip">
407    <string>Open task</string>
408   </property>
409   <property name="statusTip">
410    <string>Open saved task</string>
411   </property>
412   <property name="shortcut">
413    <string>Ctrl+O</string>
414   </property>
415  </action>
416  <action name="actionSettingsPreferences">
417   <property name="icon">
418    <iconset resource="../resources/tspsg.qrc">
419     <normaloff>:/images/icons/preferences_system.png</normaloff>:/images/icons/preferences_system.png</iconset>
420   </property>
421   <property name="text">
422    <string>&amp;Preferences...</string>
423   </property>
424   <property name="statusTip">
425    <string>Application preferences</string>
426   </property>
427  </action>
428  <action name="actionHelpContents">
429   <property name="enabled">
430    <bool>false</bool>
431   </property>
432   <property name="icon">
433    <iconset resource="../resources/tspsg.qrc">
434     <normaloff>:/images/icons/contents.png</normaloff>:/images/icons/contents.png</iconset>
435   </property>
436   <property name="text">
437    <string>&amp;Contents</string>
438   </property>
439   <property name="statusTip">
440    <string>Open help contents</string>
441   </property>
442   <property name="shortcut">
443    <string>Ctrl+F1</string>
444   </property>
445  </action>
446  <action name="actionHelpContextual">
447   <property name="enabled">
448    <bool>false</bool>
449   </property>
450   <property name="icon">
451    <iconset resource="../resources/tspsg.qrc">
452     <normaloff>:/images/icons/help_browser.png</normaloff>:/images/icons/help_browser.png</iconset>
453   </property>
454   <property name="text">
455    <string>Context &amp;Help</string>
456   </property>
457   <property name="statusTip">
458    <string>Open context help</string>
459   </property>
460   <property name="shortcut">
461    <string>F1</string>
462   </property>
463  </action>
464  <action name="actionHelpAbout">
465   <property name="icon">
466    <iconset resource="../resources/tspsg.qrc">
467     <normaloff>:/images/icons/help_about.png</normaloff>:/images/icons/help_about.png</iconset>
468   </property>
469   <property name="text">
470    <string>&amp;About TSPSG...</string>
471   </property>
472   <property name="statusTip">
473    <string>About application</string>
474   </property>
475  </action>
476  <action name="actionFileExit">
477   <property name="icon">
478    <iconset resource="../resources/tspsg.qrc">
479     <normaloff>:/images/icons/exit.png</normaloff>:/images/icons/exit.png</iconset>
480   </property>
481   <property name="text">
482    <string>E&amp;xit</string>
483   </property>
484   <property name="statusTip">
485    <string>Exit application</string>
486   </property>
487  </action>
488  <action name="actionFileSaveAsTask">
489   <property name="text">
490    <string>&amp;Task...</string>
491   </property>
492   <property name="toolTip">
493    <string>Save task</string>
494   </property>
495   <property name="statusTip">
496    <string>Save task to file</string>
497   </property>
498  </action>
499  <action name="actionSettingsLanguageAutodetect">
500   <property name="checkable">
501    <bool>true</bool>
502   </property>
503   <property name="checked">
504    <bool>true</bool>
505   </property>
506   <property name="text">
507    <string>&amp;Autodetect</string>
508   </property>
509   <property name="toolTip">
510    <string>Detect language automatically</string>
511   </property>
512   <property name="statusTip">
513    <string>Detect language automatically based on regional settings</string>
514   </property>
515  </action>
516  <action name="actionSettingsLanguageEnglish">
517   <property name="checkable">
518    <bool>true</bool>
519   </property>
520   <property name="checked">
521    <bool>true</bool>
522   </property>
523   <property name="text">
524    <string notr="true">&amp;English</string>
525   </property>
526   <property name="iconText">
527    <string notr="true">English</string>
528   </property>
529  </action>
530  <action name="actionFileSave">
531   <property name="icon">
532    <iconset resource="../resources/tspsg.qrc">
533     <normaloff>:/images/icons/filesave.png</normaloff>:/images/icons/filesave.png</iconset>
534   </property>
535   <property name="text">
536    <string>&amp;Save</string>
537   </property>
538   <property name="toolTip">
539    <string>Save task</string>
540   </property>
541   <property name="statusTip">
542    <string>Save current task</string>
543   </property>
544   <property name="shortcut">
545    <string>Ctrl+S</string>
546   </property>
547  </action>
548  <action name="actionHelpAboutQt">
549   <property name="icon">
550    <iconset resource="../resources/tspsg.qrc">
551     <normaloff>:/images/icons/qtlogo-64.png</normaloff>:/images/icons/qtlogo-64.png</iconset>
552   </property>
553   <property name="text">
554    <string>About &amp;Qt...</string>
555   </property>
556   <property name="statusTip">
557    <string>About Qt library</string>
558   </property>
559  </action>
560 </widget>
561 <resources>
562  <include location="../resources/tspsg.qrc"/>
563 </resources>
564 <connections>
565  <connection>
566   <sender>actionFileExit</sender>
567   <signal>triggered()</signal>
568   <receiver>MainWindow</receiver>
569   <slot>close()</slot>
570   <hints>
571    <hint type="sourcelabel">
572     <x>-1</x>
573     <y>-1</y>
574    </hint>
575    <hint type="destinationlabel">
576     <x>294</x>
577     <y>229</y>
578    </hint>
579   </hints>
580  </connection>
581  <connection>
582   <sender>buttonSaveSolution</sender>
583   <signal>clicked()</signal>
584   <receiver>actionFileSaveAsSolution</receiver>
585   <slot>trigger()</slot>
586   <hints>
587    <hint type="sourcelabel">
588     <x>58</x>
589     <y>327</y>
590    </hint>
591    <hint type="destinationlabel">
592     <x>-1</x>
593     <y>-1</y>
594    </hint>
595   </hints>
596  </connection>
597 </connections>
598</ui>
Note: See TracBrowser for help on using the repository browser.