ParaView
Qt
Components
pqFieldSelectionAdaptor.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: ParaView
4
Module: pqFieldSelectionAdaptor.h
5
6
Copyright (c) 2005-2008 Sandia Corporation, Kitware Inc.
7
All rights reserved.
8
9
ParaView is a free software; you can redistribute it and/or modify it
10
under the terms of the ParaView license version 1.2.
11
12
See License_v1.2.txt for the full ParaView license.
13
A copy of this license can be obtained by contacting
14
Kitware Inc.
15
28 Corporate Drive
16
Clifton Park, NY 12065
17
USA
18
19
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR
23
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
31
=========================================================================*/
32
33
#ifndef pq_FieldSelectionAdaptor_h
34
#define pq_FieldSelectionAdaptor_h
35
36
#include <QObject>
37
#include <QString>
38
#include <QStringList>
39
class
QComboBox;
40
#include "vtkSmartPointer.h"
41
class
vtkSMProperty
;
42
class
vtkSMDomain
;
43
class
vtkObject;
44
class
vtkCommand;
45
class
vtkEventQtSlotConnect;
46
#include "pqComponentsModule.h"
47
53
class
PQCOMPONENTS_EXPORT
pqFieldSelectionAdaptor
:
public
QObject
54
{
55
Q_OBJECT
56
Q_PROPERTY(QString attributeMode READ attributeMode WRITE setAttributeMode)
57
Q_PROPERTY(QString scalar READ scalar WRITE setScalar)
58
Q_PROPERTY(QStringList selection READ selection WRITE setSelection)
59
60
public:
64
pqFieldSelectionAdaptor
(QComboBox* p,
vtkSMProperty
* prop);
65
~
pqFieldSelectionAdaptor
();
66
70
QString attributeMode() const;
74
QString scalar() const;
75
76
void
setSelection(const QStringList& selection);
77
QStringList selection() const;
78
79
signals:
83
void
selectionChanged();
84
85
public slots:
89
void
setAttributeMode(const QString&);
93
void
setScalar(const QString&);
94
95
// set the attribute mode and scalar
96
void
setAttributeModeAndScalar(const QString& mode, const QString& scalar);
97
98
protected slots:
99
void
updateGUI();
100
void
indexChanged(
int
index);
101
102
void
domainChanged();
103
private slots:
104
void
internalDomainChanged();
105
void
blockDomainModified(vtkObject* caller,
unsigned
long
,
void
*,
void
*, vtkCommand*);
106
107
protected:
108
QStringList Selection;
109
vtkSmartPointer<
vtkSMProperty
> Property;
110
vtkSmartPointer<
vtkSMDomain
> AttributeModeDomain;
111
vtkSmartPointer<
vtkSMDomain
> ScalarDomain;
112
vtkEventQtSlotConnect* Connection;
113
bool
MarkedForUpdate;
114
bool
IsGettingAllDomains;
115
};
116
117
#endif // pq_FieldSelectionAdaptor_h
vtkSMProperty
superclass for all SM properties
Definition:
vtkSMProperty.h:149
vtkSMDomain
represents the possible values a property can have
Definition:
vtkSMDomain.h:48
pqFieldSelectionAdaptor
adaptor to which combines cell & point arrays into one selection this adaptor also takes care of the doma...
Definition:
pqFieldSelectionAdaptor.h:53
Generated by
1.8.13