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

Last change on this file since 80 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
RevLine 
[17]1<?xml version="1.0" encoding="UTF-8"?>
2<ui version="4.0">
[73]3 <author>Lёppa: $Id: mainwindow.ui 80 2009-12-22 19:56:21Z laleppa $</author>
[1]4 <class>MainWindow</class>
[17]5 <widget class="QMainWindow" name="MainWindow">
6  <property name="geometry">
[1]7   <rect>
8    <x>0</x>
9    <y>0</y>
[80]10    <width>297</width>
11    <height>353</height>
[1]12   </rect>
13  </property>
[17]14  <property name="windowTitle">
[47]15   <string>Travelling Salesman Problem</string>
[1]16  </property>
[17]17  <property name="windowIcon">
[54]18   <iconset resource="../resources/tspsg.qrc">
[62]19    <normaloff>:/images/tspsg.png</normaloff>:/images/tspsg.png</iconset>
[1]20  </property>
[17]21  <widget class="QWidget" name="centralwidget">
[42]22   <widget class="QTabWidget" name="tabWidget">
23    <property name="geometry">
24     <rect>
25      <x>0</x>
26      <y>0</y>
[50]27      <width>287</width>
28      <height>298</height>
[42]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>
[54]37    <property name="tabPosition">
38     <enum>QTabWidget::North</enum>
39    </property>
[42]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">
[1]50        <item>
[42]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>
[1]62        </item>
63        <item>
[42]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>
[17]78          <property name="statusTip">
[42]79           <string>Number of variant</string>
[7]80          </property>
[42]81          <property name="minimum">
82           <number>1</number>
[4]83          </property>
84         </widget>
[1]85        </item>
86        <item>
[42]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>
[1]95        </item>
[42]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>
[1]125       </layout>
[42]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">
[1]139        <item>
[42]140         <spacer>
141          <property name="orientation">
142           <enum>Qt::Horizontal</enum>
[1]143          </property>
[42]144          <property name="sizeHint" stdset="0">
145           <size>
146            <width>40</width>
147            <height>20</height>
148           </size>
149          </property>
150         </spacer>
[1]151        </item>
[42]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>
[1]186       </layout>
[42]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>
[50]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>
[42]265     </layout>
266    </widget>
267   </widget>
[1]268  </widget>
[17]269  <widget class="QMenuBar" name="menubar">
270   <property name="geometry">
[1]271    <rect>
272     <x>0</x>
273     <y>0</y>
[80]274     <width>297</width>
[71]275     <height>21</height>
[1]276    </rect>
277   </property>
[17]278   <widget class="QMenu" name="menuFile">
279    <property name="windowIcon">
280     <iconset>
281      <normaloff/>
282     </iconset>
[1]283    </property>
[17]284    <property name="title">
[27]285     <string>&amp;File</string>
[1]286    </property>
[31]287    <widget class="QMenu" name="menuFileSaveAs">
[17]288     <property name="title">
[50]289      <string>Save &amp;As</string>
[1]290     </property>
[17]291     <property name="icon">
292      <iconset resource="../resources/tspsg.qrc">
[38]293       <normaloff>:/images/icons/filesaveas.png</normaloff>:/images/icons/filesaveas.png</iconset>
[1]294     </property>
[42]295     <addaction name="actionFileSaveAsTask"/>
296     <addaction name="actionFileSaveAsSolution"/>
[1]297    </widget>
[17]298    <addaction name="actionFileNew"/>
299    <addaction name="actionFileOpen"/>
[31]300    <addaction name="actionFileSave"/>
301    <addaction name="menuFileSaveAs"/>
[17]302    <addaction name="separator"/>
303    <addaction name="actionFileExit"/>
[1]304   </widget>
[17]305   <widget class="QMenu" name="menuSettings">
306    <property name="title">
[27]307     <string>&amp;Settings</string>
[1]308    </property>
[29]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">
[42]317      <string comment="Please, append &quot; / Language&quot; when translating this string.">&amp;Language</string>
[29]318     </property>
[30]319     <property name="icon">
320      <iconset resource="../resources/tspsg.qrc">
[38]321       <normaloff>:/images/icons/locale.png</normaloff>:/images/icons/locale.png</iconset>
[30]322     </property>
[29]323     <addaction name="actionSettingsLanguageAutodetect"/>
[30]324     <addaction name="separator"/>
325     <addaction name="actionSettingsLanguageEnglish"/>
[29]326    </widget>
327    <addaction name="menuSettingsLanguage"/>
328    <addaction name="separator"/>
329    <addaction name="actionSettingsPreferences"/>
[1]330   </widget>
[17]331   <widget class="QMenu" name="menuHelp">
332    <property name="title">
[27]333     <string>&amp;Help</string>
[1]334    </property>
[17]335    <addaction name="actionHelpContents"/>
336    <addaction name="actionHelpContextual"/>
337    <addaction name="separator"/>
[37]338    <addaction name="actionHelpAboutQt"/>
[17]339    <addaction name="actionHelpAbout"/>
[1]340   </widget>
[17]341   <addaction name="menuFile"/>
342   <addaction name="menuSettings"/>
343   <addaction name="menuHelp"/>
[1]344  </widget>
[17]345  <widget class="QToolBar" name="toolBar">
346   <property name="cursor">
[1]347    <cursorShape>ArrowCursor</cursorShape>
348   </property>
[54]349   <property name="windowTitle">
350    <string>Toolbar</string>
351   </property>
[17]352   <attribute name="toolBarArea">
[1]353    <enum>TopToolBarArea</enum>
354   </attribute>
[17]355   <attribute name="toolBarBreak">
[1]356    <bool>false</bool>
357   </attribute>
[17]358   <addaction name="actionFileNew"/>
359   <addaction name="actionFileOpen"/>
[39]360   <addaction name="actionFileSave"/>
[17]361   <addaction name="separator"/>
[29]362   <addaction name="actionSettingsPreferences"/>
[17]363   <addaction name="separator"/>
364   <addaction name="actionFileExit"/>
[1]365  </widget>
[42]366  <action name="actionFileSaveAsSolution">
[17]367   <property name="enabled">
[7]368    <bool>false</bool>
[1]369   </property>
[17]370   <property name="text">
[42]371    <string>&amp;Solution...</string>
[1]372   </property>
[27]373   <property name="toolTip">
374    <string>Save solution</string>
375   </property>
[17]376   <property name="statusTip">
[50]377    <string>Save solution to a file</string>
[7]378   </property>
[1]379  </action>
[17]380  <action name="actionFileNew">
381   <property name="icon">
382    <iconset resource="../resources/tspsg.qrc">
[38]383     <normaloff>:/images/icons/filenew.png</normaloff>:/images/icons/filenew.png</iconset>
[1]384   </property>
[17]385   <property name="text">
[27]386    <string>&amp;New</string>
[1]387   </property>
[27]388   <property name="toolTip">
389    <string>New task</string>
390   </property>
[17]391   <property name="statusTip">
[27]392    <string>Create new task</string>
[7]393   </property>
[17]394   <property name="shortcut">
[1]395    <string>Ctrl+N</string>
396   </property>
397  </action>
[17]398  <action name="actionFileOpen">
399   <property name="icon">
400    <iconset resource="../resources/tspsg.qrc">
[38]401     <normaloff>:/images/icons/fileopen.png</normaloff>:/images/icons/fileopen.png</iconset>
[1]402   </property>
[17]403   <property name="text">
[27]404    <string>&amp;Open...</string>
[1]405   </property>
[17]406   <property name="toolTip">
[27]407    <string>Open task</string>
[7]408   </property>
[17]409   <property name="statusTip">
[27]410    <string>Open saved task</string>
[7]411   </property>
[17]412   <property name="shortcut">
[1]413    <string>Ctrl+O</string>
414   </property>
415  </action>
[29]416  <action name="actionSettingsPreferences">
[17]417   <property name="icon">
418    <iconset resource="../resources/tspsg.qrc">
[38]419     <normaloff>:/images/icons/preferences_system.png</normaloff>:/images/icons/preferences_system.png</iconset>
[1]420   </property>
[17]421   <property name="text">
[27]422    <string>&amp;Preferences...</string>
[1]423   </property>
[17]424   <property name="statusTip">
[27]425    <string>Application preferences</string>
[7]426   </property>
[1]427  </action>
[17]428  <action name="actionHelpContents">
[27]429   <property name="enabled">
430    <bool>false</bool>
431   </property>
[17]432   <property name="icon">
433    <iconset resource="../resources/tspsg.qrc">
[38]434     <normaloff>:/images/icons/contents.png</normaloff>:/images/icons/contents.png</iconset>
[1]435   </property>
[17]436   <property name="text">
[27]437    <string>&amp;Contents</string>
[1]438   </property>
[17]439   <property name="statusTip">
[27]440    <string>Open help contents</string>
[7]441   </property>
[50]442   <property name="shortcut">
443    <string>Ctrl+F1</string>
444   </property>
[1]445  </action>
[17]446  <action name="actionHelpContextual">
[27]447   <property name="enabled">
448    <bool>false</bool>
449   </property>
[17]450   <property name="icon">
451    <iconset resource="../resources/tspsg.qrc">
[38]452     <normaloff>:/images/icons/help_browser.png</normaloff>:/images/icons/help_browser.png</iconset>
[1]453   </property>
[17]454   <property name="text">
[38]455    <string>Context &amp;Help</string>
[1]456   </property>
[17]457   <property name="statusTip">
[27]458    <string>Open context help</string>
[7]459   </property>
[50]460   <property name="shortcut">
461    <string>F1</string>
462   </property>
[1]463  </action>
[17]464  <action name="actionHelpAbout">
465   <property name="icon">
466    <iconset resource="../resources/tspsg.qrc">
[38]467     <normaloff>:/images/icons/help_about.png</normaloff>:/images/icons/help_about.png</iconset>
[1]468   </property>
[17]469   <property name="text">
[74]470    <string>&amp;About TSPSG...</string>
[1]471   </property>
[17]472   <property name="statusTip">
[27]473    <string>About application</string>
[11]474   </property>
[1]475  </action>
[17]476  <action name="actionFileExit">
477   <property name="icon">
478    <iconset resource="../resources/tspsg.qrc">
[38]479     <normaloff>:/images/icons/exit.png</normaloff>:/images/icons/exit.png</iconset>
[1]480   </property>
[17]481   <property name="text">
[27]482    <string>E&amp;xit</string>
[1]483   </property>
[17]484   <property name="statusTip">
[27]485    <string>Exit application</string>
[1]486   </property>
487  </action>
[42]488  <action name="actionFileSaveAsTask">
[17]489   <property name="text">
[27]490    <string>&amp;Task...</string>
[7]491   </property>
[17]492   <property name="toolTip">
[27]493    <string>Save task</string>
[7]494   </property>
[17]495   <property name="statusTip">
[27]496    <string>Save task to file</string>
[7]497   </property>
498  </action>
[29]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>
[30]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">
[50]524    <string notr="true">&amp;English</string>
[30]525   </property>
[48]526   <property name="iconText">
527    <string notr="true">English</string>
528   </property>
[30]529  </action>
[31]530  <action name="actionFileSave">
531   <property name="icon">
532    <iconset resource="../resources/tspsg.qrc">
[38]533     <normaloff>:/images/icons/filesave.png</normaloff>:/images/icons/filesave.png</iconset>
[31]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>
[50]544   <property name="shortcut">
545    <string>Ctrl+S</string>
546   </property>
[31]547  </action>
[37]548  <action name="actionHelpAboutQt">
549   <property name="icon">
550    <iconset resource="../resources/tspsg.qrc">
[42]551     <normaloff>:/images/icons/qtlogo-64.png</normaloff>:/images/icons/qtlogo-64.png</iconset>
[37]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>
[1]560 </widget>
561 <resources>
[17]562  <include location="../resources/tspsg.qrc"/>
[1]563 </resources>
564 <connections>
565  <connection>
566   <sender>actionFileExit</sender>
567   <signal>triggered()</signal>
568   <receiver>MainWindow</receiver>
569   <slot>close()</slot>
570   <hints>
[17]571    <hint type="sourcelabel">
[1]572     <x>-1</x>
573     <y>-1</y>
574    </hint>
[17]575    <hint type="destinationlabel">
[1]576     <x>294</x>
577     <y>229</y>
578    </hint>
579   </hints>
580  </connection>
[50]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>
[1]597 </connections>
598</ui>
Note: See TracBrowser for help on using the repository browser.