Changeset 142 in tspsg-svn for trunk/src/mainwindow.cpp
- Timestamp:
- Oct 5, 2010, 9:44:54 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/mainwindow.cpp
r141 r142 87 87 connect(actionSettingsStyleSystem, SIGNAL(triggered(bool)), SLOT(actionSettingsStyleSystemTriggered(bool))); 88 88 connect(groupSettingsStyleList, SIGNAL(triggered(QAction*)), SLOT(groupSettingsStyleListTriggered(QAction*))); 89 connect(actionHelpOnlineSupport, SIGNAL(triggered()), SLOT(actionHelpOnlineSupportTriggered())); 90 connect(actionHelpReportBug, SIGNAL(triggered()), SLOT(actionHelpReportBugTriggered())); 89 91 connect(actionHelpAboutQt, SIGNAL(triggered()), qApp, SLOT(aboutQt())); 90 92 connect(actionHelpAbout, SIGNAL(triggered()), SLOT(actionHelpAboutTriggered())); … … 288 290 svg.setFileName(fi.path() + "/" + img); 289 291 svg.setTitle(tr("Solution Graph")); 290 svg.setDescription(tr("Generated with %1").arg(Q Application::applicationName()));292 svg.setDescription(tr("Generated with %1").arg(QCoreApplication::applicationName())); 291 293 QPainter p; 292 294 p.begin(&svg); … … 304 306 if (pic.supportsOption(QImageIOHandler::Description)) { 305 307 pic.setText("Title", "Solution Graph"); 306 pic.setText("Software", Q Application::applicationName());308 pic.setText("Software", QCoreApplication::applicationName()); 307 309 } 308 310 if (format == "png") … … 365 367 if (checked) { 366 368 settings->remove("Language"); 367 QMessageBox::information(this, tr("Language change"), tr("Language will be autodetected on the next %1 start.").arg(Q Application::applicationName()));369 QMessageBox::information(this, tr("Language change"), tr("Language will be autodetected on the next %1 start.").arg(QCoreApplication::applicationName())); 368 370 } else 369 371 settings->setValue("Language", groupSettingsLanguageList->checkedAction()->data().toString()); … … 404 406 if (checked) { 405 407 settings->remove("Style"); 406 QMessageBox::information(this, tr("Style Change"), tr("To apply the default style you need to restart %1.").arg(Q Application::applicationName()));408 QMessageBox::information(this, tr("Style Change"), tr("To apply the default style you need to restart %1.").arg(QCoreApplication::applicationName())); 407 409 } else { 408 410 settings->setValue("Style", groupSettingsStyleList->checkedAction()->text()); … … 452 454 453 455 QString title; 454 title += QString("<b>%1</b><br>").arg(Q Application::applicationName());455 title += QString("%1: <b>%2</b><br>").arg(tr("Version"), Q Application::applicationVersion());456 title += QString("<b>%1</b><br>").arg(QCoreApplication::applicationName()); 457 title += QString("%1: <b>%2</b><br>").arg(tr("Version"), QCoreApplication::applicationVersion()); 456 458 #ifndef HANDHELD 457 title += QString("<b>© 2007-%1 <a href=\"http://%2/\">%3</a></b><br>").arg(QDate::currentDate().toString("yyyy"), Q Application::organizationDomain(), QApplication::organizationName());459 title += QString("<b>© 2007-%1 <a href=\"http://%2/\">%3</a></b><br>").arg(QDate::currentDate().toString("yyyy"), QCoreApplication::organizationDomain(), QCoreApplication::organizationName()); 458 460 #endif // HANDHELD 459 461 title += QString("<b><a href=\"http://tspsg.info/\">http://tspsg.info/</a></b>"); … … 505 507 f.open(QIODevice::ReadOnly); 506 508 507 QString translation = Q Application::translate("--------", "AUTHORS %1", "Please, provide translator credits here. %1 will be replaced with VERSION");509 QString translation = QCoreApplication::translate("--------", "AUTHORS %1", "Please, provide translator credits here. %1 will be replaced with VERSION"); 508 510 if ((translation != "AUTHORS %1") && (translation.contains("%1"))) { 509 QString about = Q Application::translate("--------", "VERSION", "Please, provide your translation version here.");511 QString about = QCoreApplication::translate("--------", "VERSION", "Please, provide your translation version here."); 510 512 if (about != "VERSION") 511 513 translation = translation.arg(about); … … 516 518 *lblTitle = new QLabel(dlg); 517 519 #ifdef HANDHELD 518 QLabel *lblSubTitle = new QLabel(QString("<b>© 2007-%1 <a href=\"http://%2/\">%3</a></b>").arg(QDate::currentDate().toString("yyyy"), Q Application::organizationDomain(), QApplication::organizationName()), dlg);520 QLabel *lblSubTitle = new QLabel(QString("<b>© 2007-%1 <a href=\"http://%2/\">%3</a></b>").arg(QDate::currentDate().toString("yyyy"), QCoreApplication::organizationDomain(), QCoreApplication::organizationName()), dlg); 519 521 #endif // HANDHELD 520 522 QTabWidget *tabs = new QTabWidget(dlg); … … 596 598 597 599 dlg->setWindowFlags(Qt::Dialog | Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint); 598 dlg->setWindowTitle(tr("About %1").arg(Q Application::applicationName()));600 dlg->setWindowTitle(tr("About %1").arg(QCoreApplication::applicationName())); 599 601 dlg->setWindowIcon(GET_ICON("help-about")); 600 602 dlg->setLayout(vb); … … 654 656 QPushButton *cancel = new QPushButton(&pd); 655 657 cancel->setIcon(GET_ICON("dialog-cancel")); 656 cancel->setText(Q Application::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.")); 657 659 pd.setCancelButton(cancel); 658 660 pd.setMaximum(n); … … 713 715 tl->SetProgressState(winId(), TBPF_INDETERMINATE); 714 716 #endif 715 Q Application::processEvents(QEventLoop::ExcludeUserInputEvents);717 QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents); 716 718 717 719 #ifndef QT_NO_CONCURRENT 718 720 QFuture<void> f = QtConcurrent::run(&solver, &CTSPSolver::cleanup, false); 719 721 while (!f.isFinished()) { 720 Q Application::processEvents(QEventLoop::ExcludeUserInputEvents);722 QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents); 721 723 } 722 724 #else … … 795 797 pd.setCancelButton(NULL); 796 798 pd.show(); 797 Q Application::processEvents(QEventLoop::ExcludeUserInputEvents);799 QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents); 798 800 #ifdef Q_WS_WIN32 799 801 if (tl != NULL) … … 803 805 QFuture<void> f = QtConcurrent::run(&solver, &CTSPSolver::cleanup, false); 804 806 while (!f.isFinished()) { 805 Q Application::processEvents(QEventLoop::ExcludeUserInputEvents);807 QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents); 806 808 } 807 809 #else … … 927 929 pd.setMaximum(0); 928 930 pd.setCancelButton(NULL); 929 Q Application::processEvents(QEventLoop::ExcludeUserInputEvents);931 QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents); 930 932 #ifdef Q_WS_WIN32 931 933 if (tl != NULL) … … 935 937 QFuture<void> f = QtConcurrent::run(&solver, &CTSPSolver::cleanup, false); 936 938 while (!f.isFinished()) { 937 Q Application::processEvents(QEventLoop::ExcludeUserInputEvents);939 QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents); 938 940 } 939 941 #else … … 1389 1391 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())); 1390 1392 } 1391 Q Application::processEvents();1393 QCoreApplication::processEvents(); 1392 1394 } 1393 1395 cur.movePosition(QTextCursor::End); … … 1417 1419 } 1418 1420 } 1419 Q Application::processEvents();1421 QCoreApplication::processEvents(); 1420 1422 } 1421 1423 … … 1438 1440 #ifndef QT_NO_STATUSTIP 1439 1441 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())); 1440 1445 #endif // QT_NO_STATUSTIP 1441 1446 … … 1457 1462 #endif // HANDHELD 1458 1463 1464 #ifndef QT_NO_STATUSTIP 1465 actionHelpReportBug->setStatusTip(tr("Report about a bug in %1").arg(QCoreApplication::applicationName())); 1466 #endif // QT_NO_STATUSTIP 1459 1467 if (actionHelpCheck4Updates != NULL) { 1460 1468 actionHelpCheck4Updates->setText(tr("Check for &Updates...")); 1461 1469 #ifndef QT_NO_STATUSTIP 1462 actionHelpCheck4Updates->setStatusTip(tr("Check for %1 updates").arg(Q Application::applicationName()));1470 actionHelpCheck4Updates->setStatusTip(tr("Check for %1 updates").arg(QCoreApplication::applicationName())); 1463 1471 #endif // QT_NO_STATUSTIP 1464 1472 } 1473 #ifndef QT_NO_STATUSTIP 1474 actionHelpAbout->setStatusTip(tr("About %1").arg(QCoreApplication::applicationName())); 1475 #endif // QT_NO_STATUSTIP 1465 1476 } 1466 1477 … … 1497 1508 { 1498 1509 this->fileName = fileName; 1499 setWindowTitle(QString("%1[*] - %2").arg(QFileInfo(fileName).completeBaseName()).arg(Q Application::applicationName()));1510 setWindowTitle(QString("%1[*] - %2").arg(QFileInfo(fileName).completeBaseName()).arg(QCoreApplication::applicationName())); 1500 1511 } 1501 1512 … … 1527 1538 actionHelpContents->setIcon(GET_ICON("help-contents")); 1528 1539 actionHelpContextual->setIcon(GET_ICON("help-contextual")); 1540 actionHelpOnlineSupport->setIcon(GET_ICON("applications-internet")); 1541 actionHelpReportBug->setIcon(GET_ICON("tools-report-bug")); 1529 1542 actionHelpAbout->setIcon(GET_ICON("help-about")); 1530 1543 actionHelpAboutQt->setIcon(QIcon(":/images/icons/"ICON_SIZE"/qtlogo."ICON_FORMAT)); … … 1672 1685 #endif // Q_WS_WIN32 1673 1686 } 1687 1688 void MainWindow::actionHelpOnlineSupportTriggered() 1689 { 1690 QDesktopServices::openUrl(QUrl("http://tspsg.info/goto/support")); 1691 } 1692 1693 void MainWindow::actionHelpReportBugTriggered() 1694 { 1695 QDesktopServices::openUrl(QUrl("http://tspsg.info/goto/bugtracker")); 1696 }
Note: See TracChangeset
for help on using the changeset viewer.