diff --git a/data/about.txt b/data/about.txt new file mode 100644 index 0000000000..91925c6242 --- /dev/null +++ b/data/about.txt @@ -0,0 +1,3 @@ +

MapsWithMe is an Offline Maps application.

+ +
Insert your licensing information here
diff --git a/qt/mainwindow.cpp b/qt/mainwindow.cpp index 873f80d013..eff2859f66 100644 --- a/qt/mainwindow.cpp +++ b/qt/mainwindow.cpp @@ -14,6 +14,10 @@ #include #include #include +#include +#include +#include +#include #include "../base/start_mem_debug.hpp" @@ -32,6 +36,10 @@ MainWindow::MainWindow() setWindowTitle(tr("MapsWithMe")); + QMenu * helpMenu = new QMenu(tr("Help"), this); + menuBar()->addMenu(helpMenu); + helpMenu->addAction(tr("About"), this, SLOT(OnAbout())); + LoadState(); } @@ -216,4 +224,15 @@ void MainWindow::ShowClassifPanel() m_pClassifDock->show(); } +void MainWindow::OnAbout() +{ + QFile file(GetPlatform().ReadPathForFile("about.txt").c_str()); + if (file.open(QIODevice::ReadOnly)) + { + QByteArray data = file.readAll(); + QMessageBox::about(this, QMenuBar::tr("About"), data); + file.close(); + } +} + } diff --git a/qt/mainwindow.hpp b/qt/mainwindow.hpp index 95882fc53b..17b9fc72fa 100644 --- a/qt/mainwindow.hpp +++ b/qt/mainwindow.hpp @@ -42,6 +42,7 @@ namespace qt //void OnFeatureClicked(int row, int col); void ShowUpdateDialog(); void ShowClassifPanel(); + void OnAbout(); }; }