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

Last change on this file since 29 was 29, checked in by laleppa, 16 years ago

+ Selected application language is now saved and restored.
+ Added language selection entries to main menu.
+ On-the-fly language switching.
+ Loading corresponding Qt library language, if exists.

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