diff --git a/plugins/stardict/dictziplib.cpp b/plugins/stardict/dictziplib.cpp index 867e330..bb62a54 100644 --- a/plugins/stardict/dictziplib.cpp +++ b/plugins/stardict/dictziplib.cpp @@ -305,7 +305,7 @@ bool dictData::open(const std::string& fname, int computeCRC) #ifdef Q_OS_UNIX if (stat(fname.c_str(), &sb) || !S_ISREG(sb.st_mode)) -#elif def Q_OS_WIN32 +#elif defined Q_OS_WIN32 if (_stat(fname.c_str(), &sb) || !(sb.stMode & _S_IFREG)) #endif { diff --git a/qstardict/keyboard.cpp b/qstardict/keyboard.cpp index cc6e406..5a6d514 100644 --- a/qstardict/keyboard.cpp +++ b/qstardict/keyboard.cpp @@ -82,7 +82,28 @@ Qt::KeyboardModifiers Keyboard::activeModifiers() } // namespace -#endif // Q_WS_WIN +#elif defined(Q_WS_QWS) // Q_WS_WIN + +namespace +{ +const unsigned mAlt = 0010; +const unsigned mCtrl = 0004; +const unsigned mShift = 0001; +const unsigned mWin = 0100; +} + +namespace QStarDict +{ + +Qt::KeyboardModifiers Keyboard::activeModifiers() +{ + Qt::KeyboardModifiers result; + return result; +} + +} // namespace + +#endif // Q_WS_QWS // vim: tabstop=4 softtabstop=4 shiftwidth=4 expandtab cindent textwidth=120 formatoptions=tc diff --git a/qstardict/main.cpp b/qstardict/main.cpp index 8a13dc9..a726364 100644 --- a/qstardict/main.cpp +++ b/qstardict/main.cpp @@ -35,6 +35,10 @@ #include #endif // QSTARDICT_WITH_TRANSLATIONS +#ifdef Q_WS_QWS +#include +#endif + int main(int argc, char *argv[]) { QStarDict::Application app(argc, argv); @@ -61,6 +65,9 @@ int main(int argc, char *argv[]) } #endif // Q_OS_WIN +#ifdef Q_WS_QWS + QWSServer::setCursorVisible(false); +#endif return app.exec(); } diff --git a/qstardict/mainwindow.cpp b/qstardict/mainwindow.cpp index e8b9456..29ac486 100644 --- a/qstardict/mainwindow.cpp +++ b/qstardict/mainwindow.cpp @@ -93,7 +93,7 @@ void MainWindow::loadSettings() setVisible(config.value("MainWindow/visible", true).toBool()); wordsListDock->setFloating(config.value("MainWindow/wordsListDock/floating", wordsListDock->isFloating()).toBool()); wordsListDock->setGeometry(config.value("MainWindow/wordsListDock/geometry", wordsListDock->geometry()).toRect()); - setInstantSearch(config.value("MainWindow/instantSearch", true).toBool()); + setInstantSearch(config.value("MainWindow/instantSearch", false).toBool()); setDefaultStyleSheet(config.value("MainWindow/defaultStyleSheet", defaultStyleSheet()).toString()); } diff --git a/qstardict/mainwindow.ui b/qstardict/mainwindow.ui index 68a37bf..fcabb84 100644 --- a/qstardict/mainwindow.ui +++ b/qstardict/mainwindow.ui @@ -1,190 +1,241 @@ - + + QStarDict::MainWindow - - + + 0 0 - 742 - 511 + 326 + 240 - + + BlankCursor + + QStarDict - - + + :/icons/qstardict.png:/icons/qstardict.png - - - - 9 + + + + 214 + 130 + + + + + 320 + 240 + + + + + 0 - - 6 + + 0 - - - - 6 + + + + 0 - + 0 - - + + Clear the search box - + Clear - - + + :/icons/clear-right.png:/icons/clear-right.png - + Qt::ToolButtonIconOnly - + - - + + Fuzzy query - + Search - - + + :/icons/search-filter.png:/icons/search-filter.png - + Qt::ToolButtonTextBesideIcon - - + + - - - QDockWidget::AllDockWidgetFeatures + + + + 100 + 155 + + + + + 100 + 240 + - + + QDockWidget::DockWidgetClosable|QDockWidget::DockWidgetMovable + + Qt::NoDockWidgetArea - + Words list - + 1 - - - - 9 + + + + 100 + 130 + + + + + 100 + 240 + + + + + + 0 + 5 + 100 + 190 + + + + + 100 + 130 + - - 6 + + + 100 + 240 + - - - - + - - + + 0 0 - 742 - 22 + 326 + 27 - - + + &File - + - - + + &Help - - - + + + - - + + &Settings - - + + - - - + + + - - - + + + :/icons/application-exit.png:/icons/application-exit.png - + &Quit - + Ctrl+Q - - + + &About - - + + About &Qt - - - + + + :/icons/configure.png:/icons/configure.png - + &Configure QStarDict - - + + true - + &Scan - - - + + + :/icons/help-contents.png:/icons/help-contents.png - + QStarDict &Help - + F1 @@ -203,7 +254,7 @@ searchClearButton - + @@ -212,11 +263,11 @@ searchBox clear() - + 315 59 - + 647 61 @@ -228,11 +279,11 @@ searchBox setFocus() - + 315 59 - + 647 61 @@ -244,11 +295,11 @@ queryButton click() - + 438 50 - + 661 51 diff --git a/qstardict/settingsdialog.ui b/qstardict/settingsdialog.ui index 357f15b..d08fbd5 100644 --- a/qstardict/settingsdialog.ui +++ b/qstardict/settingsdialog.ui @@ -1,84 +1,67 @@ - + + QStarDict::SettingsDialog - - + + 0 0 - 463 - 498 + 320 + 240 - + + + 0 + 0 + + + + BlankCursor + + QStarDict Settings - + - - - 9 - - - 6 - - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - false - - - - - - + + + + 0 - - - - 0 - 0 - 441 - 414 - - - + + Global settings - + - - + + Instant search - - + + 6 - + 0 - - + + Pronounce words using this command: - - - Enter cmd for the speaching program.<br>If cmd contains "%s" it will be replaced to word, else word will be writen to stdin of speech process. + + + Enter cmd for the speaching program.<br>If cmd contains "%s" it will be replaced to word, else word will be writen to stdin of speech process. @@ -86,104 +69,96 @@ - + Qt::Vertical - + - 369 - 171 + 320 + 240 - - - - 0 - 0 - 441 - 414 - - - + + Dictionaries - + - - + + Dictionaries - + - - + + QAbstractItemView::NoEditTriggers - + QAbstractItemView::SingleSelection - + QAbstractItemView::SelectRows - + false - + - - + + Move up - + Up - - + + :/icons/arrow-up.png:/icons/arrow-up.png - - + + Move down - + Down - - + + :/icons/arrow-down.png:/icons/arrow-down.png - - + + Show information about dictionary - + Show info - - + + :/icons/dialog-information.png:/icons/dialog-information.png - + Qt::Horizontal - + 40 20 @@ -196,73 +171,80 @@ + + + + + Plugins + + - - + + 16777215 - 196 + 16777215 - + Plugins - + Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft - + - - + + QAbstractItemView::NoEditTriggers - + QAbstractItemView::SingleSelection - + QAbstractItemView::SelectRows - + false - + - - + + Show information about plugin - + Info - - + + :/icons/dialog-information.png:/icons/dialog-information.png - - + + Configure plugin - + Configure - - + + :/icons/configure.png:/icons/configure.png - + Qt::Horizontal - + 40 20 @@ -277,136 +259,128 @@ - - - - 0 - 0 - 640 - 409 - - - - Popup window + + + Behaviour - - + + 9 - + 6 - - - + + + Behavior - - + + 9 - + 6 - - - + + + 6 - + 0 - - + + Pronounce the word - - - + + + 6 - + 0 - - + + Timeout before hide after mouse over - - + + Don't hide - + sec - + 1 - + 0.000000000000000 - + 10.000000000000000 - + 0.100000000000000 - + 0.500000000000000 - - - + + + 6 - + 0 - - + + true - + Show only if modifier pressed - - + + false - + Alt - + Control - + Shift - + Win @@ -414,19 +388,19 @@ - - - + + + Scan selection - + true - - - + + + Show if word not found @@ -434,108 +408,128 @@ - - - - Apperance + + + + Qt::Vertical + + + + 20 + 101 + - - + + + + + + + View + + + + + + View + + + 9 - + 6 - - - + + + 6 - + 0 - - + + Opacity - - + + % - + - + 1 - + 100 - + 100 - - - + + + 6 - + 0 - - + + Default width - - + + 96 - + 9999 - + 320 - - - + + + 6 - + 0 - - + + Default height - - + + 96 - + 9999 - + 240 @@ -545,41 +539,40 @@ - - - - Qt::Vertical - - - - 20 - 101 - - - - - - - - 0 - 0 - 640 - 409 - - - + + Apperance - - - + + + + + + 0 + 0 + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + false + + + @@ -599,21 +592,16 @@ dictsMoveUpButton dictsMoveDownButton dictsShowInfoButton - pluginsTableView - pluginsShowInfoButton - pluginsConfigureButton useScanBox showIfNotFoundBox useScanModifierBox modifierKeyBox timeoutBeforeHideSpin pronounceWordBox - popupDefaultWidthSpin - popupDefaultHeightSpin - popupOpacitySpin - + + @@ -622,11 +610,11 @@ QStarDict::SettingsDialog accept() - - 330 - 587 + + 310 + 230 - + 410 299 @@ -638,11 +626,11 @@ QStarDict::SettingsDialog reject() - - 406 - 587 + + 310 + 230 - + 410 299 @@ -654,13 +642,13 @@ modifierKeyBox setEnabled(bool) - - 165 - 140 + + 194 + 85 - - 273 - 137 + + 289 + 85 diff --git a/qstardict/speaker.cpp b/qstardict/speaker.cpp index ef31f03..723d4c8 100644 --- a/qstardict/speaker.cpp +++ b/qstardict/speaker.cpp @@ -29,7 +29,7 @@ Speaker::Speaker() { m_speechProcess = new QProcess; QSettings settings; - m_speechCmd = settings.value("Speaker/speechCmd", "festival --tts").toString(); + m_speechCmd = settings.value("Speaker/speechCmd", "flite").toString(); } Speaker::~Speaker()