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
19 HelpWindow::HelpWindow(QWidget * parent/*= 0*/): QWidget(parent, Qt::Dialog)
21 setWindowTitle(tr("Virtual Jaguar Help"));
23 // 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 // QString s = QString(tr("SVN %1<br>")).arg(__DATE__);
37 QString s;// = QString("");
39 "<h1>Virtual Jaguar Documentation</h1>"
41 "<b><i>Coming soon!</i></b>"
43 text = new QTextBrowser;
45 layout->addWidget(text);
50 #include "htmlviewer.moc"
51 HtmlViewerWindow *htmlViewerWindow;
53 HtmlViewerWindow::HtmlViewerWindow() {
54 setObjectName("html-window");
56 setGeometryString(&config().geometry.htmlViewerWindow);
57 application.windowList.add(this);
59 layout = new QVBoxLayout;
60 layout->setMargin(Style::WindowMargin);
61 layout->setSpacing(0);
64 document = new QTextBrowser;
65 layout->addWidget(document);
68 void HtmlViewerWindow::show(const char *title, const char *htmlData) {
69 document->setHtml(string() << htmlData);
70 setWindowTitle(title);