]> Shamusworld >> Repos - virtualjaguar/blob - src/gui/help.cpp
8c8c98d588454673d67b1d45f18fb8f4bc5d960f
[virtualjaguar] / src / gui / help.cpp
1 //
2 // help.cpp - Help file
3 //
4 // by James L. Hammons
5 // (C) 2011 Underground Software
6 //
7 // JLH = James L. Hammons <jlhamm@acm.org>
8 //
9 // Who  When        What
10 // ---  ----------  -------------------------------------------------------------
11 // JLH  08/01/2011  Created this file
12 //
13
14 // STILL TO DO:
15 //
16
17 #include "help.h"
18
19
20 HelpWindow::HelpWindow(QWidget * parent/*= 0*/): QWidget(parent, Qt::Dialog)
21 {
22         setWindowTitle(tr("Virtual Jaguar Help"));
23
24         // Need to set the size as well...
25         resize(560, 480);
26
27         layout = new QVBoxLayout();
28 //      layout->setSizeConstraint(QLayout::SetFixedSize);
29         setLayout(layout);
30
31 //      image = new QLabel();
32 //      image->setAlignment(Qt::AlignRight);
33 //      image->setPixmap(QPixmap(":/res/vj_title_small.png"));
34 //      layout->addWidget(image);
35
36         text = new QTextBrowser;
37         text->setSource(QUrl("qrc:/res/help.html"));
38         layout->addWidget(text);
39 }
40
41 #if 0
42 label size is 365x168
43 scaled(365, 168
44
45 #include "htmlviewer.moc"
46 HtmlViewerWindow *htmlViewerWindow;
47
48 HtmlViewerWindow::HtmlViewerWindow() {
49   setObjectName("html-window");
50   resize(560, 480);
51   setGeometryString(&config().geometry.htmlViewerWindow);
52   application.windowList.add(this);
53
54   layout = new QVBoxLayout;
55   layout->setMargin(Style::WindowMargin);
56   layout->setSpacing(0);
57   setLayout(layout);
58
59   document = new QTextBrowser;
60   layout->addWidget(document);
61 }
62
63 void HtmlViewerWindow::show(const char *title, const char *htmlData) {
64   document->setHtml(string() << htmlData);
65   setWindowTitle(title);
66   Window::show();
67 }
68 #endif