Changeset 23ad8db4a5 in tspsg


Ignore:
Timestamp:
Apr 9, 2011, 2:53:25 AM (13 years ago)
Author:
Oleksii Serdiuk
Branches:
0.1.4.170-beta2-bb10, appveyor, imgbot, master, readme
Children:
144fbe6b96
Parents:
a885c3d9d2
git-author:
Oleksii Serdiuk <contacts@…> (04/09/11 02:53:25)
git-committer:
Oleksii Serdiuk <contacts@…> (06/29/12 19:45:58)
Message:
  • Solution graph on Symbian is visually larger than on Windows Mobile. Added a hack that makes it about the same size on both platforms.
  • Fixed bug #6 (Bug: Actions in Options Menu).
Location:
src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/main.cpp

    ra885c3d9d2 r23ad8db4a5  
    7777
    7878MainWindow mainwindow;
     79#ifdef Q_WS_S60
     80    //! \hack HACK: A workaround to hide Actions menu item in Symbian.
     81QWidgetList widgets = QApplication::allWidgets();
     82QWidget *w = 0;
     83    foreach(w, widgets) {
     84        w->setContextMenuPolicy(Qt::NoContextMenu);
     85    }
     86#endif
     87
    7988#ifdef HANDHELD
    8089    mainwindow.showMaximized();
  • src/mainwindow.cpp

    ra885c3d9d2 r23ad8db4a5  
    492492    about += QString("%1: <b>%2</b> (%3)<br>").arg(tr("Qt library"), QT_VERSION_STR, tr("static"));
    493493#endif // STATIC_BUILD
     494    about.append(QString("%1: <b>%2x%3</b><br>").arg("Logical DPI").arg(logicalDpiX()).arg(logicalDpiY()));
    494495    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>";
    495496    about += QString("%1: <b>%2</b><br>").arg(tr("Algorithm"), CTSPSolver::getVersionId());
     
    11261127    else
    11271128        r = logicalDpiX() / 2.54;
     1129#ifdef Q_WS_S60
     1130        /*! \hack HACK: Solution graph on Symbian is visually larger than on
     1131     *   Windows Mobile. This coefficient makes it about the same size.
     1132     */
     1133    r /= 1.3;
     1134#endif
     1135
    11281136qreal x, y;
    11291137    if (step != NULL)
     
    14961504    actionHelpAbout->setStatusTip(tr("About %1").arg(QCoreApplication::applicationName()));
    14971505#endif // QT_NO_STATUSTIP
     1506
     1507#ifdef Q_WS_S60
     1508    actionRightSoftKey->setText(tr("E&xit"));
     1509#endif
    14981510}
    14991511
     
    15991611#if defined(HANDHELD) && !defined(Q_WS_MAEMO_5)
    16001612#ifdef Q_WS_S60
    1601     toolBarMain->setIconSize(QSize(logicalDpiX() / 5, logicalDpiY() / 5));
     1613    toolBarMain->setIconSize(QSize(logicalDpiX() / 5.2, logicalDpiY() / 5.2));
    16021614#else
    16031615    toolBarMain->setIconSize(QSize(logicalDpiX() / 4, logicalDpiY() / 4));
     
    16781690#endif // HANDHELD
    16791691
     1692#ifdef Q_WS_S60
     1693    // Replace Exit on the right soft key with our own exit action.
     1694    // This makes it translatable.
     1695    actionRightSoftKey = new QAction(this);
     1696    actionRightSoftKey->setSoftKeyRole(QAction::NegativeSoftKey);
     1697    connect(actionRightSoftKey, SIGNAL(triggered()), SLOT(close()));
     1698    addAction(actionRightSoftKey);
     1699#endif
     1700
    16801701    retranslateUi(false);
    16811702
  • src/mainwindow.h

    ra885c3d9d2 r23ad8db4a5  
    112112#endif // QT_NO_PRINTER
    113113    QAction *actionHelpCheck4Updates;
     114#ifdef Q_WS_S60
     115    QAction *actionRightSoftKey;
     116#endif
    114117    QSettings *settings;
    115118    CTSPModel *tspmodel;
Note: See TracChangeset for help on using the changeset viewer.