Root/qstardict/patches/001-qstardict.patch

1diff --git a/plugins/stardict/dictziplib.cpp b/plugins/stardict/dictziplib.cpp
2index 867e330..bb62a54 100644
3--- a/plugins/stardict/dictziplib.cpp
4+++ b/plugins/stardict/dictziplib.cpp
5@@ -305,7 +305,7 @@ bool dictData::open(const std::string& fname, int computeCRC)
6 
7 #ifdef Q_OS_UNIX
8     if (stat(fname.c_str(), &sb) || !S_ISREG(sb.st_mode))
9-#elif def Q_OS_WIN32
10+#elif defined Q_OS_WIN32
11     if (_stat(fname.c_str(), &sb) || !(sb.stMode & _S_IFREG))
12 #endif
13     {
14diff --git a/qstardict/keyboard.cpp b/qstardict/keyboard.cpp
15index cc6e406..5a6d514 100644
16--- a/qstardict/keyboard.cpp
17+++ b/qstardict/keyboard.cpp
18@@ -82,7 +82,28 @@ Qt::KeyboardModifiers Keyboard::activeModifiers()
19 
20 } // namespace
21 
22-#endif // Q_WS_WIN
23+#elif defined(Q_WS_QWS) // Q_WS_WIN
24+
25+namespace
26+{
27+const unsigned mAlt = 0010;
28+const unsigned mCtrl = 0004;
29+const unsigned mShift = 0001;
30+const unsigned mWin = 0100;
31+}
32+
33+namespace QStarDict
34+{
35+
36+Qt::KeyboardModifiers Keyboard::activeModifiers()
37+{
38+ Qt::KeyboardModifiers result;
39+ return result;
40+}
41+
42+} // namespace
43+
44+#endif // Q_WS_QWS
45 
46 // vim: tabstop=4 softtabstop=4 shiftwidth=4 expandtab cindent textwidth=120 formatoptions=tc
47 
48diff --git a/qstardict/main.cpp b/qstardict/main.cpp
49index 8a13dc9..a726364 100644
50--- a/qstardict/main.cpp
51+++ b/qstardict/main.cpp
52@@ -35,6 +35,10 @@
53 #include <QTranslator>
54 #endif // QSTARDICT_WITH_TRANSLATIONS
55 
56+#ifdef Q_WS_QWS
57+#include <QtGui/QWSServer>
58+#endif
59+
60 int main(int argc, char *argv[])
61 {
62     QStarDict::Application app(argc, argv);
63@@ -61,6 +65,9 @@ int main(int argc, char *argv[])
64     }
65 #endif // Q_OS_WIN
66 
67+#ifdef Q_WS_QWS
68+ QWSServer::setCursorVisible(false);
69+#endif
70 
71     return app.exec();
72 }
73diff --git a/qstardict/mainwindow.cpp b/qstardict/mainwindow.cpp
74index e8b9456..29ac486 100644
75--- a/qstardict/mainwindow.cpp
76+++ b/qstardict/mainwindow.cpp
77@@ -93,7 +93,7 @@ void MainWindow::loadSettings()
78     setVisible(config.value("MainWindow/visible", true).toBool());
79     wordsListDock->setFloating(config.value("MainWindow/wordsListDock/floating", wordsListDock->isFloating()).toBool());
80     wordsListDock->setGeometry(config.value("MainWindow/wordsListDock/geometry", wordsListDock->geometry()).toRect());
81- setInstantSearch(config.value("MainWindow/instantSearch", true).toBool());
82+ setInstantSearch(config.value("MainWindow/instantSearch", false).toBool());
83     setDefaultStyleSheet(config.value("MainWindow/defaultStyleSheet", defaultStyleSheet()).toString());
84 }
85 
86diff --git a/qstardict/mainwindow.ui b/qstardict/mainwindow.ui
87index 68a37bf..fcabb84 100644
88--- a/qstardict/mainwindow.ui
89+++ b/qstardict/mainwindow.ui
90@@ -1,190 +1,241 @@
91-<ui version="4.0" >
92+<?xml version="1.0" encoding="UTF-8"?>
93+<ui version="4.0">
94  <class>QStarDict::MainWindow</class>
95- <widget class="QMainWindow" name="QStarDict::MainWindow" >
96- <property name="geometry" >
97+ <widget class="QMainWindow" name="QStarDict::MainWindow">
98+ <property name="geometry">
99    <rect>
100     <x>0</x>
101     <y>0</y>
102- <width>742</width>
103- <height>511</height>
104+ <width>326</width>
105+ <height>240</height>
106    </rect>
107   </property>
108- <property name="windowTitle" >
109+ <property name="cursor">
110+ <cursorShape>BlankCursor</cursorShape>
111+ </property>
112+ <property name="windowTitle">
113    <string>QStarDict</string>
114   </property>
115- <property name="windowIcon" >
116- <iconset resource="pixmaps/pixmaps.qrc" >
117+ <property name="windowIcon">
118+ <iconset resource="pixmaps/pixmaps.qrc">
119     <normaloff>:/icons/qstardict.png</normaloff>:/icons/qstardict.png</iconset>
120   </property>
121- <widget class="QWidget" name="centralwidget" >
122- <layout class="QGridLayout" >
123- <property name="margin" >
124- <number>9</number>
125+ <widget class="QWidget" name="centralwidget">
126+ <property name="minimumSize">
127+ <size>
128+ <width>214</width>
129+ <height>130</height>
130+ </size>
131+ </property>
132+ <property name="maximumSize">
133+ <size>
134+ <width>320</width>
135+ <height>240</height>
136+ </size>
137+ </property>
138+ <layout class="QVBoxLayout" name="verticalLayout_2">
139+ <property name="spacing">
140+ <number>0</number>
141     </property>
142- <property name="spacing" >
143- <number>6</number>
144+ <property name="margin">
145+ <number>0</number>
146     </property>
147- <item row="0" column="0" >
148- <layout class="QHBoxLayout" >
149- <property name="spacing" >
150- <number>6</number>
151+ <item>
152+ <layout class="QHBoxLayout">
153+ <property name="spacing">
154+ <number>0</number>
155       </property>
156- <property name="margin" >
157+ <property name="margin">
158        <number>0</number>
159       </property>
160       <item>
161- <widget class="QToolButton" name="searchClearButton" >
162- <property name="toolTip" >
163+ <widget class="QToolButton" name="searchClearButton">
164+ <property name="toolTip">
165          <string>Clear the search box</string>
166         </property>
167- <property name="text" >
168+ <property name="text">
169          <string>Clear</string>
170         </property>
171- <property name="icon" >
172- <iconset resource="pixmaps/pixmaps.qrc" >
173+ <property name="icon">
174+ <iconset resource="pixmaps/pixmaps.qrc">
175           <normaloff>:/icons/clear-right.png</normaloff>:/icons/clear-right.png</iconset>
176         </property>
177- <property name="toolButtonStyle" >
178+ <property name="toolButtonStyle">
179          <enum>Qt::ToolButtonIconOnly</enum>
180         </property>
181        </widget>
182       </item>
183       <item>
184- <widget class="QLineEdit" name="searchBox" />
185+ <widget class="QLineEdit" name="searchBox"/>
186       </item>
187       <item>
188- <widget class="QToolButton" name="queryButton" >
189- <property name="toolTip" >
190+ <widget class="QToolButton" name="queryButton">
191+ <property name="toolTip">
192          <string>Fuzzy query</string>
193         </property>
194- <property name="text" >
195+ <property name="text">
196          <string>Search</string>
197         </property>
198- <property name="icon" >
199- <iconset resource="pixmaps/pixmaps.qrc" >
200+ <property name="icon">
201+ <iconset resource="pixmaps/pixmaps.qrc">
202           <normaloff>:/icons/search-filter.png</normaloff>:/icons/search-filter.png</iconset>
203         </property>
204- <property name="toolButtonStyle" >
205+ <property name="toolButtonStyle">
206          <enum>Qt::ToolButtonTextBesideIcon</enum>
207         </property>
208        </widget>
209       </item>
210      </layout>
211     </item>
212- <item row="1" column="0" >
213- <widget class="DictWidget" native="1" name="translationView" />
214+ <item>
215+ <widget class="DictWidget" name="translationView" native="true"/>
216     </item>
217    </layout>
218   </widget>
219- <widget class="QDockWidget" name="wordsListDock" >
220- <property name="features" >
221- <set>QDockWidget::AllDockWidgetFeatures</set>
222+ <widget class="QDockWidget" name="wordsListDock">
223+ <property name="minimumSize">
224+ <size>
225+ <width>100</width>
226+ <height>155</height>
227+ </size>
228+ </property>
229+ <property name="maximumSize">
230+ <size>
231+ <width>100</width>
232+ <height>240</height>
233+ </size>
234    </property>
235- <property name="allowedAreas" >
236+ <property name="features">
237+ <set>QDockWidget::DockWidgetClosable|QDockWidget::DockWidgetMovable</set>
238+ </property>
239+ <property name="allowedAreas">
240     <set>Qt::NoDockWidgetArea</set>
241    </property>
242- <property name="windowTitle" >
243+ <property name="windowTitle">
244     <string>Words list</string>
245    </property>
246- <attribute name="dockWidgetArea" >
247+ <attribute name="dockWidgetArea">
248     <number>1</number>
249    </attribute>
250- <widget class="QWidget" name="dockWidgetContents" >
251- <layout class="QGridLayout" >
252- <property name="margin" >
253- <number>9</number>
254+ <widget class="QWidget" name="dockWidgetContents">
255+ <property name="minimumSize">
256+ <size>
257+ <width>100</width>
258+ <height>130</height>
259+ </size>
260+ </property>
261+ <property name="maximumSize">
262+ <size>
263+ <width>100</width>
264+ <height>240</height>
265+ </size>
266+ </property>
267+ <widget class="QListWidget" name="wordsList">
268+ <property name="geometry">
269+ <rect>
270+ <x>0</x>
271+ <y>5</y>
272+ <width>100</width>
273+ <height>190</height>
274+ </rect>
275+ </property>
276+ <property name="minimumSize">
277+ <size>
278+ <width>100</width>
279+ <height>130</height>
280+ </size>
281      </property>
282- <property name="spacing" >
283- <number>6</number>
284+ <property name="maximumSize">
285+ <size>
286+ <width>100</width>
287+ <height>240</height>
288+ </size>
289      </property>
290- <item row="0" column="0" >
291- <widget class="QListWidget" name="wordsList" />
292- </item>
293- </layout>
294+ </widget>
295    </widget>
296   </widget>
297- <widget class="QMenuBar" name="menubar" >
298- <property name="geometry" >
299+ <widget class="QMenuBar" name="menubar">
300+ <property name="geometry">
301     <rect>
302      <x>0</x>
303      <y>0</y>
304- <width>742</width>
305- <height>22</height>
306+ <width>326</width>
307+ <height>27</height>
308     </rect>
309    </property>
310- <widget class="QMenu" name="menu_File" >
311- <property name="title" >
312+ <widget class="QMenu" name="menu_File">
313+ <property name="title">
314      <string>&amp;File</string>
315     </property>
316- <addaction name="actionQuit" />
317+ <addaction name="actionQuit"/>
318    </widget>
319- <widget class="QMenu" name="menuHelp" >
320- <property name="title" >
321+ <widget class="QMenu" name="menuHelp">
322+ <property name="title">
323      <string>&amp;Help</string>
324     </property>
325- <addaction name="actionHelp" />
326- <addaction name="actionAbout" />
327- <addaction name="actionAboutQt" />
328+ <addaction name="actionHelp"/>
329+ <addaction name="actionAbout"/>
330+ <addaction name="actionAboutQt"/>
331    </widget>
332- <widget class="QMenu" name="menu_Options" >
333- <property name="title" >
334+ <widget class="QMenu" name="menu_Options">
335+ <property name="title">
336      <string>&amp;Settings</string>
337     </property>
338- <addaction name="actionScan" />
339- <addaction name="actionSettings" />
340+ <addaction name="actionScan"/>
341+ <addaction name="actionSettings"/>
342    </widget>
343- <addaction name="menu_File" />
344- <addaction name="menu_Options" />
345- <addaction name="menuHelp" />
346+ <addaction name="menu_File"/>
347+ <addaction name="menu_Options"/>
348+ <addaction name="menuHelp"/>
349   </widget>
350- <action name="actionQuit" >
351- <property name="icon" >
352- <iconset resource="pixmaps/pixmaps.qrc" >
353+ <action name="actionQuit">
354+ <property name="icon">
355+ <iconset resource="pixmaps/pixmaps.qrc">
356      <normaloff>:/icons/application-exit.png</normaloff>:/icons/application-exit.png</iconset>
357    </property>
358- <property name="text" >
359+ <property name="text">
360     <string>&amp;Quit</string>
361    </property>
362- <property name="shortcut" >
363+ <property name="shortcut">
364     <string>Ctrl+Q</string>
365    </property>
366   </action>
367- <action name="actionAbout" >
368- <property name="text" >
369+ <action name="actionAbout">
370+ <property name="text">
371     <string>&amp;About</string>
372    </property>
373   </action>
374- <action name="actionAboutQt" >
375- <property name="text" >
376+ <action name="actionAboutQt">
377+ <property name="text">
378     <string>About &amp;Qt</string>
379    </property>
380   </action>
381- <action name="actionSettings" >
382- <property name="icon" >
383- <iconset resource="pixmaps/pixmaps.qrc" >
384+ <action name="actionSettings">
385+ <property name="icon">
386+ <iconset resource="pixmaps/pixmaps.qrc">
387      <normaloff>:/icons/configure.png</normaloff>:/icons/configure.png</iconset>
388    </property>
389- <property name="text" >
390+ <property name="text">
391     <string>&amp;Configure QStarDict</string>
392    </property>
393   </action>
394- <action name="actionScan" >
395- <property name="checkable" >
396+ <action name="actionScan">
397+ <property name="checkable">
398     <bool>true</bool>
399    </property>
400- <property name="text" >
401+ <property name="text">
402     <string>&amp;Scan</string>
403    </property>
404   </action>
405- <action name="actionHelp" >
406- <property name="icon" >
407- <iconset resource="pixmaps/pixmaps.qrc" >
408+ <action name="actionHelp">
409+ <property name="icon">
410+ <iconset resource="pixmaps/pixmaps.qrc">
411      <normaloff>:/icons/help-contents.png</normaloff>:/icons/help-contents.png</iconset>
412    </property>
413- <property name="text" >
414+ <property name="text">
415     <string>QStarDict &amp;Help</string>
416    </property>
417- <property name="shortcut" >
418+ <property name="shortcut">
419     <string>F1</string>
420    </property>
421   </action>
422@@ -203,7 +254,7 @@
423   <tabstop>searchClearButton</tabstop>
424  </tabstops>
425  <resources>
426- <include location="pixmaps/pixmaps.qrc" />
427+ <include location="pixmaps/pixmaps.qrc"/>
428  </resources>
429  <connections>
430   <connection>
431@@ -212,11 +263,11 @@
432    <receiver>searchBox</receiver>
433    <slot>clear()</slot>
434    <hints>
435- <hint type="sourcelabel" >
436+ <hint type="sourcelabel">
437      <x>315</x>
438      <y>59</y>
439     </hint>
440- <hint type="destinationlabel" >
441+ <hint type="destinationlabel">
442      <x>647</x>
443      <y>61</y>
444     </hint>
445@@ -228,11 +279,11 @@
446    <receiver>searchBox</receiver>
447    <slot>setFocus()</slot>
448    <hints>
449- <hint type="sourcelabel" >
450+ <hint type="sourcelabel">
451      <x>315</x>
452      <y>59</y>
453     </hint>
454- <hint type="destinationlabel" >
455+ <hint type="destinationlabel">
456      <x>647</x>
457      <y>61</y>
458     </hint>
459@@ -244,11 +295,11 @@
460    <receiver>queryButton</receiver>
461    <slot>click()</slot>
462    <hints>
463- <hint type="sourcelabel" >
464+ <hint type="sourcelabel">
465      <x>438</x>
466      <y>50</y>
467     </hint>
468- <hint type="destinationlabel" >
469+ <hint type="destinationlabel">
470      <x>661</x>
471      <y>51</y>
472     </hint>
473diff --git a/qstardict/settingsdialog.ui b/qstardict/settingsdialog.ui
474index 357f15b..d08fbd5 100644
475--- a/qstardict/settingsdialog.ui
476+++ b/qstardict/settingsdialog.ui
477@@ -1,84 +1,67 @@
478-<ui version="4.0" >
479+<?xml version="1.0" encoding="UTF-8"?>
480+<ui version="4.0">
481  <class>QStarDict::SettingsDialog</class>
482- <widget class="QDialog" name="QStarDict::SettingsDialog" >
483- <property name="geometry" >
484+ <widget class="QDialog" name="QStarDict::SettingsDialog">
485+ <property name="geometry">
486    <rect>
487     <x>0</x>
488     <y>0</y>
489- <width>463</width>
490- <height>498</height>
491+ <width>320</width>
492+ <height>240</height>
493    </rect>
494   </property>
495- <property name="windowTitle" >
496+ <property name="sizePolicy">
497+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
498+ <horstretch>0</horstretch>
499+ <verstretch>0</verstretch>
500+ </sizepolicy>
501+ </property>
502+ <property name="cursor">
503+ <cursorShape>BlankCursor</cursorShape>
504+ </property>
505+ <property name="windowTitle">
506    <string>QStarDict Settings</string>
507   </property>
508- <property name="toolTip" >
509+ <property name="toolTip">
510    <string/>
511   </property>
512- <layout class="QGridLayout" >
513- <property name="margin" >
514- <number>9</number>
515- </property>
516- <property name="spacing" >
517- <number>6</number>
518- </property>
519- <item row="1" column="0" >
520- <widget class="QDialogButtonBox" name="buttonBox" >
521- <property name="orientation" >
522- <enum>Qt::Horizontal</enum>
523- </property>
524- <property name="standardButtons" >
525- <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
526- </property>
527- <property name="centerButtons" >
528- <bool>false</bool>
529- </property>
530- </widget>
531- </item>
532- <item row="0" column="0" >
533- <widget class="QTabWidget" name="tabWidget" >
534- <property name="currentIndex" >
535+ <layout class="QGridLayout" name="gridLayout">
536+ <item row="0" column="0">
537+ <widget class="QTabWidget" name="tabWidget">
538+ <property name="currentIndex">
539       <number>0</number>
540      </property>
541- <widget class="QWidget" name="tabGlobalSettings" >
542- <property name="geometry" >
543- <rect>
544- <x>0</x>
545- <y>0</y>
546- <width>441</width>
547- <height>414</height>
548- </rect>
549- </property>
550- <attribute name="title" >
551+ <widget class="QWidget" name="tabGlobalSettings">
552+ <attribute name="title">
553        <string>Global settings</string>
554       </attribute>
555- <layout class="QVBoxLayout" >
556+ <layout class="QVBoxLayout">
557        <item>
558- <widget class="QCheckBox" name="instantSearchBox" >
559- <property name="text" >
560+ <widget class="QCheckBox" name="instantSearchBox">
561+ <property name="text">
562           <string>Instant search</string>
563          </property>
564         </widget>
565        </item>
566        <item>
567- <layout class="QHBoxLayout" >
568- <property name="spacing" >
569+ <layout class="QVBoxLayout" name="verticalLayout_2">
570+ <property name="spacing">
571           <number>6</number>
572          </property>
573- <property name="margin" >
574+ <property name="margin">
575           <number>0</number>
576          </property>
577          <item>
578- <widget class="QLabel" name="label_7" >
579- <property name="text" >
580+ <widget class="QLabel" name="label_7">
581+ <property name="text">
582             <string>Pronounce words using this command:</string>
583            </property>
584           </widget>
585          </item>
586          <item>
587- <widget class="QLineEdit" name="speechCmdEdit" >
588- <property name="toolTip" >
589- <string>Enter cmd for the speaching program.&lt;br>If cmd contains "%s" it will be replaced to word, else word will be writen to stdin of speech process.</string>
590+ <widget class="QLineEdit" name="speechCmdEdit">
591+ <property name="toolTip">
592+ <string>Enter cmd for the speaching program.&lt;br&gt;If cmd contains &quot;%s&quot; it will be replaced to word, else word will be writen to stdin of speech process.</string>
593            </property>
594           </widget>
595          </item>
596@@ -86,104 +69,96 @@
597        </item>
598        <item>
599         <spacer>
600- <property name="orientation" >
601+ <property name="orientation">
602           <enum>Qt::Vertical</enum>
603          </property>
604- <property name="sizeHint" stdset="0" >
605+ <property name="sizeHint" stdset="0">
606           <size>
607- <width>369</width>
608- <height>171</height>
609+ <width>320</width>
610+ <height>240</height>
611           </size>
612          </property>
613         </spacer>
614        </item>
615       </layout>
616      </widget>
617- <widget class="QWidget" name="tabDictionaries" >
618- <property name="geometry" >
619- <rect>
620- <x>0</x>
621- <y>0</y>
622- <width>441</width>
623- <height>414</height>
624- </rect>
625- </property>
626- <attribute name="title" >
627+ <widget class="QWidget" name="tabDictionaries">
628+ <attribute name="title">
629        <string>Dictionaries</string>
630       </attribute>
631- <layout class="QVBoxLayout" >
632+ <layout class="QVBoxLayout">
633        <item>
634- <widget class="QGroupBox" name="groupBox_3" >
635- <property name="title" >
636+ <widget class="QGroupBox" name="groupBox_3">
637+ <property name="title">
638           <string>Dictionaries</string>
639          </property>
640- <layout class="QVBoxLayout" >
641+ <layout class="QVBoxLayout">
642           <item>
643- <widget class="QTableView" name="dictsTableView" >
644- <property name="editTriggers" >
645+ <widget class="QTableView" name="dictsTableView">
646+ <property name="editTriggers">
647              <set>QAbstractItemView::NoEditTriggers</set>
648             </property>
649- <property name="selectionMode" >
650+ <property name="selectionMode">
651              <enum>QAbstractItemView::SingleSelection</enum>
652             </property>
653- <property name="selectionBehavior" >
654+ <property name="selectionBehavior">
655              <enum>QAbstractItemView::SelectRows</enum>
656             </property>
657- <property name="showGrid" >
658+ <property name="showGrid">
659              <bool>false</bool>
660             </property>
661            </widget>
662           </item>
663           <item>
664- <layout class="QHBoxLayout" >
665+ <layout class="QHBoxLayout">
666             <item>
667- <widget class="QToolButton" name="dictsMoveUpButton" >
668- <property name="toolTip" >
669+ <widget class="QToolButton" name="dictsMoveUpButton">
670+ <property name="toolTip">
671                <string>Move up</string>
672               </property>
673- <property name="text" >
674+ <property name="text">
675                <string>Up</string>
676               </property>
677- <property name="icon" >
678- <iconset resource="pixmaps/pixmaps.qrc" >
679+ <property name="icon">
680+ <iconset resource="../plugins/stardict/pixmaps/pixmaps.qrc">
681                 <normaloff>:/icons/arrow-up.png</normaloff>:/icons/arrow-up.png</iconset>
682               </property>
683              </widget>
684             </item>
685             <item>
686- <widget class="QToolButton" name="dictsMoveDownButton" >
687- <property name="toolTip" >
688+ <widget class="QToolButton" name="dictsMoveDownButton">
689+ <property name="toolTip">
690                <string>Move down</string>
691               </property>
692- <property name="text" >
693+ <property name="text">
694                <string>Down</string>
695               </property>
696- <property name="icon" >
697- <iconset resource="pixmaps/pixmaps.qrc" >
698+ <property name="icon">
699+ <iconset resource="../plugins/stardict/pixmaps/pixmaps.qrc">
700                 <normaloff>:/icons/arrow-down.png</normaloff>:/icons/arrow-down.png</iconset>
701               </property>
702              </widget>
703             </item>
704             <item>
705- <widget class="QToolButton" name="dictsShowInfoButton" >
706- <property name="toolTip" >
707+ <widget class="QToolButton" name="dictsShowInfoButton">
708+ <property name="toolTip">
709                <string>Show information about dictionary</string>
710               </property>
711- <property name="text" >
712+ <property name="text">
713                <string>Show info</string>
714               </property>
715- <property name="icon" >
716- <iconset resource="pixmaps/pixmaps.qrc" >
717+ <property name="icon">
718+ <iconset resource="pixmaps/pixmaps.qrc">
719                 <normaloff>:/icons/dialog-information.png</normaloff>:/icons/dialog-information.png</iconset>
720               </property>
721              </widget>
722             </item>
723             <item>
724              <spacer>
725- <property name="orientation" >
726+ <property name="orientation">
727                <enum>Qt::Horizontal</enum>
728               </property>
729- <property name="sizeHint" stdset="0" >
730+ <property name="sizeHint" stdset="0">
731                <size>
732                 <width>40</width>
733                 <height>20</height>
734@@ -196,73 +171,80 @@
735          </layout>
736         </widget>
737        </item>
738+ </layout>
739+ </widget>
740+ <widget class="QWidget" name="tabPlugins">
741+ <attribute name="title">
742+ <string>Plugins</string>
743+ </attribute>
744+ <layout class="QVBoxLayout" name="verticalLayout">
745        <item>
746- <widget class="QGroupBox" name="groupBox_4" >
747- <property name="maximumSize" >
748+ <widget class="QGroupBox" name="groupBox_5">
749+ <property name="maximumSize">
750           <size>
751            <width>16777215</width>
752- <height>196</height>
753+ <height>16777215</height>
754           </size>
755          </property>
756- <property name="title" >
757+ <property name="title">
758           <string>Plugins</string>
759          </property>
760- <property name="alignment" >
761+ <property name="alignment">
762           <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
763          </property>
764- <layout class="QVBoxLayout" >
765+ <layout class="QVBoxLayout" name="_2">
766           <item>
767- <widget class="QTableView" name="pluginsTableView" >
768- <property name="editTriggers" >
769+ <widget class="QTableView" name="pluginsTableView">
770+ <property name="editTriggers">
771              <set>QAbstractItemView::NoEditTriggers</set>
772             </property>
773- <property name="selectionMode" >
774+ <property name="selectionMode">
775              <enum>QAbstractItemView::SingleSelection</enum>
776             </property>
777- <property name="selectionBehavior" >
778+ <property name="selectionBehavior">
779              <enum>QAbstractItemView::SelectRows</enum>
780             </property>
781- <property name="showGrid" >
782+ <property name="showGrid">
783              <bool>false</bool>
784             </property>
785            </widget>
786           </item>
787           <item>
788- <layout class="QHBoxLayout" >
789+ <layout class="QHBoxLayout" name="_3">
790             <item>
791- <widget class="QToolButton" name="pluginsShowInfoButton" >
792- <property name="toolTip" >
793+ <widget class="QToolButton" name="pluginsShowInfoButton">
794+ <property name="toolTip">
795                <string>Show information about plugin</string>
796               </property>
797- <property name="text" >
798+ <property name="text">
799                <string>Info</string>
800               </property>
801- <property name="icon" >
802- <iconset resource="pixmaps/pixmaps.qrc" >
803+ <property name="icon">
804+ <iconset resource="pixmaps/pixmaps.qrc">
805                 <normaloff>:/icons/dialog-information.png</normaloff>:/icons/dialog-information.png</iconset>
806               </property>
807              </widget>
808             </item>
809             <item>
810- <widget class="QToolButton" name="pluginsConfigureButton" >
811- <property name="toolTip" >
812+ <widget class="QToolButton" name="pluginsConfigureButton">
813+ <property name="toolTip">
814                <string>Configure plugin</string>
815               </property>
816- <property name="text" >
817+ <property name="text">
818                <string>Configure</string>
819               </property>
820- <property name="icon" >
821- <iconset resource="pixmaps/pixmaps.qrc" >
822+ <property name="icon">
823+ <iconset resource="pixmaps/pixmaps.qrc">
824                 <normaloff>:/icons/configure.png</normaloff>:/icons/configure.png</iconset>
825               </property>
826              </widget>
827             </item>
828             <item>
829              <spacer>
830- <property name="orientation" >
831+ <property name="orientation">
832                <enum>Qt::Horizontal</enum>
833               </property>
834- <property name="sizeHint" stdset="0" >
835+ <property name="sizeHint" stdset="0">
836                <size>
837                 <width>40</width>
838                 <height>20</height>
839@@ -277,136 +259,128 @@
840        </item>
841       </layout>
842      </widget>
843- <widget class="QWidget" name="tabPopupWindow" >
844- <property name="geometry" >
845- <rect>
846- <x>0</x>
847- <y>0</y>
848- <width>640</width>
849- <height>409</height>
850- </rect>
851- </property>
852- <attribute name="title" >
853- <string>Popup window</string>
854+ <widget class="QWidget" name="tabPopupWindow">
855+ <attribute name="title">
856+ <string>Behaviour</string>
857       </attribute>
858- <layout class="QGridLayout" >
859- <property name="margin" >
860+ <layout class="QGridLayout">
861+ <property name="margin">
862         <number>9</number>
863        </property>
864- <property name="spacing" >
865+ <property name="spacing">
866         <number>6</number>
867        </property>
868- <item row="0" column="0" >
869- <widget class="QGroupBox" name="groupBox" >
870- <property name="title" >
871+ <item row="0" column="0">
872+ <widget class="QGroupBox" name="groupBox">
873+ <property name="title">
874           <string>Behavior</string>
875          </property>
876- <layout class="QGridLayout" >
877- <property name="margin" >
878+ <layout class="QGridLayout">
879+ <property name="margin">
880            <number>9</number>
881           </property>
882- <property name="spacing" >
883+ <property name="spacing">
884            <number>6</number>
885           </property>
886- <item row="4" column="0" >
887- <layout class="QVBoxLayout" >
888- <property name="spacing" >
889+ <item row="4" column="0">
890+ <layout class="QVBoxLayout">
891+ <property name="spacing">
892              <number>6</number>
893             </property>
894- <property name="margin" >
895+ <property name="margin">
896              <number>0</number>
897             </property>
898             <item>
899- <widget class="QCheckBox" name="pronounceWordBox" >
900- <property name="text" >
901+ <widget class="QCheckBox" name="pronounceWordBox">
902+ <property name="text">
903                <string>Pronounce the word</string>
904               </property>
905              </widget>
906             </item>
907            </layout>
908           </item>
909- <item row="3" column="0" >
910- <layout class="QHBoxLayout" >
911- <property name="spacing" >
912+ <item row="3" column="0">
913+ <layout class="QHBoxLayout">
914+ <property name="spacing">
915              <number>6</number>
916             </property>
917- <property name="margin" >
918+ <property name="margin">
919              <number>0</number>
920             </property>
921             <item>
922- <widget class="QLabel" name="label_4" >
923- <property name="text" >
924+ <widget class="QLabel" name="label_4">
925+ <property name="text">
926                <string>Timeout before hide after mouse over</string>
927               </property>
928              </widget>
929             </item>
930             <item>
931- <widget class="QDoubleSpinBox" name="timeoutBeforeHideSpin" >
932- <property name="specialValueText" >
933+ <widget class="QDoubleSpinBox" name="timeoutBeforeHideSpin">
934+ <property name="specialValueText">
935                <string>Don't hide</string>
936               </property>
937- <property name="suffix" >
938+ <property name="suffix">
939                <string> sec</string>
940               </property>
941- <property name="decimals" >
942+ <property name="decimals">
943                <number>1</number>
944               </property>
945- <property name="minimum" >
946+ <property name="minimum">
947                <double>0.000000000000000</double>
948               </property>
949- <property name="maximum" >
950+ <property name="maximum">
951                <double>10.000000000000000</double>
952               </property>
953- <property name="singleStep" >
954+ <property name="singleStep">
955                <double>0.100000000000000</double>
956               </property>
957- <property name="value" >
958+ <property name="value">
959                <double>0.500000000000000</double>
960               </property>
961              </widget>
962             </item>
963            </layout>
964           </item>
965- <item row="2" column="0" >
966- <layout class="QHBoxLayout" >
967- <property name="spacing" >
968+ <item row="2" column="0">
969+ <layout class="QHBoxLayout">
970+ <property name="spacing">
971              <number>6</number>
972             </property>
973- <property name="margin" >
974+ <property name="margin">
975              <number>0</number>
976             </property>
977             <item>
978- <widget class="QCheckBox" name="useScanModifierBox" >
979- <property name="enabled" >
980+ <widget class="QCheckBox" name="useScanModifierBox">
981+ <property name="enabled">
982                <bool>true</bool>
983               </property>
984- <property name="text" >
985+ <property name="text">
986                <string>Show only if modifier pressed</string>
987               </property>
988              </widget>
989             </item>
990             <item>
991- <widget class="QComboBox" name="modifierKeyBox" >
992- <property name="enabled" >
993+ <widget class="QComboBox" name="modifierKeyBox">
994+ <property name="enabled">
995                <bool>false</bool>
996               </property>
997               <item>
998- <property name="text" >
999+ <property name="text">
1000                 <string>Alt</string>
1001                </property>
1002               </item>
1003               <item>
1004- <property name="text" >
1005+ <property name="text">
1006                 <string>Control</string>
1007                </property>
1008               </item>
1009               <item>
1010- <property name="text" >
1011+ <property name="text">
1012                 <string>Shift</string>
1013                </property>
1014               </item>
1015               <item>
1016- <property name="text" >
1017+ <property name="text">
1018                 <string>Win</string>
1019                </property>
1020               </item>
1021@@ -414,19 +388,19 @@
1022             </item>
1023            </layout>
1024           </item>
1025- <item row="0" column="0" >
1026- <widget class="QCheckBox" name="useScanBox" >
1027- <property name="text" >
1028+ <item row="0" column="0">
1029+ <widget class="QCheckBox" name="useScanBox">
1030+ <property name="text">
1031              <string>Scan selection</string>
1032             </property>
1033- <property name="checked" >
1034+ <property name="checked">
1035              <bool>true</bool>
1036             </property>
1037            </widget>
1038           </item>
1039- <item row="1" column="0" >
1040- <widget class="QCheckBox" name="showIfNotFoundBox" >
1041- <property name="text" >
1042+ <item row="1" column="0">
1043+ <widget class="QCheckBox" name="showIfNotFoundBox">
1044+ <property name="text">
1045              <string>Show if word not found</string>
1046             </property>
1047            </widget>
1048@@ -434,108 +408,128 @@
1049          </layout>
1050         </widget>
1051        </item>
1052- <item row="1" column="0" >
1053- <widget class="QGroupBox" name="groupBox_2" >
1054- <property name="title" >
1055- <string>Apperance</string>
1056+ <item row="1" column="0">
1057+ <spacer>
1058+ <property name="orientation">
1059+ <enum>Qt::Vertical</enum>
1060+ </property>
1061+ <property name="sizeHint" stdset="0">
1062+ <size>
1063+ <width>20</width>
1064+ <height>101</height>
1065+ </size>
1066          </property>
1067- <layout class="QGridLayout" >
1068- <property name="margin" >
1069+ </spacer>
1070+ </item>
1071+ </layout>
1072+ </widget>
1073+ <widget class="QWidget" name="tabAppearance">
1074+ <attribute name="title">
1075+ <string>View</string>
1076+ </attribute>
1077+ <layout class="QVBoxLayout" name="verticalLayout_3">
1078+ <item>
1079+ <widget class="QGroupBox" name="groupBox_4">
1080+ <property name="title">
1081+ <string>View</string>
1082+ </property>
1083+ <layout class="QGridLayout" name="_4">
1084+ <property name="margin">
1085            <number>9</number>
1086           </property>
1087- <property name="spacing" >
1088+ <property name="spacing">
1089            <number>6</number>
1090           </property>
1091- <item row="2" column="0" >
1092- <layout class="QHBoxLayout" >
1093- <property name="spacing" >
1094+ <item row="2" column="0">
1095+ <layout class="QHBoxLayout" name="_5">
1096+ <property name="spacing">
1097              <number>6</number>
1098             </property>
1099- <property name="margin" >
1100+ <property name="margin">
1101              <number>0</number>
1102             </property>
1103             <item>
1104- <widget class="QLabel" name="label_3" >
1105- <property name="text" >
1106+ <widget class="QLabel" name="label_8">
1107+ <property name="text">
1108                <string>Opacity</string>
1109               </property>
1110              </widget>
1111             </item>
1112             <item>
1113- <widget class="QSpinBox" name="popupOpacitySpin" >
1114- <property name="suffix" >
1115+ <widget class="QSpinBox" name="popupOpacitySpin">
1116+ <property name="suffix">
1117                <string>%</string>
1118               </property>
1119- <property name="prefix" >
1120+ <property name="prefix">
1121                <string/>
1122               </property>
1123- <property name="minimum" >
1124+ <property name="minimum">
1125                <number>1</number>
1126               </property>
1127- <property name="maximum" >
1128+ <property name="maximum">
1129                <number>100</number>
1130               </property>
1131- <property name="value" >
1132+ <property name="value">
1133                <number>100</number>
1134               </property>
1135              </widget>
1136             </item>
1137            </layout>
1138           </item>
1139- <item row="0" column="0" >
1140- <layout class="QHBoxLayout" >
1141- <property name="spacing" >
1142+ <item row="0" column="0">
1143+ <layout class="QHBoxLayout" name="_6">
1144+ <property name="spacing">
1145              <number>6</number>
1146             </property>
1147- <property name="margin" >
1148+ <property name="margin">
1149              <number>0</number>
1150             </property>
1151             <item>
1152- <widget class="QLabel" name="label_5" >
1153- <property name="text" >
1154+ <widget class="QLabel" name="label_9">
1155+ <property name="text">
1156                <string>Default width</string>
1157               </property>
1158              </widget>
1159             </item>
1160             <item>
1161- <widget class="QSpinBox" name="popupDefaultWidthSpin" >
1162- <property name="minimum" >
1163+ <widget class="QSpinBox" name="popupDefaultWidthSpin">
1164+ <property name="minimum">
1165                <number>96</number>
1166               </property>
1167- <property name="maximum" >
1168+ <property name="maximum">
1169                <number>9999</number>
1170               </property>
1171- <property name="value" >
1172+ <property name="value">
1173                <number>320</number>
1174               </property>
1175              </widget>
1176             </item>
1177            </layout>
1178           </item>
1179- <item row="1" column="0" >
1180- <layout class="QHBoxLayout" >
1181- <property name="spacing" >
1182+ <item row="1" column="0">
1183+ <layout class="QHBoxLayout" name="_7">
1184+ <property name="spacing">
1185              <number>6</number>
1186             </property>
1187- <property name="margin" >
1188+ <property name="margin">
1189              <number>0</number>
1190             </property>
1191             <item>
1192- <widget class="QLabel" name="label_6" >
1193- <property name="text" >
1194+ <widget class="QLabel" name="label_10">
1195+ <property name="text">
1196                <string>Default height</string>
1197               </property>
1198              </widget>
1199             </item>
1200             <item>
1201- <widget class="QSpinBox" name="popupDefaultHeightSpin" >
1202- <property name="minimum" >
1203+ <widget class="QSpinBox" name="popupDefaultHeightSpin">
1204+ <property name="minimum">
1205                <number>96</number>
1206               </property>
1207- <property name="maximum" >
1208+ <property name="maximum">
1209                <number>9999</number>
1210               </property>
1211- <property name="value" >
1212+ <property name="value">
1213                <number>240</number>
1214               </property>
1215              </widget>
1216@@ -545,41 +539,40 @@
1217          </layout>
1218         </widget>
1219        </item>
1220- <item row="2" column="0" >
1221- <spacer>
1222- <property name="orientation" >
1223- <enum>Qt::Vertical</enum>
1224- </property>
1225- <property name="sizeHint" stdset="0" >
1226- <size>
1227- <width>20</width>
1228- <height>101</height>
1229- </size>
1230- </property>
1231- </spacer>
1232- </item>
1233       </layout>
1234      </widget>
1235- <widget class="QWidget" name="tab" >
1236- <property name="geometry" >
1237- <rect>
1238- <x>0</x>
1239- <y>0</y>
1240- <width>640</width>
1241- <height>409</height>
1242- </rect>
1243- </property>
1244- <attribute name="title" >
1245+ <widget class="QWidget" name="tab">
1246+ <attribute name="title">
1247        <string>Apperance</string>
1248       </attribute>
1249- <layout class="QGridLayout" >
1250- <item row="0" column="0" >
1251- <widget class="QStarDict::CSSEdit" native="1" name="apperanceCSSEdit" />
1252+ <layout class="QGridLayout">
1253+ <item row="0" column="0">
1254+ <widget class="QStarDict::CSSEdit" name="apperanceCSSEdit" native="true">
1255+ <property name="sizePolicy">
1256+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
1257+ <horstretch>0</horstretch>
1258+ <verstretch>0</verstretch>
1259+ </sizepolicy>
1260+ </property>
1261+ </widget>
1262        </item>
1263       </layout>
1264      </widget>
1265     </widget>
1266    </item>
1267+ <item row="1" column="0">
1268+ <widget class="QDialogButtonBox" name="buttonBox">
1269+ <property name="orientation">
1270+ <enum>Qt::Horizontal</enum>
1271+ </property>
1272+ <property name="standardButtons">
1273+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
1274+ </property>
1275+ <property name="centerButtons">
1276+ <bool>false</bool>
1277+ </property>
1278+ </widget>
1279+ </item>
1280   </layout>
1281  </widget>
1282  <customwidgets>
1283@@ -599,21 +592,16 @@
1284   <tabstop>dictsMoveUpButton</tabstop>
1285   <tabstop>dictsMoveDownButton</tabstop>
1286   <tabstop>dictsShowInfoButton</tabstop>
1287- <tabstop>pluginsTableView</tabstop>
1288- <tabstop>pluginsShowInfoButton</tabstop>
1289- <tabstop>pluginsConfigureButton</tabstop>
1290   <tabstop>useScanBox</tabstop>
1291   <tabstop>showIfNotFoundBox</tabstop>
1292   <tabstop>useScanModifierBox</tabstop>
1293   <tabstop>modifierKeyBox</tabstop>
1294   <tabstop>timeoutBeforeHideSpin</tabstop>
1295   <tabstop>pronounceWordBox</tabstop>
1296- <tabstop>popupDefaultWidthSpin</tabstop>
1297- <tabstop>popupDefaultHeightSpin</tabstop>
1298- <tabstop>popupOpacitySpin</tabstop>
1299  </tabstops>
1300  <resources>
1301- <include location="pixmaps/pixmaps.qrc" />
1302+ <include location="../plugins/stardict/pixmaps/pixmaps.qrc"/>
1303+ <include location="pixmaps/pixmaps.qrc"/>
1304  </resources>
1305  <connections>
1306   <connection>
1307@@ -622,11 +610,11 @@
1308    <receiver>QStarDict::SettingsDialog</receiver>
1309    <slot>accept()</slot>
1310    <hints>
1311- <hint type="sourcelabel" >
1312- <x>330</x>
1313- <y>587</y>
1314+ <hint type="sourcelabel">
1315+ <x>310</x>
1316+ <y>230</y>
1317     </hint>
1318- <hint type="destinationlabel" >
1319+ <hint type="destinationlabel">
1320      <x>410</x>
1321      <y>299</y>
1322     </hint>
1323@@ -638,11 +626,11 @@
1324    <receiver>QStarDict::SettingsDialog</receiver>
1325    <slot>reject()</slot>
1326    <hints>
1327- <hint type="sourcelabel" >
1328- <x>406</x>
1329- <y>587</y>
1330+ <hint type="sourcelabel">
1331+ <x>310</x>
1332+ <y>230</y>
1333     </hint>
1334- <hint type="destinationlabel" >
1335+ <hint type="destinationlabel">
1336      <x>410</x>
1337      <y>299</y>
1338     </hint>
1339@@ -654,13 +642,13 @@
1340    <receiver>modifierKeyBox</receiver>
1341    <slot>setEnabled(bool)</slot>
1342    <hints>
1343- <hint type="sourcelabel" >
1344- <x>165</x>
1345- <y>140</y>
1346+ <hint type="sourcelabel">
1347+ <x>194</x>
1348+ <y>85</y>
1349     </hint>
1350- <hint type="destinationlabel" >
1351- <x>273</x>
1352- <y>137</y>
1353+ <hint type="destinationlabel">
1354+ <x>289</x>
1355+ <y>85</y>
1356     </hint>
1357    </hints>
1358   </connection>
1359diff --git a/qstardict/speaker.cpp b/qstardict/speaker.cpp
1360index ef31f03..723d4c8 100644
1361--- a/qstardict/speaker.cpp
1362+++ b/qstardict/speaker.cpp
1363@@ -29,7 +29,7 @@ Speaker::Speaker()
1364 {
1365     m_speechProcess = new QProcess;
1366     QSettings settings;
1367- m_speechCmd = settings.value("Speaker/speechCmd", "festival --tts").toString();
1368+ m_speechCmd = settings.value("Speaker/speechCmd", "flite").toString();
1369 }
1370 
1371 Speaker::~Speaker()
1372

Archive Download this file



interactive