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

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

+ Current file name is displayed in main application window header.

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