SeExpr
ExprHelp.h
Go to the documentation of this file.
1 /*
2 * Copyright Disney Enterprises, Inc. All rights reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License
6 * and the following modification to it: Section 6 Trademarks.
7 * deleted and replaced with:
8 *
9 * 6. Trademarks. This License does not grant permission to use the
10 * trade names, trademarks, service marks, or product names of the
11 * Licensor and its affiliates, except as required for reproducing
12 * the content of the NOTICE file.
13 *
14 * You may obtain a copy of the License at
15 * http://www.apache.org/licenses/LICENSE-2.0
16 */
17 #if 0
18 header
19 
20  QTextBrowser* helpBrowser;
21 
22 constructor
23 
24  QWidget* browserspace = new QWidget(tab);
25  helpBrowser = new QTextBrowser(browserspace);
26  tab->addTab(browserspace, "Help");
27  char * path = getenv("RP_SeExpr2");
28  if (path)
29  helpBrowser->setSource(QString("%1/share/doc/SeExpr2/SeExpressions.html").arg(path));
30 
31  QPushButton* backPb = new QPushButton("Back");
32  backPb->setEnabled(false);
33  QPushButton* forwardPb = new QPushButton("Forward");
34  forwardPb->setEnabled(false);
35 
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, /*stretch*/ true);
44  helpBrowser->setMinimumHeight(120);
45 
46  // wire up help browser forward/back buttons
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)));
51 #endif