36 this->setMinimumWidth(600);
37 QVBoxLayout* rootLayout =
new QVBoxLayout(0);
38 rootLayout->setMargin(2);
39 this->setLayout(rootLayout);
44 QSplitter* vsplitter =
new QSplitter(Qt::Vertical,
this);
45 rootLayout->addWidget(vsplitter);
47 QTabWidget* topTabWidget =
new QTabWidget();
48 vsplitter->addWidget(topTabWidget);
50 QWidget* previewLibraryWidget =
new QWidget();
51 QHBoxLayout* previewLibraryLayout =
new QHBoxLayout();
52 previewLibraryWidget->setLayout(previewLibraryLayout);
53 topTabWidget->addTab(previewLibraryWidget,
"Preview / Library");
55 QWidget* bottomWidget =
new QWidget();
56 vsplitter->addWidget(bottomWidget);
57 QVBoxLayout* bottomLayout =
new QVBoxLayout();
58 bottomLayout->setMargin(1);
59 bottomWidget->setLayout(bottomLayout);
62 QWidget* leftWidget =
new QWidget();
63 leftWidget->setFixedWidth(450);
64 QVBoxLayout* leftLayout =
new QVBoxLayout();
65 leftLayout->setMargin(0);
66 leftWidget->setLayout(leftLayout);
67 QHBoxLayout* previewLayout =
new QHBoxLayout();
69 previewLayout->addWidget(
grapher, 0);
72 leftLayout->addLayout(previewLayout);
73 previewLibraryLayout->addWidget(leftWidget);
77 QHBoxLayout* buttonBarLayout =
new QHBoxLayout();
79 buttonBarLayout->setMargin(1);
91 bottomLayout->addLayout(buttonBarLayout);
96 QScrollArea* scrollArea =
new QScrollArea();
99 scrollArea->setFocusPolicy(Qt::NoFocus);
100 scrollArea->setMinimumHeight(100);
101 scrollArea->setFixedWidth(450);
102 scrollArea->setWidgetResizable(
true);
103 leftLayout->addWidget(scrollArea, 1);
110 bottomLayout->addWidget(
editor);
114 previewLibraryLayout->addWidget(
browser);
117 QHBoxLayout* buttonLayout =
new QHBoxLayout(0);
118 buttonLayout->addItem(
new QSpacerItem(0, 0, QSizePolicy::MinimumExpanding, QSizePolicy::Minimum));
128 rootLayout->addLayout(buttonLayout);
216 QWidget* browserspace =
new QWidget(tab);
218 tab->addTab(browserspace,
"Help");
221 QFile* helpDoc =
new QFile(QCoreApplication::applicationDirPath() +
"/../share/doc/SeExpr2/SeExpressions.html");
222 if (helpDoc->exists()) {
224 "body {background-color: #eeeeee; color: #000000;} \na {color: #3333ff; text-decoration: none;}\n";
225 helpBrowser->document()->setDefaultStyleSheet(sheet);
229 QPushButton* backPb =
new QPushButton(
"Back");
231 backPb->setEnabled(
false);
232 QPushButton* forwardPb =
new QPushButton(
"Forward");
234 forwardPb->setEnabled(
false);
236 QVBoxLayout* helpLayout =
new QVBoxLayout(browserspace);
237 QHBoxLayout* helpPbLayout =
new QHBoxLayout;
238 helpLayout->addLayout(helpPbLayout);
239 helpPbLayout->addWidget(backPb);
240 helpPbLayout->addWidget(forwardPb);
243 QHBoxLayout* findBar =
new QHBoxLayout();
244 helpPbLayout->addWidget(
new QLabel(
"Find"),
false);
248 QPushButton* nextButton =
new QPushButton(
"Find Next");
249 QPushButton* prevButton =
new QPushButton(
"Find Prev");
250 helpPbLayout->addWidget(nextButton,
false);
251 helpPbLayout->addWidget(prevButton,
false);
252 connect(nextButton, SIGNAL(clicked()),
this, SLOT(
findNextInHelp()));
253 connect(prevButton, SIGNAL(clicked()),
this, SLOT(
findPrevInHelp()));
254 helpPbLayout->addLayout(findBar,
false);
259 connect(backPb, SIGNAL(clicked()),
helpBrowser, SLOT(backward()));
260 connect(forwardPb, SIGNAL(clicked()),
helpBrowser, SLOT(forward()));
261 connect(
helpBrowser, SIGNAL(backwardAvailable(
bool)), backPb, SLOT(setEnabled(
bool)));
262 connect(
helpBrowser, SIGNAL(forwardAvailable(
bool)), forwardPb, SLOT(setEnabled(
bool)));