--- trunk/DocumentationWin.cpp.orig 2010-06-30 22:21:59 +0400 +++ trunk/DocumentationWin.cpp 2010-11-04 13:32:35 +0300 @@ -25,25 +25,21 @@ using namespace std; DocumentationWin::DocumentationWin (QWidget * parent) :QDialog(parent) { - //QString localecode = ((MainWindow *) parent)->localecode; - + QString localecode = ((MainWindow *) parent)->localecode; + QString helpfile; + resize(700,500); - - docs = new QWebView(); - toolbar = new QToolBar(tr("Help Navigation")); - toolbar->addAction(docs->pageAction(QWebPage::Back)); - toolbar->addAction(docs->pageAction(QWebPage::Forward)); - // - layout = new QVBoxLayout; - layout->addWidget(toolbar); - layout->addWidget(docs); - - this->setLayout(layout); - this->show(); - - docs->load(QString("http://doc.basic256.org")); - docs->show(); - + docs = new QTextBrowser( this ); + helpfile = "index.html"; + + docs->setSearchPaths(QStringList() << "./help" << "/usr/share/basic256/help/"+localecode.left(2) << "/usr/share/basic256/help/en"); + docs->setSource(QUrl(QString(helpfile))); +} + +void DocumentationWin::resizeEvent(QResizeEvent *e) { + docs->resize(size()); } + + --- trunk/DocumentationWin.h.orig 2010-06-30 22:21:59 +0400 +++ trunk/DocumentationWin.h 2010-11-04 13:40:50 +0300 @@ -19,15 +19,7 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include #ifndef DOCUMENTATIONWINH @@ -36,16 +28,15 @@ class DocumentationWin : public QDialog { Q_OBJECT; - public: - DocumentationWin(QWidget * parent); + public: + DocumentationWin(QWidget * parent); + void resizeEvent(QResizeEvent *e); -private slots: - - private: - QVBoxLayout* layout; - QToolBar* toolbar; - QWebView* docs; + public slots: + private: + QTextBrowser* docs; }; #endif +