Changeset e51c78af27 in tspsg


Ignore:
Timestamp:
Apr 30, 2010, 3:45:55 AM (14 years ago)
Author:
Oleksii Serdiuk
Branches:
0.1.3.145-beta1-symbian, 0.1.4.170-beta2-bb10, appveyor, imgbot, master, readme
Children:
e3533af1cf
Parents:
0773f1b65f
git-author:
Oleksii Serdiuk <contacts@…> (04/30/10 03:45:55)
git-committer:
Oleksii Serdiuk <contacts@…> (06/29/12 19:41:42)
Message:

+ Added a checkbox to the "Settings" menu to be able to show/hide Toolbar.

  • "Save" Toolbar button now has an arrow that calls "Save As..." popup menu.
  • Fixed a bug: "Autosize" setting was never saved and was always on.
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • l10n/tspsg_ru.ts

    r0773f1b65f re51c78af27  
    323323        <location filename="../src/mainwindow.cpp" line="493"/>
    324324        <source>About TSPSG</source>
    325         <translation>Про TSPSG</translation>
     325        <translation>О TSPSG</translation>
    326326    </message>
    327327    <message>
     
    634634        <location filename="../ui/mainwindow.ui" line="454"/>
    635635        <source>&amp;About TSPSG...</source>
    636         <translation>&amp;Про TSPSG...</translation>
     636        <translation>&amp;О TSPSG...</translation>
    637637    </message>
    638638    <message>
     
    780780        <location filename="../ui/mainwindow.ui" line="538"/>
    781781        <source>About &amp;Qt...</source>
    782         <translation>Про &amp;Qt...</translation>
     782        <translation>О &amp;Qt...</translation>
    783783    </message>
    784784    <message>
    785785        <location filename="../ui/mainwindow.ui" line="541"/>
    786786        <source>About Qt library</source>
    787         <translation>Про библиотеку Qt</translation>
     787        <translation>О библиотеке Qt</translation>
    788788    </message>
    789789    <message>
  • src/main.cpp

    r0773f1b65f re51c78af27  
    5858
    5959MainWindow mainwindow;
     60#ifdef HANDHELD
     61        mainwindow.showMaximized();
     62#else // HANDHELD
    6063        mainwindow.show();
     64#endif // HANDHELD
    6165        app.restoreOverrideCursor();
    6266        return app.exec();
  • src/mainwindow.cpp

    r0773f1b65f re51c78af27  
    5151        connect(QApplication::desktop(), SIGNAL(workAreaResized(int)), SLOT(desktopResized(int)));
    5252#endif // Q_OS_WINCE_WM
    53         connect(actionFileNew,SIGNAL(triggered()),this,SLOT(actionFileNewTriggered()));
    54         connect(actionFileOpen,SIGNAL(triggered()),this,SLOT(actionFileOpenTriggered()));
    55         connect(actionFileSave,SIGNAL(triggered()),this,SLOT(actionFileSaveTriggered()));
    56         connect(actionFileSaveAsTask,SIGNAL(triggered()),this,SLOT(actionFileSaveAsTaskTriggered()));
    57         connect(actionFileSaveAsSolution,SIGNAL(triggered()),this,SLOT(actionFileSaveAsSolutionTriggered()));
     53        connect(actionFileNew, SIGNAL(triggered()), SLOT(actionFileNewTriggered()));
     54        connect(actionFileOpen, SIGNAL(triggered()), SLOT(actionFileOpenTriggered()));
     55        connect(actionFileSave, SIGNAL(triggered()), SLOT(actionFileSaveTriggered()));
     56        connect(actionFileSaveAsTask, SIGNAL(triggered()), SLOT(actionFileSaveAsTaskTriggered()));
     57        connect(actionFileSaveAsSolution, SIGNAL(triggered()), SLOT(actionFileSaveAsSolutionTriggered()));
    5858#ifndef QT_NO_PRINTER
    59         connect(actionFilePrintPreview,SIGNAL(triggered()),this,SLOT(actionFilePrintPreviewTriggered()));
    60         connect(actionFilePrint,SIGNAL(triggered()),this,SLOT(actionFilePrintTriggered()));
     59        connect(actionFilePrintPreview, SIGNAL(triggered()), SLOT(actionFilePrintPreviewTriggered()));
     60        connect(actionFilePrint, SIGNAL(triggered()), SLOT(actionFilePrintTriggered()));
    6161#endif // QT_NO_PRINTER
    62         connect(actionSettingsPreferences,SIGNAL(triggered()),this,SLOT(actionSettingsPreferencesTriggered()));
     62        connect(actionSettingsPreferences, SIGNAL(triggered()), SLOT(actionSettingsPreferencesTriggered()));
    6363#ifdef Q_OS_WIN32
    6464        connect(actionHelpCheck4Updates, SIGNAL(triggered()), SLOT(actionHelpCheck4UpdatesTriggered()));
    6565#endif // Q_OS_WIN32
    66         connect(actionSettingsLanguageAutodetect,SIGNAL(triggered(bool)),this,SLOT(actionSettingsLanguageAutodetectTriggered(bool)));
    67         connect(groupSettingsLanguageList,SIGNAL(triggered(QAction *)),this,SLOT(groupSettingsLanguageListTriggered(QAction *)));
    68         connect(actionHelpAboutQt,SIGNAL(triggered()),qApp,SLOT(aboutQt()));
    69         connect(actionHelpAbout,SIGNAL(triggered()),this,SLOT(actionHelpAboutTriggered()));
    70 
    71         connect(buttonSolve,SIGNAL(clicked()),this,SLOT(buttonSolveClicked()));
    72         connect(buttonRandom,SIGNAL(clicked()),this,SLOT(buttonRandomClicked()));
    73         connect(buttonBackToTask,SIGNAL(clicked()),this,SLOT(buttonBackToTaskClicked()));
    74         connect(spinCities,SIGNAL(valueChanged(int)),this,SLOT(spinCitiesValueChanged(int)));
     66        connect(actionSettingsLanguageAutodetect, SIGNAL(triggered(bool)), SLOT(actionSettingsLanguageAutodetectTriggered(bool)));
     67        connect(groupSettingsLanguageList, SIGNAL(triggered(QAction *)), SLOT(groupSettingsLanguageListTriggered(QAction *)));
     68        connect(actionHelpAboutQt, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
     69        connect(actionHelpAbout, SIGNAL(triggered()), SLOT(actionHelpAboutTriggered()));
     70
     71        connect(buttonSolve, SIGNAL(clicked()), SLOT(buttonSolveClicked()));
     72        connect(buttonRandom, SIGNAL(clicked()), SLOT(buttonRandomClicked()));
     73        connect(buttonBackToTask, SIGNAL(clicked()), SLOT(buttonBackToTaskClicked()));
     74        connect(spinCities, SIGNAL(valueChanged(int)), SLOT(spinCitiesValueChanged(int)));
    7575
    7676#ifndef HANDHELD
     
    8686                settings->endGroup();
    8787        }
    88 #else
    89         setWindowState(Qt::WindowMaximized);
    9088#endif // HANDHELD
    9189
    9290        tspmodel = new CTSPModel(this);
    9391        taskView->setModel(tspmodel);
    94         connect(tspmodel,SIGNAL(numCitiesChanged(int)),this,SLOT(numCitiesChanged(int)));
    95         connect(tspmodel,SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)),this,SLOT(dataChanged(const QModelIndex &, const QModelIndex &)));
    96         connect(tspmodel,SIGNAL(layoutChanged()),this,SLOT(dataChanged()));
     92        connect(tspmodel, SIGNAL(numCitiesChanged(int)), SLOT(numCitiesChanged(int)));
     93        connect(tspmodel, SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)), SLOT(dataChanged(const QModelIndex &, const QModelIndex &)));
     94        connect(tspmodel, SIGNAL(layoutChanged()), SLOT(dataChanged()));
    9795        if ((QCoreApplication::arguments().count() > 1) && (tspmodel->loadTask(QCoreApplication::arguments().at(1))))
    9896                setFileName(QCoreApplication::arguments().at(1));
     
    944942                        name = t.translate("--------", "LANGNAME", "Please, provide a native name of your translation language here.");
    945943                        a = menuSettingsLanguage->addAction(name);
    946                         a->setStatusTip(QString("Set application language to %1").arg(name));
     944                        a->setStatusTip(tr("Set application language to %1").arg(name));
    947945                        a->setData(lang.completeBaseName().mid(6));
    948946                        a->setCheckable(true);
     
    11691167
    11701168        //! \hack HACK: A little hack for toolbar icons to have a sane size.
    1171 #ifdef Q_OS_WINCE_WM
     1169#ifdef HANDHELD
    11721170        toolBar->setIconSize(QSize(logicalDpiX() / 4, logicalDpiY() / 4));
    1173 #elif defined(Q_OS_SYMBIAN)
    1174         toolBar->setIconSize(QSize(logicalDpiX() / 5, logicalDpiY() / 5));
    1175 #endif // Q_OS_WINCE_WM
     1171#endif // HANDHELD
     1172        static_cast<QToolButton *>(toolBar->widgetForAction(actionFileSave))->setMenu(menuFileSaveAs);
     1173        static_cast<QToolButton *>(toolBar->widgetForAction(actionFileSave))->setPopupMode(QToolButton::MenuButtonPopup);
    11761174
    11771175        solutionText->document()->setDefaultFont(settings->value("Output/Font", QFont(DEF_FONT_FAMILY, DEF_FONT_SIZE)).value<QFont>());
     
    11951193        toolBar->insertAction(actionSettingsPreferences,actionFilePrint);
    11961194#endif // QT_NO_PRINTER
     1195
     1196        menuSettings->insertAction(actionSettingsPreferences, toolBar->toggleViewAction());
     1197        menuSettings->insertSeparator(actionSettingsPreferences);
     1198
    11971199#ifdef Q_OS_WIN32
    11981200        actionHelpCheck4Updates = new QAction(this);
  • src/settingsdialog.cpp

    r0773f1b65f re51c78af27  
    227227        settings->endGroup();
    228228
    229 #ifndef Q_OS_WINCE_WM
     229#ifdef HANDHELD
     230        setWindowState(Qt::WindowMaximized);
     231#else
    230232        adjustSize();
    231233#endif // Q_OS_WINCE_WM
     
    290292        }
    291293#endif // Q_OS_WIN32
     294        settings->setValue("Autosize", cbAutosize->isChecked());
    292295        settings->setValue("UseNativeDialogs", cbUseNativeDialogs->isChecked());
    293296
  • ui/mainwindow.ui

    r0773f1b65f re51c78af27  
    310310        </widget>
    311311        <addaction name="menuSettingsLanguage"/>
    312         <addaction name="separator"/>
    313312        <addaction name="actionSettingsPreferences"/>
    314313   </widget>
Note: See TracChangeset for help on using the changeset viewer.