source: tspsg/ui/mainwindow.ui @ 281303f1f7

0.1.3.145-beta1-symbian0.1.4.170-beta2-bb10appveyorimgbotreadme
Last change on this file since 281303f1f7 was c10297cf73, checked in by Oleksii Serdiuk, 15 years ago
  • mainwindow.ui and mainwindow.ce.ui had differences only in printing actions and statusbar, so I merged them into one. Differences are now applied in source code. This will simplify Main Window maintenance.
  • Changed #ifndef Q_OS_WINCE to #ifndef QT_NO_PRINTER where relevant.
  • Now using method at() instead of operator [] in solving algorithm. This change dramatically decreased solution time (from 13 seconds to 10-40 milliseconds for 20 cities on my PC).
  • Increased maximum number of cities to 30. Setting more makes no sense at this moment, because generated solution output is big and inserting it to QTextEdit takes veeeeery long time.
  • Translations were updated.
  • Property mode set to 100644
File size: 19.4 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>344</width>
10    <height>381</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="tabPosition">
37     <enum>QTabWidget::North</enum>
38    </property>
39    <property name="currentIndex">
40     <number>0</number>
41    </property>
42    <widget class="QWidget" name="tabTask">
43     <attribute name="title">
44      <string>Task</string>
45     </attribute>
46     <layout class="QVBoxLayout">
47      <item>
48       <layout class="QHBoxLayout">
49        <item>
50         <spacer>
51          <property name="orientation">
52           <enum>Qt::Horizontal</enum>
53          </property>
54          <property name="sizeHint" stdset="0">
55           <size>
56            <width>40</width>
57            <height>20</height>
58           </size>
59          </property>
60         </spacer>
61        </item>
62        <item>
63         <widget class="QLabel" name="labelVariant">
64          <property name="text">
65           <string>&amp;Variant:</string>
66          </property>
67          <property name="buddy">
68           <cstring>spinVariant</cstring>
69          </property>
70         </widget>
71        </item>
72        <item>
73         <widget class="QSpinBox" name="spinVariant">
74          <property name="cursor">
75           <cursorShape>PointingHandCursor</cursorShape>
76          </property>
77          <property name="statusTip">
78           <string>Number of variant</string>
79          </property>
80          <property name="minimum">
81           <number>1</number>
82          </property>
83         </widget>
84        </item>
85        <item>
86         <widget class="QLabel" name="labelCities">
87          <property name="text">
88           <string>&amp;Cities:</string>
89          </property>
90          <property name="buddy">
91           <cstring>spinCities</cstring>
92          </property>
93         </widget>
94        </item>
95        <item>
96         <widget class="QSpinBox" name="spinCities">
97          <property name="cursor">
98           <cursorShape>PointingHandCursor</cursorShape>
99          </property>
100          <property name="statusTip">
101           <string>Number of cities</string>
102          </property>
103          <property name="minimum">
104           <number>3</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>
124       </layout>
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">
138        <item>
139         <spacer>
140          <property name="orientation">
141           <enum>Qt::Horizontal</enum>
142          </property>
143          <property name="sizeHint" stdset="0">
144           <size>
145            <width>40</width>
146            <height>20</height>
147           </size>
148          </property>
149         </spacer>
150        </item>
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>
185       </layout>
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      <item>
211       <layout class="QHBoxLayout" name="horizontalLayout">
212        <item>
213         <widget class="QPushButton" name="buttonSaveSolution">
214          <property name="enabled">
215           <bool>false</bool>
216          </property>
217          <property name="cursor">
218           <cursorShape>PointingHandCursor</cursorShape>
219          </property>
220          <property name="statusTip">
221           <string>Save solution to a file</string>
222          </property>
223          <property name="text">
224           <string>Save Solution</string>
225          </property>
226          <property name="icon">
227           <iconset resource="../resources/tspsg.qrc">
228            <normaloff>:/images/icons/filesaveas.png</normaloff>:/images/icons/filesaveas.png</iconset>
229          </property>
230         </widget>
231        </item>
232        <item>
233         <spacer name="horizontalSpacer">
234          <property name="orientation">
235           <enum>Qt::Horizontal</enum>
236          </property>
237          <property name="sizeHint" stdset="0">
238           <size>
239            <width>40</width>
240            <height>20</height>
241           </size>
242          </property>
243         </spacer>
244        </item>
245        <item>
246         <widget class="QPushButton" name="buttonBackToTask">
247          <property name="cursor">
248           <cursorShape>PointingHandCursor</cursorShape>
249          </property>
250          <property name="statusTip">
251           <string>Go back to Task tab</string>
252          </property>
253          <property name="text">
254           <string>Back to Task</string>
255          </property>
256          <property name="icon">
257           <iconset resource="../resources/tspsg.qrc">
258            <normaloff>:/images/icons/back.png</normaloff>:/images/icons/back.png</iconset>
259          </property>
260         </widget>
261        </item>
262       </layout>
263      </item>
264     </layout>
265    </widget>
266   </widget>
267  </widget>
268  <widget class="QMenuBar" name="menubar">
269   <property name="geometry">
270    <rect>
271     <x>0</x>
272     <y>0</y>
273     <width>344</width>
274     <height>22</height>
275    </rect>
276   </property>
277   <widget class="QMenu" name="menuFile">
278    <property name="windowIcon">
279     <iconset>
280      <normaloff/>
281     </iconset>
282    </property>
283    <property name="title">
284     <string>&amp;File</string>
285    </property>
286    <widget class="QMenu" name="menuFileSaveAs">
287     <property name="title">
288      <string>Save &amp;As</string>
289     </property>
290     <property name="icon">
291      <iconset resource="../resources/tspsg.qrc">
292       <normaloff>:/images/icons/filesaveas.png</normaloff>:/images/icons/filesaveas.png</iconset>
293     </property>
294     <addaction name="actionFileSaveAsTask"/>
295     <addaction name="actionFileSaveAsSolution"/>
296    </widget>
297    <addaction name="actionFileNew"/>
298    <addaction name="actionFileOpen"/>
299    <addaction name="actionFileSave"/>
300    <addaction name="menuFileSaveAs"/>
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="QToolBar" name="toolBar">
345   <property name="cursor">
346    <cursorShape>ArrowCursor</cursorShape>
347   </property>
348   <property name="windowTitle">
349    <string>Toolbar</string>
350   </property>
351   <attribute name="toolBarArea">
352    <enum>TopToolBarArea</enum>
353   </attribute>
354   <attribute name="toolBarBreak">
355    <bool>false</bool>
356   </attribute>
357   <addaction name="actionFileNew"/>
358   <addaction name="actionFileOpen"/>
359   <addaction name="actionFileSave"/>
360   <addaction name="separator"/>
361   <addaction name="actionSettingsPreferences"/>
362   <addaction name="separator"/>
363   <addaction name="actionFileExit"/>
364  </widget>
365  <action name="actionFilePrintPreview">
366   <property name="enabled">
367    <bool>false</bool>
368   </property>
369   <property name="icon">
370    <iconset resource="../resources/tspsg.qrc">
371     <normaloff>:/images/icons/document_preview.png</normaloff>:/images/icons/document_preview.png</iconset>
372   </property>
373   <property name="text">
374    <string>P&amp;rint Preview...</string>
375   </property>
376   <property name="iconText">
377    <string>Print Preview...</string>
378   </property>
379   <property name="toolTip">
380    <string>Preview solution results</string>
381   </property>
382   <property name="statusTip">
383    <string>Preview current solution results before printing</string>
384   </property>
385  </action>
386  <action name="actionFilePrint">
387   <property name="enabled">
388    <bool>false</bool>
389   </property>
390   <property name="icon">
391    <iconset resource="../resources/tspsg.qrc">
392     <normaloff>:/images/icons/fileprint.png</normaloff>:/images/icons/fileprint.png</iconset>
393   </property>
394   <property name="text">
395    <string>&amp;Print...</string>
396   </property>
397   <property name="iconText">
398    <string>Print...</string>
399   </property>
400   <property name="toolTip">
401    <string>Print solution</string>
402   </property>
403   <property name="statusTip">
404    <string>Print current solution results</string>
405   </property>
406   <property name="shortcut">
407    <string>Ctrl+P</string>
408   </property>
409  </action>
410  <action name="actionFileSaveAsSolution">
411   <property name="enabled">
412    <bool>false</bool>
413   </property>
414   <property name="text">
415    <string>&amp;Solution...</string>
416   </property>
417   <property name="iconText">
418    <string>Solution...</string>
419   </property>
420   <property name="toolTip">
421    <string>Save solution</string>
422   </property>
423   <property name="statusTip">
424    <string>Save solution to a file</string>
425   </property>
426  </action>
427  <action name="actionFileNew">
428   <property name="icon">
429    <iconset resource="../resources/tspsg.qrc">
430     <normaloff>:/images/icons/filenew.png</normaloff>:/images/icons/filenew.png</iconset>
431   </property>
432   <property name="text">
433    <string>&amp;New</string>
434   </property>
435   <property name="iconText">
436    <string>New</string>
437   </property>
438   <property name="toolTip">
439    <string>New task</string>
440   </property>
441   <property name="statusTip">
442    <string>Create new task</string>
443   </property>
444   <property name="shortcut">
445    <string>Ctrl+N</string>
446   </property>
447  </action>
448  <action name="actionFileOpen">
449   <property name="icon">
450    <iconset resource="../resources/tspsg.qrc">
451     <normaloff>:/images/icons/fileopen.png</normaloff>:/images/icons/fileopen.png</iconset>
452   </property>
453   <property name="text">
454    <string>&amp;Open...</string>
455   </property>
456   <property name="iconText">
457    <string>Open...</string>
458   </property>
459   <property name="toolTip">
460    <string>Open task</string>
461   </property>
462   <property name="statusTip">
463    <string>Open saved task</string>
464   </property>
465   <property name="shortcut">
466    <string>Ctrl+O</string>
467   </property>
468  </action>
469  <action name="actionSettingsPreferences">
470   <property name="icon">
471    <iconset resource="../resources/tspsg.qrc">
472     <normaloff>:/images/icons/preferences_system.png</normaloff>:/images/icons/preferences_system.png</iconset>
473   </property>
474   <property name="text">
475    <string>&amp;Preferences...</string>
476   </property>
477   <property name="iconText">
478    <string>Preferences...</string>
479   </property>
480   <property name="statusTip">
481    <string>Application preferences</string>
482   </property>
483  </action>
484  <action name="actionHelpContents">
485   <property name="enabled">
486    <bool>false</bool>
487   </property>
488   <property name="icon">
489    <iconset resource="../resources/tspsg.qrc">
490     <normaloff>:/images/icons/contents.png</normaloff>:/images/icons/contents.png</iconset>
491   </property>
492   <property name="text">
493    <string>&amp;Contents</string>
494   </property>
495   <property name="statusTip">
496    <string>Open help contents</string>
497   </property>
498   <property name="shortcut">
499    <string>Ctrl+F1</string>
500   </property>
501  </action>
502  <action name="actionHelpContextual">
503   <property name="enabled">
504    <bool>false</bool>
505   </property>
506   <property name="icon">
507    <iconset resource="../resources/tspsg.qrc">
508     <normaloff>:/images/icons/help_browser.png</normaloff>:/images/icons/help_browser.png</iconset>
509   </property>
510   <property name="text">
511    <string>Context &amp;Help</string>
512   </property>
513   <property name="statusTip">
514    <string>Open context help</string>
515   </property>
516   <property name="shortcut">
517    <string>F1</string>
518   </property>
519  </action>
520  <action name="actionHelpAbout">
521   <property name="icon">
522    <iconset resource="../resources/tspsg.qrc">
523     <normaloff>:/images/icons/help_about.png</normaloff>:/images/icons/help_about.png</iconset>
524   </property>
525   <property name="text">
526    <string>&amp;About...</string>
527   </property>
528   <property name="iconText">
529    <string>About...</string>
530   </property>
531   <property name="statusTip">
532    <string>About application</string>
533   </property>
534  </action>
535  <action name="actionFileExit">
536   <property name="icon">
537    <iconset resource="../resources/tspsg.qrc">
538     <normaloff>:/images/icons/exit.png</normaloff>:/images/icons/exit.png</iconset>
539   </property>
540   <property name="text">
541    <string>E&amp;xit</string>
542   </property>
543   <property name="statusTip">
544    <string>Exit application</string>
545   </property>
546  </action>
547  <action name="actionFileSaveAsTask">
548   <property name="text">
549    <string>&amp;Task...</string>
550   </property>
551   <property name="iconText">
552    <string>Task...</string>
553   </property>
554   <property name="toolTip">
555    <string>Save task</string>
556   </property>
557   <property name="statusTip">
558    <string>Save task to file</string>
559   </property>
560  </action>
561  <action name="actionSettingsLanguageAutodetect">
562   <property name="checkable">
563    <bool>true</bool>
564   </property>
565   <property name="checked">
566    <bool>true</bool>
567   </property>
568   <property name="text">
569    <string>&amp;Autodetect</string>
570   </property>
571   <property name="toolTip">
572    <string>Detect language automatically</string>
573   </property>
574   <property name="statusTip">
575    <string>Detect language automatically based on regional settings</string>
576   </property>
577  </action>
578  <action name="actionSettingsLanguageEnglish">
579   <property name="checkable">
580    <bool>true</bool>
581   </property>
582   <property name="checked">
583    <bool>true</bool>
584   </property>
585   <property name="text">
586    <string notr="true">&amp;English</string>
587   </property>
588   <property name="iconText">
589    <string notr="true">English</string>
590   </property>
591  </action>
592  <action name="actionFileSave">
593   <property name="icon">
594    <iconset resource="../resources/tspsg.qrc">
595     <normaloff>:/images/icons/filesave.png</normaloff>:/images/icons/filesave.png</iconset>
596   </property>
597   <property name="text">
598    <string>&amp;Save</string>
599   </property>
600   <property name="iconText">
601    <string>Save</string>
602   </property>
603   <property name="toolTip">
604    <string>Save task</string>
605   </property>
606   <property name="statusTip">
607    <string>Save current task</string>
608   </property>
609   <property name="shortcut">
610    <string>Ctrl+S</string>
611   </property>
612  </action>
613  <action name="actionHelpAboutQt">
614   <property name="icon">
615    <iconset resource="../resources/tspsg.qrc">
616     <normaloff>:/images/icons/qtlogo-64.png</normaloff>:/images/icons/qtlogo-64.png</iconset>
617   </property>
618   <property name="text">
619    <string>About &amp;Qt...</string>
620   </property>
621   <property name="iconText">
622    <string>About Qt...</string>
623   </property>
624   <property name="statusTip">
625    <string>About Qt library</string>
626   </property>
627  </action>
628 </widget>
629 <resources>
630  <include location="../resources/tspsg.qrc"/>
631 </resources>
632 <connections>
633  <connection>
634   <sender>actionFileExit</sender>
635   <signal>triggered()</signal>
636   <receiver>MainWindow</receiver>
637   <slot>close()</slot>
638   <hints>
639    <hint type="sourcelabel">
640     <x>-1</x>
641     <y>-1</y>
642    </hint>
643    <hint type="destinationlabel">
644     <x>294</x>
645     <y>229</y>
646    </hint>
647   </hints>
648  </connection>
649  <connection>
650   <sender>buttonSaveSolution</sender>
651   <signal>clicked()</signal>
652   <receiver>actionFileSaveAsSolution</receiver>
653   <slot>trigger()</slot>
654   <hints>
655    <hint type="sourcelabel">
656     <x>58</x>
657     <y>327</y>
658    </hint>
659    <hint type="destinationlabel">
660     <x>-1</x>
661     <y>-1</y>
662    </hint>
663   </hints>
664  </connection>
665 </connections>
666</ui>
Note: See TracBrowser for help on using the repository browser.