Changeset 88a59e4d65 in tspsg for src


Ignore:
Timestamp:
Oct 5, 2010, 9:44:54 PM (14 years ago)
Author:
Oleksii Serdiuk
Branches:
0.1.3.145-beta1-symbian, 0.1.4.170-beta2-bb10, appveyor, imgbot, master, readme
Children:
9adbc413c7
Parents:
97e90f9be6
git-author:
Oleksii Serdiuk <contacts@…> (10/05/10 21:44:54)
git-committer:
Oleksii Serdiuk <contacts@…> (06/29/12 19:45:58)
Message:

+ Added Online Support... and Report a Bug... menu entries.

  • Some insignificant adjustments to the code.
Location:
src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/mainwindow.cpp

    r97e90f9be6 r88a59e4d65  
    8787        connect(actionSettingsStyleSystem, SIGNAL(triggered(bool)), SLOT(actionSettingsStyleSystemTriggered(bool)));
    8888        connect(groupSettingsStyleList, SIGNAL(triggered(QAction*)), SLOT(groupSettingsStyleListTriggered(QAction*)));
     89        connect(actionHelpOnlineSupport, SIGNAL(triggered()), SLOT(actionHelpOnlineSupportTriggered()));
     90        connect(actionHelpReportBug, SIGNAL(triggered()), SLOT(actionHelpReportBugTriggered()));
    8991        connect(actionHelpAboutQt, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
    9092        connect(actionHelpAbout, SIGNAL(triggered()), SLOT(actionHelpAboutTriggered()));
     
    288290                        svg.setFileName(fi.path() + "/" + img);
    289291                        svg.setTitle(tr("Solution Graph"));
    290                         svg.setDescription(tr("Generated with %1").arg(QApplication::applicationName()));
     292                        svg.setDescription(tr("Generated with %1").arg(QCoreApplication::applicationName()));
    291293QPainter p;
    292294                        p.begin(&svg);
     
    304306                        if (pic.supportsOption(QImageIOHandler::Description)) {
    305307                                pic.setText("Title", "Solution Graph");
    306                                 pic.setText("Software", QApplication::applicationName());
     308                                pic.setText("Software", QCoreApplication::applicationName());
    307309                        }
    308310                        if (format == "png")
     
    365367        if (checked) {
    366368                settings->remove("Language");
    367                 QMessageBox::information(this, tr("Language change"), tr("Language will be autodetected on the next %1 start.").arg(QApplication::applicationName()));
     369                QMessageBox::information(this, tr("Language change"), tr("Language will be autodetected on the next %1 start.").arg(QCoreApplication::applicationName()));
    368370        } else
    369371                settings->setValue("Language", groupSettingsLanguageList->checkedAction()->data().toString());
     
    404406        if (checked) {
    405407                settings->remove("Style");
    406                 QMessageBox::information(this, tr("Style Change"), tr("To apply the default style you need to restart %1.").arg(QApplication::applicationName()));
     408                QMessageBox::information(this, tr("Style Change"), tr("To apply the default style you need to restart %1.").arg(QCoreApplication::applicationName()));
    407409        } else {
    408410                settings->setValue("Style", groupSettingsStyleList->checkedAction()->text());
     
    452454
    453455QString title;
    454         title += QString("<b>%1</b><br>").arg(QApplication::applicationName());
    455         title += QString("%1: <b>%2</b><br>").arg(tr("Version"), QApplication::applicationVersion());
     456        title += QString("<b>%1</b><br>").arg(QCoreApplication::applicationName());
     457        title += QString("%1: <b>%2</b><br>").arg(tr("Version"), QCoreApplication::applicationVersion());
    456458#ifndef HANDHELD
    457         title += QString("<b>&copy; 2007-%1 <a href=\"http://%2/\">%3</a></b><br>").arg(QDate::currentDate().toString("yyyy"), QApplication::organizationDomain(), QApplication::organizationName());
     459        title += QString("<b>&copy; 2007-%1 <a href=\"http://%2/\">%3</a></b><br>").arg(QDate::currentDate().toString("yyyy"), QCoreApplication::organizationDomain(), QCoreApplication::organizationName());
    458460#endif // HANDHELD
    459461        title += QString("<b><a href=\"http://tspsg.info/\">http://tspsg.info/</a></b>");
     
    505507        f.open(QIODevice::ReadOnly);
    506508
    507 QString translation = QApplication::translate("--------", "AUTHORS %1", "Please, provide translator credits here. %1 will be replaced with VERSION");
     509QString translation = QCoreApplication::translate("--------", "AUTHORS %1", "Please, provide translator credits here. %1 will be replaced with VERSION");
    508510        if ((translation != "AUTHORS %1") && (translation.contains("%1"))) {
    509 QString about = QApplication::translate("--------", "VERSION", "Please, provide your translation version here.");
     511QString about = QCoreApplication::translate("--------", "VERSION", "Please, provide your translation version here.");
    510512                if (about != "VERSION")
    511513                        translation = translation.arg(about);
     
    516518        *lblTitle = new QLabel(dlg);
    517519#ifdef HANDHELD
    518 QLabel *lblSubTitle = new QLabel(QString("<b>&copy; 2007-%1 <a href=\"http://%2/\">%3</a></b>").arg(QDate::currentDate().toString("yyyy"), QApplication::organizationDomain(), QApplication::organizationName()), dlg);
     520QLabel *lblSubTitle = new QLabel(QString("<b>&copy; 2007-%1 <a href=\"http://%2/\">%3</a></b>").arg(QDate::currentDate().toString("yyyy"), QCoreApplication::organizationDomain(), QCoreApplication::organizationName()), dlg);
    519521#endif // HANDHELD
    520522QTabWidget *tabs = new QTabWidget(dlg);
     
    596598
    597599        dlg->setWindowFlags(Qt::Dialog | Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint);
    598         dlg->setWindowTitle(tr("About %1").arg(QApplication::applicationName()));
     600        dlg->setWindowTitle(tr("About %1").arg(QCoreApplication::applicationName()));
    599601        dlg->setWindowIcon(GET_ICON("help-about"));
    600602        dlg->setLayout(vb);
     
    654656QPushButton *cancel = new QPushButton(&pd);
    655657        cancel->setIcon(GET_ICON("dialog-cancel"));
    656         cancel->setText(QApplication::translate("QProgressDialog", "Cancel", "No need to translate this. This translation will be taken from Qt translation files."));
     658        cancel->setText(QCoreApplication::translate("QProgressDialog", "Cancel", "No need to translate this. This translation will be taken from Qt translation files."));
    657659        pd.setCancelButton(cancel);
    658660        pd.setMaximum(n);
     
    713715                        tl->SetProgressState(winId(), TBPF_INDETERMINATE);
    714716#endif
    715                 QApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
     717                QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
    716718
    717719#ifndef QT_NO_CONCURRENT
    718720QFuture<void> f = QtConcurrent::run(&solver, &CTSPSolver::cleanup, false);
    719721                while (!f.isFinished()) {
    720                         QApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
     722                        QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
    721723                }
    722724#else
     
    795797                        pd.setCancelButton(NULL);
    796798                        pd.show();
    797                         QApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
     799                        QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
    798800#ifdef Q_WS_WIN32
    799801                        if (tl != NULL)
     
    803805QFuture<void> f = QtConcurrent::run(&solver, &CTSPSolver::cleanup, false);
    804806                        while (!f.isFinished()) {
    805                                 QApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
     807                                QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
    806808                        }
    807809#else
     
    927929        pd.setMaximum(0);
    928930        pd.setCancelButton(NULL);
    929         QApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
     931        QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
    930932#ifdef Q_WS_WIN32
    931933        if (tl != NULL)
     
    935937QFuture<void> f = QtConcurrent::run(&solver, &CTSPSolver::cleanup, false);
    936938        while (!f.isFinished()) {
    937                 QApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
     939                QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
    938940        }
    939941#else
     
    13891391                                cur.insertText(isInteger(matrix.at(r).at(c)) ? QString("%1").arg(matrix.at(r).at(c)) : QString("%1").arg(matrix.at(r).at(c), 0, 'f', settings->value("Task/FractionalAccuracy", DEF_FRACTIONAL_ACCURACY).toInt()));
    13901392                }
    1391                 QApplication::processEvents();
     1393                QCoreApplication::processEvents();
    13921394        }
    13931395        cur.movePosition(QTextCursor::End);
     
    14171419                        }
    14181420                }
    1419                 QApplication::processEvents();
     1421                QCoreApplication::processEvents();
    14201422        }
    14211423
     
    14381440#ifndef QT_NO_STATUSTIP
    14391441        actionFilePrintPreview->setStatusTip(tr("Preview current solution results before printing"));
     1442#endif // QT_NO_STATUSTIP
     1443#ifndef QT_NO_STATUSTIP
     1444        actionFileExit->setStatusTip(tr("Exit %1").arg(QCoreApplication::applicationName()));
    14401445#endif // QT_NO_STATUSTIP
    14411446
     
    14571462#endif // HANDHELD
    14581463
     1464#ifndef QT_NO_STATUSTIP
     1465        actionHelpReportBug->setStatusTip(tr("Report about a bug in %1").arg(QCoreApplication::applicationName()));
     1466#endif // QT_NO_STATUSTIP
    14591467        if (actionHelpCheck4Updates != NULL) {
    14601468                actionHelpCheck4Updates->setText(tr("Check for &Updates..."));
    14611469#ifndef QT_NO_STATUSTIP
    1462                 actionHelpCheck4Updates->setStatusTip(tr("Check for %1 updates").arg(QApplication::applicationName()));
     1470                actionHelpCheck4Updates->setStatusTip(tr("Check for %1 updates").arg(QCoreApplication::applicationName()));
    14631471#endif // QT_NO_STATUSTIP
    14641472        }
     1473#ifndef QT_NO_STATUSTIP
     1474        actionHelpAbout->setStatusTip(tr("About %1").arg(QCoreApplication::applicationName()));
     1475#endif // QT_NO_STATUSTIP
    14651476}
    14661477
     
    14971508{
    14981509        this->fileName = fileName;
    1499         setWindowTitle(QString("%1[*] - %2").arg(QFileInfo(fileName).completeBaseName()).arg(QApplication::applicationName()));
     1510        setWindowTitle(QString("%1[*] - %2").arg(QFileInfo(fileName).completeBaseName()).arg(QCoreApplication::applicationName()));
    15001511}
    15011512
     
    15271538        actionHelpContents->setIcon(GET_ICON("help-contents"));
    15281539        actionHelpContextual->setIcon(GET_ICON("help-contextual"));
     1540        actionHelpOnlineSupport->setIcon(GET_ICON("applications-internet"));
     1541        actionHelpReportBug->setIcon(GET_ICON("tools-report-bug"));
    15291542        actionHelpAbout->setIcon(GET_ICON("help-about"));
    15301543        actionHelpAboutQt->setIcon(QIcon(":/images/icons/"ICON_SIZE"/qtlogo."ICON_FORMAT));
     
    16721685#endif // Q_WS_WIN32
    16731686}
     1687
     1688void MainWindow::actionHelpOnlineSupportTriggered()
     1689{
     1690        QDesktopServices::openUrl(QUrl("http://tspsg.info/goto/support"));
     1691}
     1692
     1693void MainWindow::actionHelpReportBugTriggered()
     1694{
     1695        QDesktopServices::openUrl(QUrl("http://tspsg.info/goto/bugtracker"));
     1696}
  • src/mainwindow.h

    r97e90f9be6 r88a59e4d65  
    7474        void actionSettingsToolbarsConfigureTriggered();
    7575#endif // HANDHELD
     76        void actionHelpOnlineSupportTriggered();
     77        void actionHelpReportBugTriggered();
    7678        void actionHelpCheck4UpdatesTriggered();
    7779        void actionHelpAboutTriggered();
Note: See TracChangeset for help on using the changeset viewer.