00001
00042 #include "aihelp.hpp"
00043
00044 using namespace AiFractals;
00045
00046 AiHelp::AiHelp( QWidget * parent)
00047 : QWidget ( parent )
00048 {
00049
00050 QPushButton * back = new QPushButton( tr("Back") );
00051 QPushButton * forward = new QPushButton( tr("Forward") );
00052 QPushButton * reload = new QPushButton( tr("Reload") );
00053 QPushButton * stop = new QPushButton( tr("Stop") );
00054 QHBoxLayout * hbox = new QHBoxLayout();
00055 QVBoxLayout * vbox = new QVBoxLayout();
00056 QWebView * web = new QWebView();
00057
00058
00059 this->connect( back, SIGNAL(clicked()), web, SLOT(back()) );
00060 this->connect( forward, SIGNAL(clicked()), web, SLOT(forward()) );
00061 this->connect( reload, SIGNAL(clicked()), web, SLOT(reload()) );
00062 this->connect( stop, SIGNAL(clicked()), web, SLOT(stop()) );
00063
00064 back->setIcon( QIcon(tr(":/png/back")) );
00065 forward->setIcon( QIcon(tr(":/png/forward")) );
00066 reload->setIcon( QIcon(tr(":/png/refresh")) );
00067 stop->setIcon( QIcon(tr(":/png/stop")) );
00068
00069 web->load( QUrl("help/html/index.html") );
00070
00071 hbox->addWidget( back );
00072 hbox->addWidget( forward );
00073 hbox->addWidget( reload );
00074 hbox->addWidget( stop );
00075 vbox->addLayout( hbox );
00076 vbox->addWidget( web );
00077 this->setLayout( vbox );
00078 }