Changeset ccdffe3a5f in tspsg


Ignore:
Timestamp:
Mar 31, 2013, 6:31:10 PM (11 years ago)
Author:
Oleksii Serdiuk
Branches:
0.1.4.170-beta2-bb10
Children:
628500a5d6
Parents:
95b0ef73dc
git-author:
Oleksii Serdiuk <contacts@…> (03/31/13 18:31:10)
git-committer:
Oleksii Serdiuk <contacts@…> (03/31/13 21:45:38)
Message:

Removed printing related items from menu as there's no printer.

Made dialogs to be shown maximized.

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src/mainwindow.cpp

    r95b0ef73dc rccdffe3a5f  
    9090    connect(actionFileSaveAsTask, SIGNAL(triggered()), SLOT(actionFileSaveAsTaskTriggered()));
    9191    connect(actionFileSaveAsSolution, SIGNAL(triggered()), SLOT(actionFileSaveAsSolutionTriggered()));
    92 #ifndef QT_NO_PRINTER
     92#ifndef QT_NO_PRINTDIALOG
    9393    connect(actionFilePrintPreview, SIGNAL(triggered()), SLOT(actionFilePrintPreviewTriggered()));
    9494    connect(actionFilePageSetup, SIGNAL(triggered()), SLOT(actionFilePageSetupTriggered()));
     
    376376}
    377377
    378 #ifndef QT_NO_PRINTER
     378#ifndef QT_NO_PRINTDIALOG
    379379void MainWindow::actionFilePrintPreviewTriggered()
    380380{
     
    434434    QApplication::restoreOverrideCursor();
    435435}
    436 #endif // QT_NO_PRINTER
     436#endif // QT_NO_PRINTDIALOG
    437437
    438438void MainWindow::actionSettingsPreferencesTriggered()
     
    693693#ifndef HANDHELD
    694694    dlg->resize(450, 350);
     695#elif defined(Q_OS_BLACKBERRY)
     696    dlg->setWindowState(Qt::WindowMaximized);
    695697#endif
    696698    QApplication::restoreOverrideCursor();
     
    15491551    loadToolbarList();
    15501552
    1551 #ifndef QT_NO_PRINTER
     1553#ifndef QT_NO_PRINTDIALOG
    15521554    actionFilePrintPreview->setText(tr("P&rint Preview..."));
    15531555#ifndef QT_NO_TOOLTIP
     
    15731575    actionFilePrint->setStatusTip(tr("Print current solution results"));
    15741576#endif // QT_NO_STATUSTIP
     1577#ifndef QT_NO_SHORTCUT
    15751578    actionFilePrint->setShortcut(tr("Ctrl+P"));
    1576 #endif // QT_NO_PRINTER
     1579#endif // QT_NO_SHORTCUT
     1580#endif // QT_NO_PRINTDIALOG
    15771581
    15781582#ifndef QT_NO_STATUSTIP
     
    17291733    solutionText->setWordWrapMode(QTextOption::WordWrap);
    17301734
    1731 #ifndef QT_NO_PRINTER
     1735#ifndef QT_NO_PRINTDIALOG
    17321736    actionFilePrintPreview = new QAction(this);
    17331737    actionFilePrintPreview->setObjectName("actionFilePrintPreview");
     
    17551759
    17561760    toolBarMain->insertAction(actionSettingsPreferences, actionFilePrint);
    1757 #endif // QT_NO_PRINTER
     1761#endif // QT_NO_PRINTDIALOG
    17581762
    17591763    groupSettingsLanguageList = new QActionGroup(this);
     
    18281832    actionFileSaveAsSolution->setEnabled(enable);
    18291833    solutionText->setEnabled(enable);
    1830 #ifndef QT_NO_PRINTER
     1834#ifndef QT_NO_PRINTDIALOG
    18311835    actionFilePrint->setEnabled(enable);
    18321836    actionFilePrintPreview->setEnabled(enable);
    1833 #endif // QT_NO_PRINTER
     1837#endif // QT_NO_PRINTDIALOG
    18341838}
    18351839
  • src/mainwindow.h

    r95b0ef73dc rccdffe3a5f  
    6262    void actionFileSaveAsTaskTriggered();
    6363    void actionFileSaveAsSolutionTriggered();
    64 #ifndef QT_NO_PRINTER
     64#ifndef QT_NO_PRINTDIALOG
    6565    void actionFilePrintPreviewTriggered();
    6666    void actionFilePageSetupTriggered();
    6767    void actionFilePrintTriggered();
    68 #endif // QT_NO_PRINTER
     68#endif // QT_NO_PRINTDIALOG
    6969    void actionSettingsPreferencesTriggered();
    7070    void actionSettingsLanguageAutodetectTriggered(bool checked);
     
    109109#ifndef QT_NO_PRINTER
    110110    QPrinter *printer;
     111#ifndef QT_NO_PRINTDIALOG
    111112    QAction *actionFilePrintPreview;
    112113    QAction *actionFilePageSetup;
    113114    QAction *actionFilePrint;
     115#endif // QT_NO_PRINTDIALOG
    114116#endif // QT_NO_PRINTER
    115117    QAction *actionHelpCheck4Updates;
  • src/settingsdialog.cpp

    r95b0ef73dc rccdffe3a5f  
    419419void SettingsDialog::buttonFontClicked()
    420420{
    421 bool ok;
    422 QFont font = QFontDialog::getFont(&ok,this->font,this);
    423     if (ok && (this->font != font)) {
    424         this->font = font;
    425         _newFont = true;
    426     }
     421    QFontDialog fd(font, this);
     422#ifdef Q_OS_BLACKBERRY
     423    fd.setWindowState(Qt::WindowMaximized);
     424#endif
     425    if ((fd.exec() != QDialog::Accepted) || (fd.selectedFont() == font))
     426        return;
     427    font = fd.selectedFont();
     428    _newFont = true;
    427429}
    428430
  • tspsg.pro

    r95b0ef73dc rccdffe3a5f  
    1919wincewm*|symbian|maemo*|simulator|blackberry {
    2020    CONFIG += handheld
     21}
     22blackberry {
     23#    DEFINES += QT_NO_SHORTCUT
     24    DEFINES += QT_NO_PRINTDIALOG
     25    DEFINES += QT_NO_PRINTPREVIEWDIALOG
    2126}
    2227
Note: See TracChangeset for help on using the changeset viewer.