aboutsummaryrefslogtreecommitdiff
path: root/qmphelpwindow.cpp
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2016-01-04 23:50:11 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2016-01-04 23:50:11 +0800
commit8099672c3fd0bfc7804b0a92d05c57dcd4307268 (patch)
treeabef139577986617a3fa31f31474ab9cd8b4627f /qmphelpwindow.cpp
parent84634010422f578b27105bbbaf6b8ee4c1232e86 (diff)
downloadQMidiPlayer-8099672c3fd0bfc7804b0a92d05c57dcd4307268.tar.xz
Shadow Pow"d"er. (WTF)
Diffstat (limited to 'qmphelpwindow.cpp')
-rw-r--r--qmphelpwindow.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/qmphelpwindow.cpp b/qmphelpwindow.cpp
new file mode 100644
index 0000000..8b99ab2
--- /dev/null
+++ b/qmphelpwindow.cpp
@@ -0,0 +1,27 @@
+#include "qmphelpwindow.hpp"
+#include "ui_qmphelpwindow.h"
+
+qmpHelpWindow::qmpHelpWindow(QWidget *parent) :
+ QDialog(parent),
+ ui(new Ui::qmpHelpWindow)
+{
+ ui->setupUi(this);
+ ui->textBrowser->setSearchPaths(QStringList(QString(":/doc"))+QStringList(QString(":/img")));
+ ui->textBrowser->setSource(QUrl("qrc:///doc/index.html"));
+}
+
+qmpHelpWindow::~qmpHelpWindow()
+{
+ delete ui;
+}
+
+void qmpHelpWindow::on_textBrowser_sourceChanged(const QUrl &src)
+{
+ if(src.fileName()==QString("version.html"))
+ {
+ QString s=ui->textBrowser->toHtml();
+ s.replace("QT_VERSION_STR",QT_VERSION_STR);
+ s.replace("APP_VERSION",APP_VERSION);
+ ui->textBrowser->setHtml(s);
+ }
+}