summaryrefslogtreecommitdiff
path: root/ui/qt5/horizonhelpwindow.cc
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2019-11-08 02:38:58 -0600
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2019-11-08 02:38:58 -0600
commit386ff62ca3aba790f9831ee7c194d24f6fb781fe (patch)
tree9bb4233e965f3fe71224fd0a5983c1e631787ae4 /ui/qt5/horizonhelpwindow.cc
parent561db34595bd4181fde3781d3a00bab9a6d1403f (diff)
downloadhorizon-386ff62ca3aba790f9831ee7c194d24f6fb781fe.tar.gz
horizon-386ff62ca3aba790f9831ee7c194d24f6fb781fe.tar.bz2
horizon-386ff62ca3aba790f9831ee7c194d24f6fb781fe.tar.xz
horizon-386ff62ca3aba790f9831ee7c194d24f6fb781fe.zip
UI: Import some of the 2016 prototype - welcome to Qt UI development
Diffstat (limited to 'ui/qt5/horizonhelpwindow.cc')
-rw-r--r--ui/qt5/horizonhelpwindow.cc29
1 files changed, 29 insertions, 0 deletions
diff --git a/ui/qt5/horizonhelpwindow.cc b/ui/qt5/horizonhelpwindow.cc
new file mode 100644
index 0000000..e38fefa
--- /dev/null
+++ b/ui/qt5/horizonhelpwindow.cc
@@ -0,0 +1,29 @@
+#include "horizonhelpwindow.hh"
+
+#include <QDialogButtonBox>
+#include <QTextEdit>
+#include <QVBoxLayout>
+
+HorizonHelpWindow::HorizonHelpWindow(QFile *helpFile, QWidget *parent) :
+ QDialog(parent), helpFile(helpFile) {
+ QDialogButtonBox *buttonBox;
+ QTextEdit *helpText;
+ QVBoxLayout *layout;
+
+ setFixedSize(QSize(600, 400));
+ setSizeGripEnabled(false);
+ setWindowTitle("Horizon Help");
+
+ helpText = new QTextEdit(this);
+ helpText->setReadOnly(true);
+ helpText->setHtml(helpFile->readAll().toStdString().c_str());
+
+ buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok, this);
+ connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept);
+
+ layout = new QVBoxLayout();
+ layout->addWidget(helpText);
+ layout->addWidget(buttonBox);
+
+ setLayout(layout);
+}