-
Notifications
You must be signed in to change notification settings - Fork 1
/
pqActiveLeapViewOptions.cxx
78 lines (65 loc) · 1.91 KB
/
pqActiveLeapViewOptions.cxx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
/*=========================================================================
=========================================================================*/
#include "pqActiveLeapViewOptions.h"
#include <QPointer>
#include "pqOptionsDialog.h"
#include "pqRenderViewOptions.h"
class pqActiveLeapViewOptions::pqInternal
{
public:
QPointer<pqOptionsDialog> Dialog;
pqRenderViewOptions* GeneralOptions;
};
pqActiveLeapViewOptions::pqActiveLeapViewOptions(QObject *parentObject)
: pqActiveViewOptions(parentObject)
{
this->Internal = new pqInternal;
}
pqActiveLeapViewOptions::~pqActiveLeapViewOptions()
{
delete this->Internal;
}
void pqActiveLeapViewOptions::showOptions(
pqView *view, const QString &page, QWidget *widgetParent)
{
if(!this->Internal->Dialog)
{
this->Internal->Dialog = new pqOptionsDialog(widgetParent);
this->Internal->Dialog->setApplyNeeded(true);
this->Internal->Dialog->setObjectName("ActiveRenderViewOptions");
this->Internal->Dialog->setWindowTitle("View Settings (Render View)");
this->Internal->GeneralOptions = new pqRenderViewOptions;
this->Internal->Dialog->addOptions(this->Internal->GeneralOptions);
if(page.isEmpty())
{
QStringList pages = this->Internal->GeneralOptions->getPageList();
if(pages.size())
{
this->Internal->Dialog->setCurrentPage(pages[0]);
}
}
else
{
this->Internal->Dialog->setCurrentPage(page);
}
this->connect(this->Internal->Dialog, SIGNAL(finished(int)),
this, SLOT(finishDialog()));
}
this->changeView(view);
this->Internal->Dialog->show();
}
void pqActiveLeapViewOptions::changeView(pqView *view)
{
this->Internal->GeneralOptions->setView(view);
}
void pqActiveLeapViewOptions::closeOptions()
{
if(this->Internal->Dialog)
{
this->Internal->Dialog->accept();
}
}
void pqActiveLeapViewOptions::finishDialog()
{
emit this->optionsClosed(this);
}