2 // help.cpp - Help file
5 // (C) 2011 Underground Software
7 // JLH = James L. Hammons <jlhamm@acm.org>
10 // --- ---------- -------------------------------------------------------------
11 // JLH 08/01/2011 Created this file
20 HelpWindow::HelpWindow(QWidget * parent/*= 0*/): QWidget(parent, Qt::Dialog)
22 setWindowTitle(tr("Virtual Jaguar Help"));
24 // Need to set the size as well...
27 layout = new QVBoxLayout();
28 // layout->setSizeConstraint(QLayout::SetFixedSize);
31 // image = new QLabel();
32 // image->setAlignment(Qt::AlignRight);
33 // image->setPixmap(QPixmap(":/res/vj_title_small.png"));
34 // layout->addWidget(image);
36 text = new QTextBrowser;
37 text->setSource(QUrl("qrc:/res/help.html"));
38 layout->addWidget(text);
45 #include "htmlviewer.moc"
46 HtmlViewerWindow *htmlViewerWindow;
48 HtmlViewerWindow::HtmlViewerWindow() {
49 setObjectName("html-window");
51 setGeometryString(&config().geometry.htmlViewerWindow);
52 application.windowList.add(this);
54 layout = new QVBoxLayout;
55 layout->setMargin(Style::WindowMargin);
56 layout->setSpacing(0);
59 document = new QTextBrowser;
60 layout->addWidget(document);
63 void HtmlViewerWindow::show(const char *title, const char *htmlData) {
64 document->setHtml(string() << htmlData);
65 setWindowTitle(title);