- Timestamp:
- Apr 15, 2011, 4:21:25 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/mainwindow.cpp
r162 r163 545 545 QString about; 546 546 about += QString("%1: <b>%2</b><br>").arg(tr("Target OS (ARCH)"), PLATFROM); 547 #ifndef STATIC_BUILD 548 about += QString("%1 (%2):<br>").arg(tr("Qt library"), tr("shared")); 547 about += QString("%1:<br>").arg(tr("Qt library")); 549 548 about += QString(" %1: <b>%2</b><br>").arg(tr("Build time"), QT_VERSION_STR); 550 549 about += QString(" %1: <b>%2</b><br>").arg(tr("Runtime"), qVersion()); 551 #else552 about += QString("%1: <b>%2</b> (%3)<br>").arg(tr("Qt library"), QT_VERSION_STR, tr("static"));553 #endif // STATIC_BUILD554 550 about.append(QString("%1: <b>%2x%3</b><br>").arg("Logical DPI").arg(logicalDpiX()).arg(logicalDpiY())); 555 551 about += tr("Buid <b>%1</b>, built on <b>%2</b> at <b>%3</b> with <b>%4</b> compiler.").arg(BUILD_NUMBER).arg(__DATE__).arg(__TIME__).arg(COMPILER) + "<br>"; … … 742 738 QPushButton *cancel = new QPushButton(&pd); 743 739 cancel->setIcon(GET_ICON("dialog-cancel")); 744 cancel->setText(QCoreApplication::translate("Q ProgressDialog", "Cancel", "No need to translate this. This translation will be taken from Qt translation files."));740 cancel->setText(QCoreApplication::translate("QDialogButtonBox", "Cancel", "No need to translate this. This translation will be taken from Qt translation files.")); 745 741 pd.setCancelButton(cancel); 746 742 pd.setMaximum(n); … … 838 834 pic.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); 839 835 QFont font = qvariant_cast<QFont>(settings->value("Output/Font", QFont(DEF_FONT_FACE))); 840 font.setStyleHint(QFont:: Monospace);836 font.setStyleHint(QFont::TypeWriter); 841 837 // Font size in pixels = graph node radius / 2.75. 842 838 // See MainWindow::drawNode() for graph node radius calcualtion description. 839 #ifndef Q_WS_S60 843 840 font.setPixelSize(logicalDpiX() * (settings->value("Output/GraphWidth", DEF_GRAPH_WIDTH).toReal() / CM_IN_INCH) / 4.5 / 2.75); 841 #else 842 // Also, see again MainWindow::drawNode() for why is additional 1.3 divider added in Symbian. 843 font.setPixelSize(logicalDpiX() * (settings->value("Output/GraphWidth", DEF_GRAPH_WIDTH).toReal() / CM_IN_INCH) / 4.5 / 2.75 / 1.3); 844 #endif 844 845 if (settings->value("Output/HQGraph", DEF_HQ_GRAPH).toBool()) { 845 846 font.setWeight(QFont::DemiBold); … … 1474 1475 if (!isWindowModified()) 1475 1476 return true; 1476 int res = QMessageBox::warning(this, tr("Unsaved Changes"), tr("Would you like to save changes in the current task?"), QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel); 1477 #ifdef Q_WS_S60 1478 int res = QSMessageBox(this).exec(); 1479 #else 1480 int res = QMessageBox::warning(this, tr("Unsaved Changes"), tr("Would you like to save changes in the current task?"), QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel); 1481 #endif 1477 1482 if (res == QMessageBox::Save) 1478 1483 return actionFileSaveTriggered(); … … 1664 1669 actionHelpReportBug->setIcon(GET_ICON("tools-report-bug")); 1665 1670 actionHelpAbout->setIcon(GET_ICON("help-about")); 1666 actionHelpAboutQt->setIcon(QIcon(":/ images/icons/"ICON_SIZE"/qtlogo."ICON_FORMAT));1671 actionHelpAboutQt->setIcon(QIcon(":/trolltech/qmessagebox/images/qtlogo-64.png")); 1667 1672 #endif 1668 1673 // Buttons … … 1841 1846 QDesktopServices::openUrl(QUrl("http://tspsg.info/goto/bugtracker")); 1842 1847 } 1848 1849 #ifdef Q_WS_S60 1850 QSMessageBox::QSMessageBox(QWidget *parent) 1851 : QMessageBox(parent) 1852 { 1853 setIcon(QMessageBox::Warning); 1854 setWindowTitle(QApplication::translate("MainWindow", "Unsaved Changes")); 1855 setText(QApplication::translate("MainWindow", "Would you like to save changes in the current task?")); 1856 setStandardButtons(QMessageBox::Save); 1857 1858 QMenu *m = new QMenu(this); 1859 m->addAction(QApplication::translate("QDialogButtonBox", "Discard", "No need to translate this. This translation will be taken from Qt translation files."), 1860 this, SLOT(discard())); 1861 m->addAction(QApplication::translate("QDialogButtonBox", "Cancel", "No need to translate this. This translation will be taken from Qt translation files."), 1862 this, SLOT(cancel())); 1863 1864 QAction *o = new QAction(QApplication::translate("QMenuBar", "Actions", "No need to translate this. This translation will be taken from Qt translation files."), this); 1865 o->setSoftKeyRole(QAction::NegativeSoftKey); 1866 o->setMenu(m); 1867 addAction(o); 1868 } 1869 1870 void QSMessageBox::cancel(){ 1871 done(QMessageBox::Cancel); 1872 } 1873 1874 void QSMessageBox::discard() { 1875 done(QMessageBox::Discard); 1876 } 1877 #endif // Q_WS_S60 -
trunk/src/mainwindow.h
r162 r163 161 161 }; 162 162 163 #ifdef Q_WS_S60 164 // A quickly hacked QMessageBox for Symbian that supports three buttons. 165 class QSMessageBox: public QMessageBox { 166 Q_OBJECT 167 private slots: 168 void cancel(); 169 void discard(); 170 public: 171 QSMessageBox(QWidget *parent = 0); 172 }; 173 #endif // Q_WS_S60 174 163 175 #endif // MAINWINDOW_H -
trunk/tspsg.pro
r157 r163 63 63 BUILD_NUMBER=$$REVISION 64 64 65 # A hack to determine whether we have static or dynamic Qt build66 macx {67 PRL = $$[QT_INSTALL_LIBS] QtCore.framework QtCore.prl68 } else:symbian|maemo*|simulator {69 # Nothing here70 } else:unix {71 PRL = $$[QT_INSTALL_LIBS] libQtCore.prl72 } else {73 PRL = $$[QT_INSTALL_LIBS] QtCore.prl74 }75 !isEmpty(PRL) {76 include($$join(PRL, "/"))77 contains(QMAKE_PRL_CONFIG, static) {78 # We "embed" SVG icon support on static build79 DEFINES += STATIC_BUILD80 # !nosvg:QTPLUGIN += qsvgicon81 }82 }83 84 65 CONFIG(release, debug|release) { 85 66 OBJECTS_DIR = release
Note: See TracChangeset
for help on using the changeset viewer.