Changeset 1b40fef578 in tspsg for src


Ignore:
Timestamp:
May 30, 2011, 3:11:22 PM (13 years ago)
Author:
Oleksii Serdiuk
Branches:
appveyor, imgbot, master, readme
Children:
9f5cc00f29
Parents:
142cff4d3d
git-author:
Oleksii Serdiuk <contacts@…> (05/30/11 15:11:22)
git-committer:
Oleksii Serdiuk <contacts@…> (06/29/12 19:46:00)
Message:

FIX: Main Window is cut in landscape mode in Symbian (fixed bug:11).
When switching to landscape mode in Symbian, TSPSG will hide toolbar and go into full screen mode.

Location:
src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/mainwindow.cpp

    r142cff4d3d r1b40fef578  
    439439{
    440440SettingsDialog sd(this);
     441#ifdef Q_WS_S60
     442    sd.setWindowState(Qt::WindowMaximized);
     443#endif
    441444    if (sd.exec() != QDialog::Accepted)
    442445        return;
     
    693696#ifndef HANDHELD
    694697    dlg->resize(450, 350);
     698#elif defined(Q_WS_S60)
     699    dlg->setWindowState(Qt::WindowMaximized);
    695700#endif
    696701    QApplication::restoreOverrideCursor();
     
    15371542}
    15381543
     1544#ifdef Q_WS_S60
     1545void MainWindow::resizeEvent(QResizeEvent *ev)
     1546{
     1547    static bool tb = toolBarMain->isVisible();
     1548    if ((ev->size().width() < ev->size().height())
     1549            && (ev->oldSize().width() > ev->oldSize().height())) {
     1550        // From landscape to portrait
     1551        if (tb)
     1552            toolBarMain->show();
     1553        setWindowState(Qt::WindowMaximized);
     1554    } else if ((ev->size().width() > ev->size().height())
     1555               && (ev->oldSize().width() < ev->oldSize().height())) {
     1556        // From portrait to landscape
     1557        if (tb = toolBarMain->isVisible())
     1558            toolBarMain->hide();
     1559        setWindowState(Qt::WindowFullScreen);
     1560    }
     1561
     1562    QWidget::resizeEvent(ev);
     1563}
     1564#endif // Q_WS_S60
     1565
    15391566void MainWindow::retranslateUi(bool all)
    15401567{
     
    16421669{
    16431670    Ui_MainWindow::setupUi(this);
     1671
     1672#ifdef Q_WS_S60
     1673    setWindowFlags(windowFlags() | Qt::WindowSoftkeysVisibleHint);
     1674#endif // Q_WS_S60
    16441675
    16451676    // File Menu
  • src/mainwindow.h

    r142cff4d3d r1b40fef578  
    153153    void outputMatrix(QTextCursor &cur, const TMatrix &matrix);
    154154    void outputMatrix(QTextCursor &cur, const SStep &step);
     155#ifdef Q_WS_S60
     156    void resizeEvent(QResizeEvent *ev);
     157#endif // Q_WS_S60
    155158    void retranslateUi(bool all = true);
    156159    bool saveTask();
Note: See TracChangeset for help on using the changeset viewer.