Index: /trunk/install.pri
===================================================================
--- /trunk/install.pri (revision 141)
+++ /trunk/install.pri (revision 142)
@@ -35,9 +35,9 @@
# l10n.path = $$PREFIX/share/TSPSG/l10n
docs.path = $$PREFIX/share/doc/TSPSG-$$VERSION
- apps.files = resources/tspsg.desktop
- apps.path = $$PREFIX/share/applications/
+ desktop.files = resources/tspsg.desktop
+ desktop.path = $$PREFIX/share/applications
icon.files = resources/tspsg.png
icon.path = $$PREFIX/share/pixmaps
- INSTALLS += apps icon
+ INSTALLS += desktop icon
}
Index: /trunk/resources/desktop.qrc
===================================================================
--- /trunk/resources/desktop.qrc (revision 141)
+++ /trunk/resources/desktop.qrc (revision 142)
@@ -5,4 +5,5 @@
icons/l10n/flag-ua.png
icons/128x128/application-exit.png
+ icons/128x128/applications-internet.png
icons/128x128/configure-toolbars.png
icons/128x128/dialog-cancel.png
@@ -24,4 +25,5 @@
icons/128x128/preferences-desktop-theme.png
icons/128x128/preferences-system.png
+ icons/128x128/tools-report-bug.png
icons/128x128/qtlogo.png
icons/128x128/roll.png
Index: /trunk/src/mainwindow.cpp
===================================================================
--- /trunk/src/mainwindow.cpp (revision 141)
+++ /trunk/src/mainwindow.cpp (revision 142)
@@ -87,4 +87,6 @@
connect(actionSettingsStyleSystem, SIGNAL(triggered(bool)), SLOT(actionSettingsStyleSystemTriggered(bool)));
connect(groupSettingsStyleList, SIGNAL(triggered(QAction*)), SLOT(groupSettingsStyleListTriggered(QAction*)));
+ connect(actionHelpOnlineSupport, SIGNAL(triggered()), SLOT(actionHelpOnlineSupportTriggered()));
+ connect(actionHelpReportBug, SIGNAL(triggered()), SLOT(actionHelpReportBugTriggered()));
connect(actionHelpAboutQt, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
connect(actionHelpAbout, SIGNAL(triggered()), SLOT(actionHelpAboutTriggered()));
@@ -288,5 +290,5 @@
svg.setFileName(fi.path() + "/" + img);
svg.setTitle(tr("Solution Graph"));
- svg.setDescription(tr("Generated with %1").arg(QApplication::applicationName()));
+ svg.setDescription(tr("Generated with %1").arg(QCoreApplication::applicationName()));
QPainter p;
p.begin(&svg);
@@ -304,5 +306,5 @@
if (pic.supportsOption(QImageIOHandler::Description)) {
pic.setText("Title", "Solution Graph");
- pic.setText("Software", QApplication::applicationName());
+ pic.setText("Software", QCoreApplication::applicationName());
}
if (format == "png")
@@ -365,5 +367,5 @@
if (checked) {
settings->remove("Language");
- QMessageBox::information(this, tr("Language change"), tr("Language will be autodetected on the next %1 start.").arg(QApplication::applicationName()));
+ QMessageBox::information(this, tr("Language change"), tr("Language will be autodetected on the next %1 start.").arg(QCoreApplication::applicationName()));
} else
settings->setValue("Language", groupSettingsLanguageList->checkedAction()->data().toString());
@@ -404,5 +406,5 @@
if (checked) {
settings->remove("Style");
- QMessageBox::information(this, tr("Style Change"), tr("To apply the default style you need to restart %1.").arg(QApplication::applicationName()));
+ QMessageBox::information(this, tr("Style Change"), tr("To apply the default style you need to restart %1.").arg(QCoreApplication::applicationName()));
} else {
settings->setValue("Style", groupSettingsStyleList->checkedAction()->text());
@@ -452,8 +454,8 @@
QString title;
- title += QString("%1
").arg(QApplication::applicationName());
- title += QString("%1: %2
").arg(tr("Version"), QApplication::applicationVersion());
+ title += QString("%1
").arg(QCoreApplication::applicationName());
+ title += QString("%1: %2
").arg(tr("Version"), QCoreApplication::applicationVersion());
#ifndef HANDHELD
- title += QString("© 2007-%1 %3
").arg(QDate::currentDate().toString("yyyy"), QApplication::organizationDomain(), QApplication::organizationName());
+ title += QString("© 2007-%1 %3
").arg(QDate::currentDate().toString("yyyy"), QCoreApplication::organizationDomain(), QCoreApplication::organizationName());
#endif // HANDHELD
title += QString("http://tspsg.info/");
@@ -505,7 +507,7 @@
f.open(QIODevice::ReadOnly);
-QString translation = QApplication::translate("--------", "AUTHORS %1", "Please, provide translator credits here. %1 will be replaced with VERSION");
+QString translation = QCoreApplication::translate("--------", "AUTHORS %1", "Please, provide translator credits here. %1 will be replaced with VERSION");
if ((translation != "AUTHORS %1") && (translation.contains("%1"))) {
-QString about = QApplication::translate("--------", "VERSION", "Please, provide your translation version here.");
+QString about = QCoreApplication::translate("--------", "VERSION", "Please, provide your translation version here.");
if (about != "VERSION")
translation = translation.arg(about);
@@ -516,5 +518,5 @@
*lblTitle = new QLabel(dlg);
#ifdef HANDHELD
-QLabel *lblSubTitle = new QLabel(QString("© 2007-%1 %3").arg(QDate::currentDate().toString("yyyy"), QApplication::organizationDomain(), QApplication::organizationName()), dlg);
+QLabel *lblSubTitle = new QLabel(QString("© 2007-%1 %3").arg(QDate::currentDate().toString("yyyy"), QCoreApplication::organizationDomain(), QCoreApplication::organizationName()), dlg);
#endif // HANDHELD
QTabWidget *tabs = new QTabWidget(dlg);
@@ -596,5 +598,5 @@
dlg->setWindowFlags(Qt::Dialog | Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint);
- dlg->setWindowTitle(tr("About %1").arg(QApplication::applicationName()));
+ dlg->setWindowTitle(tr("About %1").arg(QCoreApplication::applicationName()));
dlg->setWindowIcon(GET_ICON("help-about"));
dlg->setLayout(vb);
@@ -654,5 +656,5 @@
QPushButton *cancel = new QPushButton(&pd);
cancel->setIcon(GET_ICON("dialog-cancel"));
- cancel->setText(QApplication::translate("QProgressDialog", "Cancel", "No need to translate this. This translation will be taken from Qt translation files."));
+ cancel->setText(QCoreApplication::translate("QProgressDialog", "Cancel", "No need to translate this. This translation will be taken from Qt translation files."));
pd.setCancelButton(cancel);
pd.setMaximum(n);
@@ -713,10 +715,10 @@
tl->SetProgressState(winId(), TBPF_INDETERMINATE);
#endif
- QApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
+ QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
#ifndef QT_NO_CONCURRENT
QFuture f = QtConcurrent::run(&solver, &CTSPSolver::cleanup, false);
while (!f.isFinished()) {
- QApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
+ QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
}
#else
@@ -795,5 +797,5 @@
pd.setCancelButton(NULL);
pd.show();
- QApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
+ QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
#ifdef Q_WS_WIN32
if (tl != NULL)
@@ -803,5 +805,5 @@
QFuture f = QtConcurrent::run(&solver, &CTSPSolver::cleanup, false);
while (!f.isFinished()) {
- QApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
+ QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
}
#else
@@ -927,5 +929,5 @@
pd.setMaximum(0);
pd.setCancelButton(NULL);
- QApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
+ QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
#ifdef Q_WS_WIN32
if (tl != NULL)
@@ -935,5 +937,5 @@
QFuture f = QtConcurrent::run(&solver, &CTSPSolver::cleanup, false);
while (!f.isFinished()) {
- QApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
+ QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
}
#else
@@ -1389,5 +1391,5 @@
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()));
}
- QApplication::processEvents();
+ QCoreApplication::processEvents();
}
cur.movePosition(QTextCursor::End);
@@ -1417,5 +1419,5 @@
}
}
- QApplication::processEvents();
+ QCoreApplication::processEvents();
}
@@ -1438,4 +1440,7 @@
#ifndef QT_NO_STATUSTIP
actionFilePrintPreview->setStatusTip(tr("Preview current solution results before printing"));
+#endif // QT_NO_STATUSTIP
+#ifndef QT_NO_STATUSTIP
+ actionFileExit->setStatusTip(tr("Exit %1").arg(QCoreApplication::applicationName()));
#endif // QT_NO_STATUSTIP
@@ -1457,10 +1462,16 @@
#endif // HANDHELD
+#ifndef QT_NO_STATUSTIP
+ actionHelpReportBug->setStatusTip(tr("Report about a bug in %1").arg(QCoreApplication::applicationName()));
+#endif // QT_NO_STATUSTIP
if (actionHelpCheck4Updates != NULL) {
actionHelpCheck4Updates->setText(tr("Check for &Updates..."));
#ifndef QT_NO_STATUSTIP
- actionHelpCheck4Updates->setStatusTip(tr("Check for %1 updates").arg(QApplication::applicationName()));
+ actionHelpCheck4Updates->setStatusTip(tr("Check for %1 updates").arg(QCoreApplication::applicationName()));
#endif // QT_NO_STATUSTIP
}
+#ifndef QT_NO_STATUSTIP
+ actionHelpAbout->setStatusTip(tr("About %1").arg(QCoreApplication::applicationName()));
+#endif // QT_NO_STATUSTIP
}
@@ -1497,5 +1508,5 @@
{
this->fileName = fileName;
- setWindowTitle(QString("%1[*] - %2").arg(QFileInfo(fileName).completeBaseName()).arg(QApplication::applicationName()));
+ setWindowTitle(QString("%1[*] - %2").arg(QFileInfo(fileName).completeBaseName()).arg(QCoreApplication::applicationName()));
}
@@ -1527,4 +1538,6 @@
actionHelpContents->setIcon(GET_ICON("help-contents"));
actionHelpContextual->setIcon(GET_ICON("help-contextual"));
+ actionHelpOnlineSupport->setIcon(GET_ICON("applications-internet"));
+ actionHelpReportBug->setIcon(GET_ICON("tools-report-bug"));
actionHelpAbout->setIcon(GET_ICON("help-about"));
actionHelpAboutQt->setIcon(QIcon(":/images/icons/"ICON_SIZE"/qtlogo."ICON_FORMAT));
@@ -1672,2 +1685,12 @@
#endif // Q_WS_WIN32
}
+
+void MainWindow::actionHelpOnlineSupportTriggered()
+{
+ QDesktopServices::openUrl(QUrl("http://tspsg.info/goto/support"));
+}
+
+void MainWindow::actionHelpReportBugTriggered()
+{
+ QDesktopServices::openUrl(QUrl("http://tspsg.info/goto/bugtracker"));
+}
Index: /trunk/src/mainwindow.h
===================================================================
--- /trunk/src/mainwindow.h (revision 141)
+++ /trunk/src/mainwindow.h (revision 142)
@@ -74,4 +74,6 @@
void actionSettingsToolbarsConfigureTriggered();
#endif // HANDHELD
+ void actionHelpOnlineSupportTriggered();
+ void actionHelpReportBugTriggered();
void actionHelpCheck4UpdatesTriggered();
void actionHelpAboutTriggered();
Index: /trunk/ui/mainwindow.ui
===================================================================
--- /trunk/ui/mainwindow.ui (revision 141)
+++ /trunk/ui/mainwindow.ui (revision 142)
@@ -299,4 +299,7 @@
+
+
+
@@ -409,14 +412,8 @@
&About TSPSG...
-
- About application
-
E&xit
-
-
- Exit application
@@ -503,4 +500,17 @@
Automatically choose the most appropriate style
+
+
+
+
+ Online &Support...
+
+
+ Get support online
+
+
+
+
+ Report a &Bug...