Changeset 7ed8b57eea in tspsg for src/mainwindow.cpp
- Timestamp:
- Aug 31, 2013, 11:52:34 PM (11 years ago)
- Branches:
- appveyor, imgbot, master, readme
- Children:
- 2a5e50e0a9
- Parents:
- 1241232377
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mainwindow.cpp
r1241232377 r7ed8b57eea 149 149 setAcceptDrops(true); 150 150 151 #ifdef Q_OS_BLACKBERRY 152 taskView->setEditTriggers(QAbstractItemView::AllEditTriggers); 153 #endif 154 151 155 initDocStyleSheet(); 152 156 … … 182 186 connect(actionFileSaveAsTask, SIGNAL(triggered()), SLOT(actionFileSaveAsTaskTriggered())); 183 187 connect(actionFileSaveAsSolution, SIGNAL(triggered()), SLOT(actionFileSaveAsSolutionTriggered())); 184 #ifndef QT_NO_PRINT ER188 #ifndef QT_NO_PRINTDIALOG 185 189 connect(actionFilePrintPreview, SIGNAL(triggered()), SLOT(actionFilePrintPreviewTriggered())); 186 190 connect(actionFilePageSetup, SIGNAL(triggered()), SLOT(actionFilePageSetupTriggered())); … … 483 487 } 484 488 485 #ifndef QT_NO_PRINT ER489 #ifndef QT_NO_PRINTDIALOG 486 490 void MainWindow::actionFilePrintPreviewTriggered() 487 491 { … … 541 545 QApplication::restoreOverrideCursor(); 542 546 } 543 #endif // QT_NO_PRINT ER547 #endif // QT_NO_PRINTDIALOG 544 548 545 549 void MainWindow::actionSettingsPreferencesTriggered() … … 744 748 txtAbout->moveCursor(QTextCursor::Start); 745 749 txtAbout->setFrameShape(QFrame::NoFrame); 750 #ifdef Q_OS_BLACKBERRY 751 txtAbout->setAttribute(Qt::WA_InputMethodEnabled, false); 752 #endif 746 753 747 754 // txtCredits->setWordWrapMode(QTextOption::NoWrap); … … 750 757 txtCredits->moveCursor(QTextCursor::Start); 751 758 txtCredits->setFrameShape(QFrame::NoFrame); 759 #ifdef Q_OS_BLACKBERRY 760 txtCredits->setAttribute(Qt::WA_InputMethodEnabled, false); 761 #endif 752 762 753 763 txtLicense->setWordWrapMode(QTextOption::NoWrap); … … 756 766 txtLicense->moveCursor(QTextCursor::Start); 757 767 txtLicense->setFrameShape(QFrame::NoFrame); 768 #ifdef Q_OS_BLACKBERRY 769 txtLicense->setAttribute(Qt::WA_InputMethodEnabled, false); 770 #endif 758 771 759 772 bb->button(QDialogButtonBox::Ok)->setCursor(QCursor(Qt::PointingHandCursor)); … … 807 820 #ifndef HANDHELD 808 821 dlg->resize(450, 350); 809 #elif defined(Q_OS_SYMBIAN) 822 #elif defined(Q_OS_SYMBIAN) || defined(Q_OS_BLACKBERRY) 810 823 dlg->setWindowState(Qt::WindowMaximized); 811 824 #endif … … 857 870 pd.setCancelButton(cancel); 858 871 pd.setMaximum(n); 872 pd.setAutoClose(false); 859 873 pd.setAutoReset(false); 860 874 pd.setLabelText(tr("Calculating optimal route...")); … … 1737 1751 Ui_MainWindow::retranslateUi(this); 1738 1752 1753 #ifdef Q_OS_BLACKBERRY 1754 menuSettings->removeAction(menuSettingsStyle->menuAction()); 1755 #else 1739 1756 loadStyleList(); 1757 #endif 1740 1758 loadToolbarList(); 1741 1759 1742 #ifndef QT_NO_PRINT ER1760 #ifndef QT_NO_PRINTDIALOG 1743 1761 actionFilePrintPreview->setText(tr("P&rint Preview...")); 1744 1762 #ifndef QT_NO_TOOLTIP … … 1764 1782 actionFilePrint->setStatusTip(tr("Print current solution results")); 1765 1783 #endif // QT_NO_STATUSTIP 1784 #ifndef QT_NO_SHORTCUT 1766 1785 actionFilePrint->setShortcut(tr("Ctrl+P")); 1767 #endif // QT_NO_PRINTER 1786 #endif // QT_NO_SHORTCUT 1787 #endif // QT_NO_PRINTDIALOG 1768 1788 1769 1789 #ifndef QT_NO_STATUSTIP … … 1846 1866 actionFileOpen->setIcon(GET_ICON("document-open")); 1847 1867 actionFileSave->setIcon(GET_ICON("document-save")); 1848 #if ndef HANDHELD1868 #if !defined(HANDHELD) || defined(Q_OS_BLACKBERRY) 1849 1869 menuFileSaveAs->setIcon(GET_ICON("document-save-as")); 1850 1870 #endif 1851 1871 actionFileExit->setIcon(GET_ICON("application-exit")); 1852 1872 // Settings Menu 1853 #if ndef HANDHELD1873 #if !defined(HANDHELD) || defined(Q_OS_BLACKBERRY) 1854 1874 menuSettingsLanguage->setIcon(GET_ICON("preferences-desktop-locale")); 1855 1875 #if QT_VERSION >= QT_VERSION_CHECK(4,6,0) … … 1862 1882 actionSettingsPreferences->setIcon(GET_ICON("preferences-system")); 1863 1883 // Help Menu 1864 #if ndef HANDHELD1884 #if !defined(HANDHELD) || defined(Q_OS_BLACKBERRY) 1865 1885 actionHelpContents->setIcon(GET_ICON("help-contents")); 1866 1886 actionHelpContextual->setIcon(GET_ICON("help-contextual")); … … 1868 1888 actionHelpReportBug->setIcon(GET_ICON("tools-report-bug")); 1869 1889 actionHelpAbout->setIcon(GET_ICON("help-about")); 1890 #ifdef Q_OS_BLACKBERRY 1891 // Qt about dialog is too big for the screen 1892 // and it's impossible to close it. 1893 menuHelp->removeAction(actionHelpAboutQt); 1894 #else // Q_OS_BLACKBERRY 1870 1895 #if QT_VERSION < QT_VERSION_CHECK(5,0,0) 1871 1896 actionHelpAboutQt->setIcon(QIcon(":/trolltech/qmessagebox/images/qtlogo-64.png")); 1872 #else 1897 #else // QT_VERSION < QT_VERSION_CHECK(5,0,0) 1873 1898 actionHelpAboutQt->setIcon(QIcon(":/qt-project.org/qmessagebox/images/qtlogo-64.png")); 1874 1899 #endif // QT_VERSION < QT_VERSION_CHECK(5,0,0) 1900 #endif // Q_OS_BLACKBERRY 1875 1901 #endif // HANDHELD 1876 1902 // Buttons … … 1922 1948 solutionText->setWordWrapMode(QTextOption::WordWrap); 1923 1949 1924 #ifndef QT_NO_PRINT ER1950 #ifndef QT_NO_PRINTDIALOG 1925 1951 actionFilePrintPreview = new QAction(this); 1926 1952 actionFilePrintPreview->setObjectName("actionFilePrintPreview"); … … 1948 1974 1949 1975 toolBarMain->insertAction(actionSettingsPreferences, actionFilePrint); 1950 #endif // QT_NO_PRINT ER1976 #endif // QT_NO_PRINTDIALOG 1951 1977 1952 1978 groupSettingsLanguageList = new QActionGroup(this); … … 2021 2047 actionFileSaveAsSolution->setEnabled(enable); 2022 2048 solutionText->setEnabled(enable); 2023 #ifndef QT_NO_PRINT ER2049 #ifndef QT_NO_PRINTDIALOG 2024 2050 actionFilePrint->setEnabled(enable); 2025 2051 actionFilePrintPreview->setEnabled(enable); 2026 #endif // QT_NO_PRINT ER2052 #endif // QT_NO_PRINTDIALOG 2027 2053 } 2028 2054
Note: See TracChangeset
for help on using the changeset viewer.