-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpqTrackFilterPanel.cxx
More file actions
57 lines (45 loc) · 1.4 KB
/
pqTrackFilterPanel.cxx
File metadata and controls
57 lines (45 loc) · 1.4 KB
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
#include "pqTrackFilterPanel.h"
#include <QObject>
#include <QLayout>
#include <QLabel>
#include <QComboBox>
#include "pqSMAdaptor.h"
#include "vtkSMProperty.h"
#include "vtkSMPropertyHelper.h"
#include "pqProxy.h"
#include "vtkSMProxy.h"
pqTrackFilterPanel::pqTrackFilterPanel(pqProxy* pxy, QWidget* p): pqAutoGeneratedObjectPanel(pxy, p)
{
//this->layout()->addWidget(new QLabel("This is from a plugin", this));
this->RestrictionArray = this->findChild<QComboBox*>("SelectRestrictionArray");
this->RestrictionBounds_0 = this->findChild<QLineEdit*>("RestrictionLow");
this->RestrictionBounds_1 = this->findChild<QLineEdit*>("RestrictionHi");
this->RestrictionBounds_0->setEnabled(false);
this->RestrictionBounds_1->setEnabled(false);
this->RestrictionArray->setEnabled(false);
QComboBox * comboB = this->findChild<QComboBox*>("Mode");
QObject::connect(
comboB,
SIGNAL(currentIndexChanged(int)),
this,
SLOT(ModeChanged(int))
);
}
pqTrackFilterPanel::~pqTrackFilterPanel()
{
}
void pqTrackFilterPanel::ModeChanged(int selection)
{
if (selection==2)
{
this->RestrictionBounds_0->setEnabled(true);
this->RestrictionBounds_1->setEnabled(true);
this->RestrictionArray->setEnabled(true);
}
else
{
this->RestrictionBounds_0->setEnabled(false);
this->RestrictionBounds_1->setEnabled(false);
this->RestrictionArray->setEnabled(false);
}
}