20 QTextBrowser* helpBrowser;
24 QWidget* browserspace =
new QWidget(tab);
25 helpBrowser =
new QTextBrowser(browserspace);
26 tab->addTab(browserspace,
"Help");
27 char * path = getenv(
"RP_SeExpr2");
29 helpBrowser->setSource(QString(
"%1/share/doc/SeExpr2/SeExpressions.html").arg(path));
31 QPushButton* backPb =
new QPushButton(
"Back");
32 backPb->setEnabled(
false);
33 QPushButton* forwardPb =
new QPushButton(
"Forward");
34 forwardPb->setEnabled(
false);
36 QVBoxLayout * helpLayout =
new QVBoxLayout(browserspace);
37 QHBoxLayout * helpPbLayout =
new QHBoxLayout;
38 helpLayout->addLayout(helpPbLayout);
39 helpPbLayout->addWidget(backPb);
40 helpPbLayout->addWidget(forwardPb);
41 helpPbLayout->addItem(
new QSpacerItem(0,0, QSizePolicy::MinimumExpanding,
42 QSizePolicy::Minimum));
43 helpLayout->addWidget(helpBrowser,
true);
44 helpBrowser->setMinimumHeight(120);
47 connect(backPb, SIGNAL(clicked()), helpBrowser, SLOT(backward()));
48 connect(forwardPb, SIGNAL(clicked()), helpBrowser, SLOT(forward()));
49 connect(helpBrowser, SIGNAL(backwardAvailable(
bool)), backPb, SLOT(setEnabled(
bool)));
50 connect(helpBrowser, SIGNAL(forwardAvailable(
bool)), forwardPb, SLOT(setEnabled(
bool)));