source: tspsg/ui/mainwindow.ui @ aaf2113307

0.1.3.145-beta1-symbian0.1.4.170-beta2-bb10appveyorimgbotreadme
Last change on this file since aaf2113307 was aaf2113307, checked in by Oleksii Serdiuk, 15 years ago

+ Implemented File/Save? action.
+ Added "Save Solution" and "Back to Task" buttons to Solution tab for better usability.

  • Increased maximum number of cities to 20. Solving for 18-20 cities is already takes much time, so I thought it doesn't make sense to increase more.
  • Columns and rows are now resized to contents on all platforms.
  • Property mode set to 100644
File size: 19.9 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<ui version="4.0">
3 <class>MainWindow</class>
4 <widget class="QMainWindow" name="MainWindow">
5  <property name="geometry">
6   <rect>
7    <x>0</x>
8    <y>0</y>
9    <width>502</width>
10    <height>407</height>
11   </rect>
12  </property>
13  <property name="windowTitle">
14   <string>Travelling Salesman Problem</string>
15  </property>
16  <property name="windowIcon">
17   <iconset resource="../resources/tspsg.qrc">
18    <normaloff>:/images/icon.png</normaloff>:/images/icon.png</iconset>
19  </property>
20  <widget class="QWidget" name="centralwidget">
21   <widget class="QTabWidget" name="tabWidget">
22    <property name="geometry">
23     <rect>
24      <x>0</x>
25      <y>0</y>
26      <width>287</width>
27      <height>298</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">
46        <item>
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>
58        </item>
59        <item>
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>
74          <property name="statusTip">
75           <string>Number of variant</string>
76          </property>
77          <property name="minimum">
78           <number>1</number>
79          </property>
80         </widget>
81        </item>
82        <item>
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>
91        </item>
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="value">
104           <number>5</number>
105          </property>
106         </widget>
107        </item>
108        <item>
109         <spacer>
110          <property name="orientation">
111           <enum>Qt::Horizontal</enum>
112          </property>
113          <property name="sizeHint" stdset="0">
114           <size>
115            <width>40</width>
116            <height>20</height>
117           </size>
118          </property>
119         </spacer>
120        </item>
121       </layout>
122      </item>
123      <item>
124       <widget class="QTableView" name="taskView">
125        <property name="statusTip">
126         <string>Cost of travel from city to city</string>
127        </property>
128        <property name="selectionMode">
129         <enum>QAbstractItemView::NoSelection</enum>
130        </property>
131       </widget>
132      </item>
133      <item>
134       <layout class="QHBoxLayout">
135        <item>
136         <spacer>
137          <property name="orientation">
138           <enum>Qt::Horizontal</enum>
139          </property>
140          <property name="sizeHint" stdset="0">
141           <size>
142            <width>40</width>
143            <height>20</height>
144           </size>
145          </property>
146         </spacer>
147        </item>
148        <item>
149         <widget class="QPushButton" name="buttonRandom">
150          <property name="cursor">
151           <cursorShape>PointingHandCursor</cursorShape>
152          </property>
153          <property name="statusTip">
154           <string>Fill table with random numbers</string>
155          </property>
156          <property name="text">
157           <string>Random</string>
158          </property>
159          <property name="icon">
160           <iconset resource="../resources/tspsg.qrc">
161            <normaloff>:/images/icons/roll.png</normaloff>:/images/icons/roll.png</iconset>
162          </property>
163         </widget>
164        </item>
165        <item>
166         <widget class="QPushButton" name="buttonSolve">
167          <property name="cursor">
168           <cursorShape>PointingHandCursor</cursorShape>
169          </property>
170          <property name="statusTip">
171           <string>Solve current task</string>
172          </property>
173          <property name="text">
174           <string>Solve</string>
175          </property>
176          <property name="icon">
177           <iconset resource="../resources/tspsg.qrc">
178            <normaloff>:/images/icons/button_ok.png</normaloff>:/images/icons/button_ok.png</iconset>
179          </property>
180         </widget>
181        </item>
182       </layout>
183      </item>
184     </layout>
185    </widget>
186    <widget class="QWidget" name="tabSolution">
187     <attribute name="title">
188      <string>Solution</string>
189     </attribute>
190     <layout class="QVBoxLayout" name="verticalLayout">
191      <item>
192       <widget class="QTextEdit" name="solutionText">
193        <property name="enabled">
194         <bool>false</bool>
195        </property>
196        <property name="statusTip">
197         <string>Solution steps</string>
198        </property>
199        <property name="readOnly">
200         <bool>true</bool>
201        </property>
202        <property name="textInteractionFlags">
203         <set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
204        </property>
205       </widget>
206      </item>
207      <item>
208       <layout class="QHBoxLayout" name="horizontalLayout">
209        <item>
210         <widget class="QPushButton" name="buttonSaveSolution">
211          <property name="enabled">
212           <bool>false</bool>
213          </property>
214          <property name="cursor">
215           <cursorShape>PointingHandCursor</cursorShape>
216          </property>
217          <property name="statusTip">
218           <string>Save solution to a file</string>
219          </property>
220          <property name="text">
221           <string>Save Solution</string>
222          </property>
223          <property name="icon">
224           <iconset resource="../resources/tspsg.qrc">
225            <normaloff>:/images/icons/filesaveas.png</normaloff>:/images/icons/filesaveas.png</iconset>
226          </property>
227         </widget>
228        </item>
229        <item>
230         <spacer name="horizontalSpacer">
231          <property name="orientation">
232           <enum>Qt::Horizontal</enum>
233          </property>
234          <property name="sizeHint" stdset="0">
235           <size>
236            <width>40</width>
237            <height>20</height>
238           </size>
239          </property>
240         </spacer>
241        </item>
242        <item>
243         <widget class="QPushButton" name="buttonBackToTask">
244          <property name="cursor">
245           <cursorShape>PointingHandCursor</cursorShape>
246          </property>
247          <property name="statusTip">
248           <string>Go back to Task tab</string>
249          </property>
250          <property name="text">
251           <string>Back to Task</string>
252          </property>
253          <property name="icon">
254           <iconset resource="../resources/tspsg.qrc">
255            <normaloff>:/images/icons/back.png</normaloff>:/images/icons/back.png</iconset>
256          </property>
257         </widget>
258        </item>
259       </layout>
260      </item>
261     </layout>
262    </widget>
263   </widget>
264  </widget>
265  <widget class="QMenuBar" name="menubar">
266   <property name="geometry">
267    <rect>
268     <x>0</x>
269     <y>0</y>
270     <width>502</width>
271     <height>22</height>
272    </rect>
273   </property>
274   <widget class="QMenu" name="menuFile">
275    <property name="windowIcon">
276     <iconset>
277      <normaloff/>
278     </iconset>
279    </property>
280    <property name="title">
281     <string>&amp;File</string>
282    </property>
283    <widget class="QMenu" name="menuFileSaveAs">
284     <property name="title">
285      <string>Save &amp;As</string>
286     </property>
287     <property name="icon">
288      <iconset resource="../resources/tspsg.qrc">
289       <normaloff>:/images/icons/filesaveas.png</normaloff>:/images/icons/filesaveas.png</iconset>
290     </property>
291     <addaction name="actionFileSaveAsTask"/>
292     <addaction name="actionFileSaveAsSolution"/>
293    </widget>
294    <addaction name="actionFileNew"/>
295    <addaction name="actionFileOpen"/>
296    <addaction name="actionFileSave"/>
297    <addaction name="menuFileSaveAs"/>
298    <addaction name="separator"/>
299    <addaction name="actionFilePrintSetup"/>
300    <addaction name="actionFilePrint"/>
301    <addaction name="separator"/>
302    <addaction name="actionFileExit"/>
303   </widget>
304   <widget class="QMenu" name="menuSettings">
305    <property name="title">
306     <string>&amp;Settings</string>
307    </property>
308    <widget class="QMenu" name="menuSettingsLanguage">
309     <property name="toolTip">
310      <string>Select language</string>
311     </property>
312     <property name="statusTip">
313      <string>Select application language</string>
314     </property>
315     <property name="title">
316      <string comment="Please, append &quot; / Language&quot; when translating this string.">&amp;Language</string>
317     </property>
318     <property name="icon">
319      <iconset resource="../resources/tspsg.qrc">
320       <normaloff>:/images/icons/locale.png</normaloff>:/images/icons/locale.png</iconset>
321     </property>
322     <addaction name="actionSettingsLanguageAutodetect"/>
323     <addaction name="separator"/>
324     <addaction name="actionSettingsLanguageEnglish"/>
325    </widget>
326    <addaction name="menuSettingsLanguage"/>
327    <addaction name="separator"/>
328    <addaction name="actionSettingsPreferences"/>
329   </widget>
330   <widget class="QMenu" name="menuHelp">
331    <property name="title">
332     <string>&amp;Help</string>
333    </property>
334    <addaction name="actionHelpContents"/>
335    <addaction name="actionHelpContextual"/>
336    <addaction name="separator"/>
337    <addaction name="actionHelpAboutQt"/>
338    <addaction name="actionHelpAbout"/>
339   </widget>
340   <addaction name="menuFile"/>
341   <addaction name="menuSettings"/>
342   <addaction name="menuHelp"/>
343  </widget>
344  <widget class="QStatusBar" name="statusbar"/>
345  <widget class="QToolBar" name="toolBar">
346   <property name="cursor">
347    <cursorShape>ArrowCursor</cursorShape>
348   </property>
349   <attribute name="toolBarArea">
350    <enum>TopToolBarArea</enum>
351   </attribute>
352   <attribute name="toolBarBreak">
353    <bool>false</bool>
354   </attribute>
355   <addaction name="actionFileNew"/>
356   <addaction name="actionFileOpen"/>
357   <addaction name="actionFileSave"/>
358   <addaction name="separator"/>
359   <addaction name="actionFilePrint"/>
360   <addaction name="actionSettingsPreferences"/>
361   <addaction name="separator"/>
362   <addaction name="actionFileExit"/>
363  </widget>
364  <action name="actionFilePrintSetup">
365   <property name="enabled">
366    <bool>false</bool>
367   </property>
368   <property name="icon">
369    <iconset resource="../resources/tspsg.qrc">
370     <normaloff>:/images/icons/fileprint.png</normaloff>:/images/icons/fileprint.png</iconset>
371   </property>
372   <property name="text">
373    <string>P&amp;rint Setup...</string>
374   </property>
375   <property name="statusTip">
376    <string>Setup printing</string>
377   </property>
378  </action>
379  <action name="actionFilePrint">
380   <property name="enabled">
381    <bool>false</bool>
382   </property>
383   <property name="icon">
384    <iconset resource="../resources/tspsg.qrc">
385     <normaloff>:/images/icons/fileprint.png</normaloff>:/images/icons/fileprint.png</iconset>
386   </property>
387   <property name="text">
388    <string>&amp;Print...</string>
389   </property>
390   <property name="statusTip">
391    <string>Print solution results</string>
392   </property>
393   <property name="shortcut">
394    <string>Ctrl+P</string>
395   </property>
396  </action>
397  <action name="actionFileSaveSolutionMatrices">
398   <property name="enabled">
399    <bool>false</bool>
400   </property>
401   <property name="text">
402    <string>Solution S&amp;teps</string>
403   </property>
404   <property name="toolTip">
405    <string>Save solution steps</string>
406   </property>
407   <property name="statusTip">
408    <string>Save solution steps only</string>
409   </property>
410  </action>
411  <action name="actionFileSaveSolutionGraph">
412   <property name="enabled">
413    <bool>false</bool>
414   </property>
415   <property name="text">
416    <string>Solution &amp;Graph</string>
417   </property>
418   <property name="toolTip">
419    <string>Save solution graph</string>
420   </property>
421   <property name="statusTip">
422    <string>Save solution graph only</string>
423   </property>
424  </action>
425  <action name="actionFileSaveAsSolution">
426   <property name="enabled">
427    <bool>false</bool>
428   </property>
429   <property name="text">
430    <string>&amp;Solution...</string>
431   </property>
432   <property name="iconText">
433    <string>Solution...</string>
434   </property>
435   <property name="toolTip">
436    <string>Save solution</string>
437   </property>
438   <property name="statusTip">
439    <string>Save solution to a file</string>
440   </property>
441  </action>
442  <action name="actionFileNew">
443   <property name="icon">
444    <iconset resource="../resources/tspsg.qrc">
445     <normaloff>:/images/icons/filenew.png</normaloff>:/images/icons/filenew.png</iconset>
446   </property>
447   <property name="text">
448    <string>&amp;New</string>
449   </property>
450   <property name="iconText">
451    <string>New</string>
452   </property>
453   <property name="toolTip">
454    <string>New task</string>
455   </property>
456   <property name="statusTip">
457    <string>Create new task</string>
458   </property>
459   <property name="shortcut">
460    <string>Ctrl+N</string>
461   </property>
462  </action>
463  <action name="actionFileOpen">
464   <property name="icon">
465    <iconset resource="../resources/tspsg.qrc">
466     <normaloff>:/images/icons/fileopen.png</normaloff>:/images/icons/fileopen.png</iconset>
467   </property>
468   <property name="text">
469    <string>&amp;Open...</string>
470   </property>
471   <property name="iconText">
472    <string>Open...</string>
473   </property>
474   <property name="toolTip">
475    <string>Open task</string>
476   </property>
477   <property name="statusTip">
478    <string>Open saved task</string>
479   </property>
480   <property name="shortcut">
481    <string>Ctrl+O</string>
482   </property>
483  </action>
484  <action name="actionSettingsPreferences">
485   <property name="icon">
486    <iconset resource="../resources/tspsg.qrc">
487     <normaloff>:/images/icons/preferences_system.png</normaloff>:/images/icons/preferences_system.png</iconset>
488   </property>
489   <property name="text">
490    <string>&amp;Preferences...</string>
491   </property>
492   <property name="iconText">
493    <string>Preferences...</string>
494   </property>
495   <property name="statusTip">
496    <string>Application preferences</string>
497   </property>
498  </action>
499  <action name="actionHelpContents">
500   <property name="enabled">
501    <bool>false</bool>
502   </property>
503   <property name="icon">
504    <iconset resource="../resources/tspsg.qrc">
505     <normaloff>:/images/icons/contents.png</normaloff>:/images/icons/contents.png</iconset>
506   </property>
507   <property name="text">
508    <string>&amp;Contents</string>
509   </property>
510   <property name="statusTip">
511    <string>Open help contents</string>
512   </property>
513   <property name="shortcut">
514    <string>Ctrl+F1</string>
515   </property>
516  </action>
517  <action name="actionHelpContextual">
518   <property name="enabled">
519    <bool>false</bool>
520   </property>
521   <property name="icon">
522    <iconset resource="../resources/tspsg.qrc">
523     <normaloff>:/images/icons/help_browser.png</normaloff>:/images/icons/help_browser.png</iconset>
524   </property>
525   <property name="text">
526    <string>Context &amp;Help</string>
527   </property>
528   <property name="statusTip">
529    <string>Open context help</string>
530   </property>
531   <property name="shortcut">
532    <string>F1</string>
533   </property>
534  </action>
535  <action name="actionHelpAbout">
536   <property name="icon">
537    <iconset resource="../resources/tspsg.qrc">
538     <normaloff>:/images/icons/help_about.png</normaloff>:/images/icons/help_about.png</iconset>
539   </property>
540   <property name="text">
541    <string>&amp;About...</string>
542   </property>
543   <property name="iconText">
544    <string>About...</string>
545   </property>
546   <property name="statusTip">
547    <string>About application</string>
548   </property>
549  </action>
550  <action name="actionFileExit">
551   <property name="icon">
552    <iconset resource="../resources/tspsg.qrc">
553     <normaloff>:/images/icons/exit.png</normaloff>:/images/icons/exit.png</iconset>
554   </property>
555   <property name="text">
556    <string>E&amp;xit</string>
557   </property>
558   <property name="statusTip">
559    <string>Exit application</string>
560   </property>
561  </action>
562  <action name="actionFileSaveAsTask">
563   <property name="text">
564    <string>&amp;Task...</string>
565   </property>
566   <property name="iconText">
567    <string>Task...</string>
568   </property>
569   <property name="toolTip">
570    <string>Save task</string>
571   </property>
572   <property name="statusTip">
573    <string>Save task to file</string>
574   </property>
575  </action>
576  <action name="actionSettingsLanguageAutodetect">
577   <property name="checkable">
578    <bool>true</bool>
579   </property>
580   <property name="checked">
581    <bool>true</bool>
582   </property>
583   <property name="text">
584    <string>&amp;Autodetect</string>
585   </property>
586   <property name="toolTip">
587    <string>Detect language automatically</string>
588   </property>
589   <property name="statusTip">
590    <string>Detect language automatically based on regional settings</string>
591   </property>
592  </action>
593  <action name="actionSettingsLanguageEnglish">
594   <property name="checkable">
595    <bool>true</bool>
596   </property>
597   <property name="checked">
598    <bool>true</bool>
599   </property>
600   <property name="text">
601    <string notr="true">&amp;English</string>
602   </property>
603   <property name="iconText">
604    <string notr="true">English</string>
605   </property>
606  </action>
607  <action name="actionFileSave">
608   <property name="icon">
609    <iconset resource="../resources/tspsg.qrc">
610     <normaloff>:/images/icons/filesave.png</normaloff>:/images/icons/filesave.png</iconset>
611   </property>
612   <property name="text">
613    <string>&amp;Save</string>
614   </property>
615   <property name="iconText">
616    <string>Save</string>
617   </property>
618   <property name="toolTip">
619    <string>Save task</string>
620   </property>
621   <property name="statusTip">
622    <string>Save current task</string>
623   </property>
624   <property name="shortcut">
625    <string>Ctrl+S</string>
626   </property>
627  </action>
628  <action name="actionHelpAboutQt">
629   <property name="icon">
630    <iconset resource="../resources/tspsg.qrc">
631     <normaloff>:/images/icons/qtlogo-64.png</normaloff>:/images/icons/qtlogo-64.png</iconset>
632   </property>
633   <property name="text">
634    <string>About &amp;Qt...</string>
635   </property>
636   <property name="iconText">
637    <string>About Qt...</string>
638   </property>
639   <property name="statusTip">
640    <string>About Qt library</string>
641   </property>
642  </action>
643 </widget>
644 <resources>
645  <include location="../resources/tspsg.qrc"/>
646 </resources>
647 <connections>
648  <connection>
649   <sender>actionFileExit</sender>
650   <signal>triggered()</signal>
651   <receiver>MainWindow</receiver>
652   <slot>close()</slot>
653   <hints>
654    <hint type="sourcelabel">
655     <x>-1</x>
656     <y>-1</y>
657    </hint>
658    <hint type="destinationlabel">
659     <x>294</x>
660     <y>229</y>
661    </hint>
662   </hints>
663  </connection>
664  <connection>
665   <sender>buttonSaveSolution</sender>
666   <signal>clicked()</signal>
667   <receiver>actionFileSaveAsSolution</receiver>
668   <slot>trigger()</slot>
669   <hints>
670    <hint type="sourcelabel">
671     <x>58</x>
672     <y>327</y>
673    </hint>
674    <hint type="destinationlabel">
675     <x>-1</x>
676     <y>-1</y>
677    </hint>
678   </hints>
679  </connection>
680 </connections>
681</ui>
Note: See TracBrowser for help on using the repository browser.