Changeset 141 in tspsg-svn
- Timestamp:
- Oct 3, 2010, 2:01:00 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/install.pri
r137 r141 23 23 # - docs go to /usr/share/doc/TSPSG-x.x.x 24 24 unix:!macx:!symbian { 25 PREFIX = /usr 25 isEmpty(PREFIX) { 26 PREFIX = /usr 27 } 26 28 CONFIG(release, debug|release) { 27 29 DEFINES += PATH_L10N=\\\"$$PREFIX/share/TSPSG/l10n\\\" … … 46 48 # For win32: everything goes to "%PROGRAMFILES%\TSPSG" and subfolders. 47 49 win32 { 48 PREFIX = "$$(PROGRAMFILES)" 50 isEmpty(PREFIX) { 51 PREFIX = "$$(PROGRAMFILES)" 52 } 49 53 50 54 share.files = $$[QT_INSTALL_BINS]/QtCore$${D}4.dll \ … … 68 72 # For wince: we are deploying to \Program Files\TSPSG. 69 73 wince* { 70 PREFIX = "\\Program Files" 74 isEmpty(PREFIX) { 75 PREFIX = "\\Program Files" 76 } 71 77 share.sources = $$share.files 72 78 # l10n.sources = $$l10n.files \ … … 84 90 # l10n.path = $$PREFIX/TSPSG/l10n 85 91 docs.path = $$PREFIX/TSPSG 86 87 RC_FILE = resources/tspsg.rc88 92 } 89 93 -
trunk/src/defaults.h
r139 r141 42 42 * \brief Default for "Use native file dialog". 43 43 */ 44 #ifdef Q_ OS_WINCE_WM44 #ifdef Q_WS_WINCE_WM 45 45 #define DEF_USE_NATIVE_DIALOGS false 46 46 #else 47 47 #define DEF_USE_NATIVE_DIALOGS true 48 #endif // Q_ OS_WINCE48 #endif // Q_WS_WINCE_WM 49 49 //! Default for "Save main window state and position" 50 50 #define DEF_SAVEPOS true … … 91 91 * \brief Default font size 92 92 */ 93 #ifdef Q_ OS_SYMBIAN93 #ifdef Q_WS_S60 94 94 #define DEF_FONT_SIZE 8 95 95 #else 96 96 #define DEF_FONT_SIZE 10 97 #endif // Q_ OS_SYMBIAN97 #endif // Q_WS_S60 98 98 //! Default text color 99 99 #define DEF_TEXT_COLOR QPalette().color(QPalette::Text) -
trunk/src/globals.cpp
r116 r141 24 24 #include "globals.h" 25 25 26 #ifdef Q_ OS_WIN3226 #ifdef Q_WS_WIN32 27 27 void toggleStyle(QWidget *widget, bool enable) 28 28 { … … 33 33 } 34 34 } 35 #endif // Q_ OS_WIN3235 #endif // Q_WS_WIN32 -
trunk/src/globals.h
r139 r141 42 42 #endif // NOSVG 43 43 44 #if defined(Q_ OS_WINCE_WM) || defined(Q_OS_SYMBIAN)44 #if defined(Q_WS_WINCE_WM) || defined(Q_WS_S60) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR) 45 45 //! This is defined on handheld devices (e.g., Windows Mobile, Symbian). 46 46 #define HANDHELD … … 59 59 // TSPSolver 60 60 #include "tspsolver.h" 61 #ifdef Q_ OS_WIN3261 #ifdef Q_WS_WIN32 62 62 // Vista/7 Eyecandy 63 63 #include "qtwin.h" 64 #endif // Q_ OS_WIN3264 #endif // Q_WS_WIN32 65 65 66 66 // DEFINES … … 122 122 inline bool hasUpdater() 123 123 { 124 #ifdef Q_ OS_WIN32124 #ifdef Q_WS_WIN32 125 125 return QFile::exists("updater/Update.exe"); 126 #else // Q_ OS_WIN32126 #else // Q_WS_WIN32 127 127 return false; 128 #endif // Q_ OS_WIN32128 #endif // Q_WS_WIN32 129 129 } 130 130 131 #ifdef Q_ OS_WIN32131 #ifdef Q_WS_WIN32 132 132 /*! 133 133 * \brief Enables or disables a mask for the \a widget. … … 138 138 */ 139 139 void toggleStyle(QWidget *widget, bool enable); 140 #endif // Q_ OS_WIN32140 #endif // Q_WS_WIN32 141 141 142 142 #ifndef DOXYGEN_EXCLUDE -
trunk/src/main.cpp
r139 r141 54 54 qsrand(QDateTime::currentDateTime().toTime_t() ^ QCursor::pos().x() ^ QCursor::pos().y()); 55 55 56 #ifdef Q_ OS_WINCE_WM56 #ifdef Q_WS_WINCE_WM 57 57 // Qt "leaves" unpacked .ttf files after running - let's try to delete them. 58 58 QStringList files = QDir(app.applicationDirPath(), "*.ttf").entryList(); -
trunk/src/mainwindow.cpp
r140 r141 24 24 #include "mainwindow.h" 25 25 26 #ifdef Q_ OS_WIN3226 #ifdef Q_WS_WIN32 27 27 #include "shobjidl.h" 28 28 #endif … … 63 63 #endif // QT_NO_PRINTER 64 64 65 #ifdef Q_ OS_WINCE_WM65 #ifdef Q_WS_WINCE_WM 66 66 currentGeometry = QApplication::desktop()->availableGeometry(0); 67 67 // We need to react to SIP show/hide and resize the window appropriately 68 68 connect(QApplication::desktop(), SIGNAL(workAreaResized(int)), SLOT(desktopResized(int))); 69 #endif // Q_ OS_WINCE_WM69 #endif // Q_WS_WINCE_WM 70 70 connect(actionFileNew, SIGNAL(triggered()), SLOT(actionFileNewTriggered())); 71 71 connect(actionFileOpen, SIGNAL(triggered()), SLOT(actionFileOpenTriggered())); … … 372 372 void MainWindow::groupSettingsLanguageListTriggered(QAction *action) 373 373 { 374 #ifndef Q_WS_MAEMO_5 374 375 if (actionSettingsLanguageAutodetect->isChecked()) { 375 376 // We have language autodetection. It needs to be disabled to change language. … … 379 380 return; 380 381 } 382 #endif 381 383 bool untitled = (fileName == tr("Untitled") + ".tspt"); 382 384 if (loadLanguage(action->data().toString())) { … … 386 388 if (untitled) 387 389 setFileName(); 388 #ifdef Q_ OS_WIN32390 #ifdef Q_WS_WIN32 389 391 if (QtWin::isCompositionEnabled() && settings->value("UseTranslucency", DEF_USE_TRANSLUCENCY).toBool()) { 390 392 toggleStyle(labelVariant, true); … … 565 567 hb2->addWidget(bb); 566 568 567 #ifdef Q_ OS_WINCE_WM569 #ifdef Q_WS_WINCE_WM 568 570 vb->setMargin(3); 569 #endif // Q_ OS_WINCE_WM571 #endif // Q_WS_WINCE_WM 570 572 vb->addLayout(hb1); 571 573 #ifdef HANDHELD … … 600 602 connect(bb, SIGNAL(accepted()), dlg, SLOT(accept())); 601 603 602 #ifdef Q_ OS_WIN32604 #ifdef Q_WS_WIN32 603 605 // Adding some eyecandy in Vista and 7 :-) 604 606 if (QtWin::isCompositionEnabled()) { 605 607 QtWin::enableBlurBehindWindow(dlg, true); 606 608 } 607 #endif // Q_ OS_WIN32609 #endif // Q_WS_WIN32 608 610 609 611 dlg->resize(450, 350); … … 662 664 pd.show(); 663 665 664 #ifdef Q_ OS_WIN32666 #ifdef Q_WS_WIN32 665 667 HRESULT hr = CoCreateInstance(CLSID_TaskbarList, NULL, CLSCTX_INPROC_SERVER, IID_ITaskbarList3, (LPVOID*)&tl); 666 668 if (SUCCEEDED(hr)) { … … 680 682 connect(&solver, SIGNAL(routePartFound(int)), &pd, SLOT(setValue(int))); 681 683 connect(&pd, SIGNAL(canceled()), &solver, SLOT(cancel())); 682 #ifdef Q_ OS_WIN32684 #ifdef Q_WS_WIN32 683 685 if (tl != NULL) 684 686 connect(&solver, SIGNAL(routePartFound(int)), SLOT(solverRoutePartFound(int))); 685 687 #endif 686 688 SStep *root = solver.solve(n, matrix); 687 #ifdef Q_ OS_WIN32689 #ifdef Q_WS_WIN32 688 690 if (tl != NULL) 689 691 disconnect(&solver, SIGNAL(routePartFound(int)), this, SLOT(solverRoutePartFound(int))); … … 694 696 pd.reset(); 695 697 if (!solver.wasCanceled()) { 696 #ifdef Q_ OS_WIN32698 #ifdef Q_WS_WIN32 697 699 if (tl != NULL) { 698 700 // tl->SetProgressValue(winId(), n, n * 2); … … 707 709 pd.setCancelButton(NULL); 708 710 pd.show(); 709 #ifdef Q_ OS_WIN32711 #ifdef Q_WS_WIN32 710 712 if (tl != NULL) 711 713 tl->SetProgressState(winId(), TBPF_INDETERMINATE); … … 722 724 #endif 723 725 pd.reset(); 724 #ifdef Q_ OS_WIN32726 #ifdef Q_WS_WIN32 725 727 if (tl != NULL) { 726 728 tl->SetProgressState(winId(), TBPF_NOPROGRESS); … … 736 738 pd.setValue(0); 737 739 738 #ifdef Q_ OS_WIN32740 #ifdef Q_WS_WIN32 739 741 if (tl != NULL) 740 742 tl->SetProgressValue(winId(), spinCities->value(), spinCities->value() + solver.getTotalSteps() + 1); … … 794 796 pd.show(); 795 797 QApplication::processEvents(QEventLoop::ExcludeUserInputEvents); 796 #ifdef Q_ OS_WIN32798 #ifdef Q_WS_WIN32 797 799 if (tl != NULL) 798 800 tl->SetProgressState(winId(), TBPF_INDETERMINATE); … … 808 810 solutionText->clear(); 809 811 toggleSolutionActions(false); 810 #ifdef Q_ OS_WIN32812 #ifdef Q_WS_WIN32 811 813 if (tl != NULL) { 812 814 tl->SetProgressState(winId(), TBPF_NOPROGRESS); … … 818 820 } 819 821 pd.setValue(n); 820 #ifdef Q_ OS_WIN32822 #ifdef Q_WS_WIN32 821 823 if (tl != NULL) 822 824 tl->SetProgressValue(winId(), spinCities->value() + n, spinCities->value() + solver.getTotalSteps() + 1); … … 864 866 pb->setFormat(tr("Generating footer")); 865 867 pd.setValue(n); 866 #ifdef Q_ OS_WIN32868 #ifdef Q_WS_WIN32 867 869 if (tl != NULL) 868 870 tl->SetProgressValue(winId(), spinCities->value() + n, spinCities->value() + solver.getTotalSteps() + 1); … … 926 928 pd.setCancelButton(NULL); 927 929 QApplication::processEvents(QEventLoop::ExcludeUserInputEvents); 928 #ifdef Q_ OS_WIN32930 #ifdef Q_WS_WIN32 929 931 if (tl != NULL) 930 932 tl->SetProgressState(winId(), TBPF_INDETERMINATE); … … 940 942 toggleSolutionActions(); 941 943 tabWidget->setCurrentIndex(1); 942 #ifdef Q_ OS_WIN32944 #ifdef Q_WS_WIN32 943 945 if (tl != NULL) { 944 946 tl->SetProgressState(winId(), TBPF_NOPROGRESS); … … 968 970 } 969 971 970 #ifdef Q_ OS_WINCE_WM972 #ifdef Q_WS_WINCE_WM 971 973 void MainWindow::changeEvent(QEvent *ev) 972 974 { … … 1001 1003 } 1002 1004 } 1003 #endif // Q_ OS_WINCE_WM1005 #endif // Q_WS_WINCE_WM 1004 1006 1005 1007 void MainWindow::numCitiesChanged(int nCities) … … 1017 1019 #endif // QT_NO_PRINTER 1018 1020 1019 #ifdef Q_ OS_WIN321021 #ifdef Q_WS_WIN32 1020 1022 void MainWindow::solverRoutePartFound(int n) 1021 1023 { 1022 #ifdef Q_ OS_WIN321024 #ifdef Q_WS_WIN32 1023 1025 tl->SetProgressValue(winId(), n, spinCities->value() * 2); 1024 1026 #else 1025 1027 Q_UNUSED(n); 1026 #endif // Q_ OS_WIN321027 } 1028 #endif // Q_ OS_WIN321028 #endif // Q_WS_WIN32 1029 } 1030 #endif // Q_WS_WIN32 1029 1031 1030 1032 void MainWindow::spinCitiesValueChanged(int n) … … 1043 1045 void MainWindow::check4Updates(bool silent) 1044 1046 { 1045 #ifdef Q_ OS_WIN321047 #ifdef Q_WS_WIN32 1046 1048 if (silent) 1047 1049 QProcess::startDetached("updater/Update.exe -name=\"TSPSG: TSP Solver and Generator\" -check=\"freeupdate\" -silentcheck"); … … 1260 1262 QString lng = lang; 1261 1263 if (lng.isEmpty()) { 1262 ad = settings->value("Language" , "").toString().isEmpty();1264 ad = settings->value("Language").toString().isEmpty(); 1263 1265 lng = settings->value("Language", QLocale::system().name()).toString(); 1264 1266 } … … 1334 1336 a->setCheckable(true); 1335 1337 a->setActionGroup(groupSettingsStyleList); 1336 if ((style == settings->value("Style").toString()) 1337 || QString(QApplication::style()->metaObject()->className()).contains(QRegExp(QString("^Q?%1(Style)?$").arg(QRegExp::escape(style)), Qt::CaseInsensitive))) { 1338 if ((style == settings->value("Stlye").toString()) 1339 #ifndef Q_WS_MAEMO_5 1340 || QString(QApplication::style()->metaObject()->className()).contains(QRegExp(QString("^Q?%1(Style)?$").arg(QRegExp::escape(style)), Qt::CaseInsensitive)) 1341 #endif 1342 ) { 1338 1343 a->setChecked(true); 1339 1344 } … … 1543 1548 #endif // HANDHELD 1544 1549 1545 #ifdef Q_ OS_WINCE_WM1550 #ifdef Q_WS_WINCE_WM 1546 1551 menuBar()->setDefaultAction(menuFile->menuAction()); 1547 1552 … … 1554 1559 #else 1555 1560 setCentralWidget(tabWidget); 1556 #endif // Q_ OS_WINCE_WM1561 #endif // Q_WS_WINCE_WM 1557 1562 1558 1563 //! \hack HACK: A little hack for toolbar icons to have a sane size. 1559 #if def HANDHELD1564 #if defined(HANDHELD) && !defined(Q_WS_MAEMO_5) 1560 1565 toolBarMain->setIconSize(QSize(logicalDpiX() / 4, logicalDpiY() / 4)); 1561 1566 #endif // HANDHELD … … 1588 1593 1589 1594 groupSettingsLanguageList = new QActionGroup(this); 1595 #ifdef Q_WS_MAEMO_5 1596 groupSettingsLanguageList->addAction(actionSettingsLanguageAutodetect); 1597 #endif 1590 1598 actionSettingsLanguageEnglish->setData("en"); 1591 1599 actionSettingsLanguageEnglish->setActionGroup(groupSettingsLanguageList); … … 1595 1603 actionSettingsStyleSystem->setData(true); 1596 1604 groupSettingsStyleList = new QActionGroup(this); 1605 #ifdef Q_WS_MAEMO_5 1606 groupSettingsStyleList->addAction(actionSettingsStyleSystem); 1607 #endif 1597 1608 1598 1609 #ifndef HANDHELD … … 1630 1641 retranslateUi(false); 1631 1642 1632 #ifdef Q_ OS_WIN321643 #ifdef Q_WS_WIN32 1633 1644 // Adding some eyecandy in Vista and 7 :-) 1634 1645 if (QtWin::isCompositionEnabled() && settings->value("UseTranslucency", DEF_USE_TRANSLUCENCY).toBool()) { 1635 1646 toggleTranclucency(true); 1636 1647 } 1637 #endif // Q_ OS_WIN321648 #endif // Q_WS_WIN32 1638 1649 } 1639 1650 … … 1651 1662 void MainWindow::toggleTranclucency(bool enable) 1652 1663 { 1653 #ifdef Q_ OS_WIN321664 #ifdef Q_WS_WIN32 1654 1665 toggleStyle(labelVariant, enable); 1655 1666 toggleStyle(labelCities, enable); … … 1659 1670 #else 1660 1671 Q_UNUSED(enable); 1661 #endif // Q_ OS_WIN321662 } 1672 #endif // Q_WS_WIN32 1673 } -
trunk/src/mainwindow.h
r139 r141 36 36 #include "tspmodel.h" 37 37 38 #ifdef Q_ OS_WIN3238 #ifdef Q_WS_WIN32 39 39 // Forward declaration. A real one is in shobjidl.h 40 40 struct ITaskbarList3; … … 83 83 void dataChanged(); 84 84 void dataChanged(const QModelIndex &tl, const QModelIndex &br); 85 #ifdef Q_ OS_WINCE_WM85 #ifdef Q_WS_WINCE_WM 86 86 void changeEvent(QEvent *ev); 87 87 void desktopResized(int screen); 88 #endif // Q_ OS_WINCE_WM88 #endif // Q_WS_WINCE_WM 89 89 void numCitiesChanged(int nCities); 90 90 #ifndef QT_NO_PRINTER 91 91 void printPreview(QPrinter *printer); 92 92 #endif // QT_NO_PRINTER 93 #ifdef Q_ OS_WIN3293 #ifdef Q_WS_WIN32 94 94 void solverRoutePartFound(int n); 95 #endif // Q_ OS_WIN3295 #endif // Q_WS_WIN32 96 96 void spinCitiesValueChanged(int nCities); 97 97 … … 112 112 QSettings *settings; 113 113 CTSPModel *tspmodel; 114 #ifdef Q_ OS_WINCE_WM114 #ifdef Q_WS_WINCE_WM 115 115 QRect currentGeometry; 116 #endif // Q_ OS_WINCE_WM116 #endif // Q_WS_WINCE_WM 117 117 118 #ifdef Q_ OS_WIN32118 #ifdef Q_WS_WIN32 119 119 ITaskbarList3 *tl; 120 #endif // Q_ OS_WIN32120 #endif // Q_WS_WIN32 121 121 122 122 // The solution graph SVG -
trunk/src/os.h
r133 r141 39 39 */ 40 40 #if defined(__amd64__) || defined(_M_X64) 41 #define ARCH " (AMD 64-bit)"41 # define ARCH " (AMD 64-bit)" 42 42 #elif defined(__ia64__) || defined(_M_IA64) 43 #define ARCH " (Intel 64-bit)"43 # define ARCH " (Intel 64-bit)" 44 44 #elif defined(__i386__) || defined(_M_IX86) || defined(_X86_) 45 #define ARCH " (Intel x86)"45 # define ARCH " (Intel x86)" 46 46 #elif defined(__powerpc__) || defined(_M_PPC) 47 #define ARCH " (PowerPC)"47 # define ARCH " (PowerPC)" 48 48 #elif defined(__arm__) || defined(_M_ARM) 49 #define ARCH " (ARM)"49 # define ARCH " (ARM)" 50 50 #elif defined(__mips__) || defined(_M_MRX000) 51 #define ARCH " (MIPS)"51 # define ARCH " (MIPS)" 52 52 #else 53 #define ARCH ""53 # define ARCH "" 54 54 #endif // ARCH 55 55 … … 66 66 */ 67 67 #ifdef Q_OS_AIX 68 #define OS "AIX" 69 #define OSID quint8(1) 70 #elif defined Q_OS_BSD4 71 #define OS "BSD 4.4" 72 #define OSID quint8(2) 73 #elif defined Q_OS_BSDI 74 #define OS "BSD/OS" 75 #define OSID quint8(3) 76 #elif defined Q_OS_CYGWIN 77 #define OS "Cygwin" 78 #define OSID quint8(4) 79 #elif defined Q_OS_DGUX 80 #define OS "DG/UX" 81 #define OSID quint8(5) 82 #elif defined Q_OS_DYNIX 83 #define OS "DYNIX/ptx" 84 #define OSID quint8(6) 85 #elif defined Q_OS_FREEBSD 86 #define OS "FreeBSD" 87 #define OSID quint8(7) 88 #elif defined Q_OS_HPUX 89 #define OS "HP-UX" 90 #define OSID quint8(8) 91 #elif defined Q_OS_HURD 92 #define OS "GNU Hurd" 93 #define OSID quint8(9) 94 #elif defined Q_OS_IRIX 95 #define OS "SGI Irix" 96 #define OSID quint8(10) 97 #elif defined Q_OS_LINUX 98 #define OS "Linux" 99 #define OSID quint8(11) 100 #elif defined Q_OS_LYNX 101 #define OS "LynxOS" 102 #define OSID quint8(12) 103 #elif defined Q_OS_MAC 104 #define OS "Mac OS (Darwin)" 105 #define OSID quint8(13) 106 #elif defined Q_OS_MSDOS 107 #define OS "MS-DOS" 108 #define OSID quint8(14) 109 #elif defined Q_OS_NETBSD 110 #define OS "NetBSD" 111 #define OSID quint8(15) 112 #elif defined Q_OS_OS2 113 #define OS "OS/2" 114 #define OSID quint8(16) 115 #elif defined Q_OS_OPENBSD 116 #define OS "OpenBSD" 117 #define OSID quint8(17) 118 #elif defined Q_OS_OS2EMX 119 #define OS "OS/2" 120 #define OSID quint8(18) 121 #elif defined Q_OS_OSF 122 #define OS "HP Tru64 UNIX" 123 #define OSID quint8(19) 124 #elif defined Q_OS_QNX 125 #define OS "QNX Neutrino" 126 #define OSID quint8(20) 127 #elif defined Q_OS_RELIANT 128 #define OS "Reliant UNIX" 129 #define OSID quint8(21) 130 #elif defined Q_OS_SCO 131 #define OS "SCO OpenServer 5" 132 #define OSID quint8(22) 133 #elif defined Q_OS_SOLARIS 134 #define OS "Sun Solaris" 135 #define OSID quint8(23) 136 #elif defined Q_OS_SYMBIAN 137 #define OS "Symbian" 138 #define OSID quint8(24) 139 #elif defined Q_OS_ULTRIX 140 #define OS "DEC Ultrix" 141 #define OSID quint8(25) 142 #elif defined Q_OS_UNIX 143 #define OS "UNIX BSD/SYSV" 144 #define OSID quint8(26) 145 #elif defined Q_OS_UNIXWARE 146 #define OS "UnixWare 7/Open UNIX 8" 147 #define OSID quint8(27) 148 #elif defined Q_OS_WIN32 149 #define OS "Windows" 150 #define OSID quint8(28) 151 #elif defined Q_OS_WINCE_WM 152 #define OS "Windows Mobile" 153 #define OSID quint8(29) 154 #elif defined Q_OS_WINCE 155 #define OS "Windows CE" 156 #define OSID quint8(30) 68 # define OS "AIX" 69 # define OSID quint8(1) 70 #elif defined(Q_OS_BSDI) 71 # define OS "BSD/OS" 72 # define OSID quint8(2) 73 #elif defined(Q_OS_CYGWIN) 74 # define OS "Cygwin" 75 # define OSID quint8(3) 76 #elif defined(Q_OS_DARWIN) 77 # define OS "Mac OS (Darwin)" 78 # define OSID quint8(4) 79 #elif defined(Q_OS_DGUX) 80 # define OS "DG/UX" 81 # define OSID quint8(5) 82 #elif defined(Q_OS_DYNIX) 83 # define OS "DYNIX/ptx" 84 # define OSID quint8(6) 85 #elif defined(Q_OS_FREEBSD) 86 # define OS "FreeBSD" 87 # define OSID quint8(7) 88 #elif defined(Q_OS_HPUX) 89 # define OS "HP-UX" 90 # define OSID quint8(8) 91 #elif defined(Q_OS_HURD) 92 # define OS "GNU Hurd" 93 # define OSID quint8(9) 94 #elif defined(Q_OS_IRIX) 95 # define OS "SGI Irix" 96 # define OSID quint8(10) 97 #elif defined(Q_OS_LINUX) 98 # define OS "Linux" 99 # define OSID quint8(11) 100 #elif defined(Q_OS_LYNX) 101 # define OS "LynxOS" 102 # define OSID quint8(12) 103 #elif defined(Q_OS_NETBSD) 104 # define OS "NetBSD" 105 # define OSID quint8(13) 106 #elif defined(Q_OS_OPENBSD) 107 # define OS "OpenBSD" 108 # define OSID quint8(14) 109 #elif defined(Q_OS_OS2EMX) 110 # define OS "OS/2" 111 # define OSID quint8(15) 112 #elif defined(Q_OS_OSF) 113 # define OS "HP Tru64 UNIX" 114 # define OSID quint8(16) 115 #elif defined(Q_OS_QNX) 116 # define OS "QNX Neutrino" 117 # define OSID quint8(17) 118 #elif defined(Q_OS_RELIANT) 119 # define OS "Reliant UNIX" 120 # define OSID quint8(18) 121 #elif defined(Q_OS_SCO) 122 # define OS "SCO OpenServer 5" 123 # define OSID quint8(19) 124 #elif defined(Q_OS_SOLARIS) 125 # define OS "Sun Solaris" 126 # define OSID quint8(20) 127 #elif defined(Q_OS_SYMBIAN) 128 # define OS "Symbian" 129 # define OSID quint8(21) 130 #elif defined(Q_OS_ULTRIX) 131 # define OS "DEC Ultrix" 132 # define OSID quint8(22) 133 #elif defined(Q_OS_UNIXWARE) 134 # define OS "UnixWare 7/Open UNIX 8" 135 # define OSID quint8(23) 136 #elif defined(Q_OS_WIN32) 137 # define OS "Windows" 138 # define OSID quint8(24) 139 #elif defined(Q_OS_WINCE_WM) 140 # define OS "Windows Mobile" 141 # define OSID quint8(25) 142 #elif defined(Q_OS_WINCE) 143 # define OS "Windows CE" 144 # define OSID quint8(26) 145 #elif defined(Q_OS_BSD4) 146 # define OS "BSD 4.4" 147 # define OSID quint8(253) 148 #elif defined(Q_OS_UNIX) 149 # define OS "UNIX BSD/SYSV" 150 # define OSID quint8(254) 157 151 #else 158 #define OS "Unknown"159 #define OSID quint8(255)152 # define OS "Unknown" 153 # define OSID quint8(255) 160 154 #endif // OS 161 155 … … 167 161 * \brief The compiler TSPSG was built with. 168 162 */ 169 #ifdef Q_CC_MSVC 170 #define COMPILER "Microsoft Visual C/C++ or Intel C++ for Windows" 163 #ifdef Q_CC_INTEL 164 # define COMPILER "Intel C++" 165 #elif defined(Q_CC_MSVC) 166 # define COMPILER "Microsoft Visual C/C++" 167 #elif defined(Q_CC_MINGW) 168 # define COMPILER "MinGW GCC" 171 169 #elif defined(Q_CC_GNU) 172 #define COMPILER "GNU C++" 173 #elif defined(Q_CC_INTEL) 174 #define COMPILER "Intel C++ for Linux or Intel C++ for Windows" 170 # define COMPILER "GNU C++" 175 171 #elif defined(Q_CC_GCCE) 176 #define COMPILER "GCCE (Symbian GCCE builds)"172 # define COMPILER "GCCE (Symbian GCCE builds)" 177 173 #elif defined(Q_CC_RVCT) 178 #define COMPILER "ARM Realview Compiler Suite"174 # define COMPILER "ARM Realview Compiler Suite" 179 175 #elif defined(Q_CC_NOKIAX86) 180 #define COMPILER "Nokia x86 (Symbian WINSCW builds)"176 # define COMPILER "Nokia x86 (Symbian WINSCW builds)" 181 177 #else 182 #define COMPILER "Unknown"178 # define COMPILER "Unknown" 183 179 #endif 184 180 -
trunk/src/settingsdialog.cpp
r140 r141 109 109 QVBoxLayout *vbox1; // Layout helper 110 110 111 #ifdef Q_ OS_WINCE_WM111 #ifdef Q_WS_WINCE_WM 112 112 // On screens with small height when SIP is shown and the window is resized 113 113 // there is not enought space for all elements. … … 120 120 #else 121 121 buttons->insertStretch(buttons->indexOf(buttonHelp) + 1); 122 #endif // Q_ OS_WINCE_WM122 #endif // Q_WS_WINCE_WM 123 123 124 124 bgWhite->layout()->setMargin(0); … … 128 128 vbox1->setMargin(0); 129 129 vbox1->setSpacing(0); 130 #ifdef Q_ OS_WINCE_WM130 #ifdef Q_WS_WINCE_WM 131 131 vbox1->addWidget(scrollArea); 132 132 #else 133 133 vbox1->addWidget(bgWhite); 134 #endif // Q_ OS_WINCE_WM134 #endif // Q_WS_WINCE_WM 135 135 vbox1->addWidget(bgGrey); 136 136 setLayout(vbox1); … … 138 138 QVBoxLayout *vbox; // Layout helper 139 139 140 #ifdef Q_ OS_WIN32140 #ifdef Q_WS_WIN32 141 141 if (QtWin::isCompositionEnabled()) { 142 142 cbUseTranslucency = new QCheckBox(bgWhite); … … 148 148 cbUseTranslucency->setCursor(QCursor(Qt::PointingHandCursor)); 149 149 } 150 #endif // Q_ OS_WIN32150 #endif // Q_WS_WIN32 151 151 152 152 cbSaveState = new QCheckBox(bgWhite); … … 194 194 box = static_cast<QBoxLayout *>(tabGeneral->layout()); 195 195 box->insertWidget(box->indexOf(cbUseNativeDialogs) + 1, cbSaveState); 196 #ifdef Q_ OS_WIN32196 #ifdef Q_WS_WIN32 197 197 if (QtWin::isCompositionEnabled()) 198 198 box->insertWidget(box->indexOf(cbUseNativeDialogs) + 1, cbUseTranslucency); 199 #endif // Q_ OS_WIN32199 #endif // Q_WS_WIN32 200 200 201 201 // Inserting label for hints to the bottom part (with grey bg) … … 211 211 #endif // HANDHELD 212 212 213 #ifdef Q_ OS_WINCE_WM213 #ifdef Q_WS_WINCE_WM 214 214 // We need to react to SIP show/hide and resize the window appropriately 215 215 connect(QApplication::desktop(), SIGNAL(workAreaResized(int)), SLOT(desktopResized(int))); 216 #endif // Q_ OS_WINCE_WM216 #endif // Q_WS_WINCE_WM 217 217 connect(spinRandMin, SIGNAL(valueChanged(int)), SLOT(spinRandMinValueChanged(int))); 218 218 connect(buttonFont, SIGNAL(clicked()), SLOT(buttonFontClicked())); … … 230 230 cbSaveLastUsed->setChecked(settings->value("SaveLastUsed", DEF_SAVE_LAST_USED).toBool()); 231 231 cbUseNativeDialogs->setChecked(settings->value("UseNativeDialogs", DEF_USE_NATIVE_DIALOGS).toBool()); 232 #ifdef Q_ OS_WIN32232 #ifdef Q_WS_WIN32 233 233 if (QtWin::isCompositionEnabled()) 234 234 cbUseTranslucency->setChecked(settings->value("UseTranslucency", DEF_USE_TRANSLUCENCY).toBool()); 235 #endif // Q_ OS_WIN32235 #endif // Q_WS_WIN32 236 236 #ifndef HANDHELD 237 237 cbSaveState->setChecked(settings->value("SavePos", DEF_SAVEPOS).toBool()); … … 298 298 #else 299 299 adjustSize(); 300 #endif // Q_ OS_WINCE_WM300 #endif // Q_WS_WINCE_WM 301 301 } 302 302 … … 349 349 settings->setValue("SaveLastUsed", cbSaveLastUsed->isChecked()); 350 350 settings->setValue("UseNativeDialogs", cbUseNativeDialogs->isChecked()); 351 #ifdef Q_ OS_WIN32351 #ifdef Q_WS_WIN32 352 352 if (QtWin::isCompositionEnabled()) { 353 353 bool old = settings->value("UseTranslucency", DEF_USE_TRANSLUCENCY).toBool(); … … 358 358 settings->setValue("UseTranslucency", cbUseTranslucency->isChecked()); 359 359 } 360 #endif // Q_ OS_WIN32360 #endif // Q_WS_WIN32 361 361 #ifndef HANDHELD 362 362 settings->setValue("SavePos", cbSaveState->isChecked()); … … 421 421 } 422 422 423 #ifdef Q_ OS_WINCE_WM423 #ifdef Q_WS_WINCE_WM 424 424 void SettingsDialog::desktopResized(int screen) 425 425 { … … 453 453 QWidget::showEvent(ev); 454 454 } 455 #endif // Q_ OS_WINCE_WM455 #endif // Q_WS_WINCE_WM 456 456 457 457 void SettingsDialog::spinRandMinValueChanged(int val) { -
trunk/src/settingsdialog.h
r139 r141 56 56 QSettings *settings; 57 57 QHBoxLayout *layoutCitiesLimit; 58 #ifdef Q_ OS_WIN3258 #ifdef Q_WS_WIN32 59 59 QCheckBox *cbUseTranslucency; 60 #endif // Q_ OS_WIN3260 #endif // Q_WS_WIN32 61 61 QCheckBox *cbCheck4Updates; 62 62 QSpinBox *spinUpdateCheckInterval; … … 64 64 QCheckBox *cbHQGraph; 65 65 #endif 66 #ifdef Q_ OS_WINCE_WM66 #ifdef Q_WS_WINCE_WM 67 67 QRect currentGeometry; 68 68 #elif !defined(HANDHELD) … … 73 73 74 74 bool event(QEvent *ev); 75 #endif // Q_ OS_WINCE_WM75 #endif // Q_WS_WINCE_WM 76 76 77 77 private slots: … … 79 79 void buttonColorClicked(); 80 80 void buttonFontClicked(); 81 #ifdef Q_ OS_WINCE_WM81 #ifdef Q_WS_WINCE_WM 82 82 void desktopResized(int screen); 83 83 void showEvent(QShowEvent *ev); 84 #endif // Q_ OS_WINCE_WM84 #endif // Q_WS_WINCE_WM 85 85 void spinRandMinValueChanged(int val); 86 86 }; -
trunk/tspsg.pri
r139 r141 4 4 # Copyright (C) 2007-2010 Lёppa <contacts[at]oleksii[dot]name> 5 5 # 6 # $Id : tspsg.pri 137 2010-09-15 14:57:37Z laleppa$7 # $URL : https://svn.tspsg.info/svnroot/tspsg/trunk/tspsg.pri$6 # $Id$ 7 # $URL$ 8 8 # 9 9 # This file is part of TSPSG. … … 40 40 l10n/l10n.qrc 41 41 42 wincewm*|symbian{42 handheld { 43 43 RESOURCES += resources/handheld.qrc 44 44 } else { -
trunk/tspsg.pro
r139 r141 15 15 } else { 16 16 DEFINES += NOSVG 17 } 18 19 wincewm*|symbian|maemo*|simulator { 20 CONFIG += handheld 17 21 } 18 22 … … 91 95 92 96 # Include 3rd party libraries 93 ! wincewm*:!symbian{97 !handheld { 94 98 include(src/3rdparty/qttoolbardialog-2.2_1-opensource/src/qttoolbardialog.pri) 95 99 }
Note: See TracChangeset
for help on using the changeset viewer.