This file is indexed.

/usr/include/paraview/pqSMAdaptor.h is in paraview-dev 5.0.1+dfsg1-4.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
/*=========================================================================

   Program: ParaView
   Module:    pqSMAdaptor.h

   Copyright (c) 2005-2008 Sandia Corporation, Kitware Inc.
   All rights reserved.

   ParaView is a free software; you can redistribute it and/or modify it
   under the terms of the ParaView license version 1.2. 

   See License_v1.2.txt for the full ParaView license.
   A copy of this license can be obtained by contacting
   Kitware Inc.
   28 Corporate Drive
   Clifton Park, NY 12065
   USA

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

=========================================================================*/

#ifndef _pqSMAdaptor_h
#define _pqSMAdaptor_h

class vtkSMProperty;
class vtkSMProxy;
class vtkObject;

#include "pqCoreModule.h"
#include <QVariant>
#include <QList>
#include <QPair>
#include "pqSMProxy.h"
#include "vtkVariant.h"

Q_DECLARE_METATYPE(QList<QList<QVariant> >)

/// Translates server manager events into Qt-compatible slots and signals
class PQCORE_EXPORT pqSMAdaptor
{
protected: 
  // class not instantiated
  pqSMAdaptor();
  ~pqSMAdaptor();

private:
  static const int metaId;

public:

  /// enumeration for types of properties this class handles
  enum PropertyType
    {
    UNKNOWN,
    PROXY,
    PROXYLIST,
    PROXYSELECTION,
    SELECTION,
    ENUMERATION,
    SINGLE_ELEMENT,
    MULTIPLE_ELEMENTS,
    FILE_LIST,
    FIELD_SELECTION,
    COMPOSITE_TREE,
    SIL,
    };

  enum PropertyValueType
    {
    CHECKED,
    UNCHECKED
    };

  /// Get the type of the property
  static PropertyType getPropertyType(vtkSMProperty* Property);

  /// get the proxy for a property
  /// for example, glyph filter accepts a source (proxy) to glyph with
  static pqSMProxy getProxyProperty(vtkSMProperty* Property,
                                    PropertyValueType Type = CHECKED);

  /// get the proxy for a property
  /// for example, glyph filter accepts a source (proxy) to glyph with
  static void addProxyProperty(vtkSMProperty* Property, 
                               pqSMProxy Value);
  static void removeProxyProperty(vtkSMProperty* Property,
                                  pqSMProxy Value);
  static void setProxyProperty(vtkSMProperty* Property, 
                               pqSMProxy Value);
  static void setUncheckedProxyProperty(vtkSMProperty* Property, 
                                        pqSMProxy Value);
  static void addInputProperty(vtkSMProperty* Property, 
                               pqSMProxy Value, int opport);
  static void setInputProperty(vtkSMProperty* Property, 
                               pqSMProxy Value, int opport);
  
  /// get the list of proxies for a property
  /// for example, append filter accepts a list of proxies
  static QList<pqSMProxy> getProxyListProperty(vtkSMProperty* Property);
  /// get the list of proxies for a property
  /// for example, append filter accepts a list of proxies
  static void setProxyListProperty(vtkSMProperty* Property, 
                                   QList<pqSMProxy> Value);

  /// get the list of possible proxies for a property
  static QList<pqSMProxy> getProxyPropertyDomain(vtkSMProperty* Property);


  /// get the pairs of selections for a selection property
  static QList<QList<QVariant> > getSelectionProperty(vtkSMProperty* Property,
                                                      PropertyValueType Type = CHECKED);
  /// get the pairs of selections for a selection property
  static QList<QVariant> getSelectionProperty(vtkSMProperty* Property, 
                                              unsigned int Index,
                                              PropertyValueType Type = CHECKED);
  /// set the pairs of selections for a selection property
  static void setSelectionProperty(vtkSMProperty* Property, 
                                   QList<QList<QVariant> > Value,
                                   PropertyValueType Type = CHECKED);

  /// used to set the status of an array, for example. note that this method
  /// can only be used for properties with vtkSMArraySelectionDomain or
  /// vtkSMStringListRangeDomain.
  static void setSelectionProperty(vtkSMProperty* Property,
                                   QList<QVariant> Value,
                                   PropertyValueType Type = CHECKED);

  /// get the possible names for the selection property
  static QList<QVariant> getSelectionPropertyDomain(vtkSMProperty* Property);
  
  /// get the enumeration for a property
  static QVariant getEnumerationProperty(vtkSMProperty* Property,
                                         PropertyValueType Type = CHECKED);
  /// set the enumeration for a property
  static void setEnumerationProperty(vtkSMProperty* Property, 
                                     QVariant Value,
                                     PropertyValueType Type = CHECKED);
  /// get the possible enumerations (string) for a property
  static QList<QVariant> getEnumerationPropertyDomain(vtkSMProperty* Property);

  /// get the single element of a property (integer, string, real, etc..)
  static QVariant getElementProperty(vtkSMProperty* Property,
                                     PropertyValueType Type = CHECKED);
  /// set the single element of a property (integer, string, real, etc..)
  static void setElementProperty(vtkSMProperty* Property,
                                 QVariant Value,
                                 PropertyValueType Type = CHECKED);
  /// get the range of possible values to set the single element of a property
  static QList<QVariant> getElementPropertyDomain(vtkSMProperty* Property);
  
  /// get the multiple elements of a property (integer, string, real, etc..)
  static QList<QVariant> getMultipleElementProperty(vtkSMProperty* Property,
                                                    PropertyValueType Type = CHECKED);
  /// set the multiple elements of a property (integer, string, real, etc..)
  static void setMultipleElementProperty(vtkSMProperty* Property,
                                         QList<QVariant> Value,
                                         PropertyValueType Type = CHECKED);
  /// get the ranges of possible values to 
  /// set the multiple elements of a property
  static QList<QList<QVariant> > getMultipleElementPropertyDomain(vtkSMProperty* Property);

  /// get one of the multiple elements of a 
  /// property (integer, string, real, etc..)
  static QVariant getMultipleElementProperty(vtkSMProperty* Property, 
                                             unsigned int Index,
                                             PropertyValueType Type = CHECKED);
  /// set one of the multiple elements of a 
  /// property (integer, string, real, etc..)
  static void setMultipleElementProperty(vtkSMProperty* Property,
                                         unsigned int Index,
                                         QVariant Value,
                                         PropertyValueType Type = CHECKED);

  /// get one of the ranges of possible values 
  /// to set the multiple elements of a property
  static QList<QVariant> getMultipleElementPropertyDomain(vtkSMProperty* Property,
                                                          unsigned int Index);

  /// get the single element of a property (integer, string, real, etc..)
  static QStringList getFileListProperty(vtkSMProperty* Property,
                                         PropertyValueType Type = CHECKED);
  /// set the single element of a property (integer, string, real, etc..)
  static void setFileListProperty(vtkSMProperty* Property, 
                                  QStringList Value,
                                  PropertyValueType Type = CHECKED);

  // get/set the field selection
  static QStringList getFieldSelection(vtkSMProperty *Property,
                                       PropertyValueType Type = CHECKED);
  static void setFieldSelection(vtkSMProperty *Property,
                                const QStringList &Value,
                                PropertyValueType Type = CHECKED);

  /// get/set the field selection mode (point, cell, ...)
  static QString getFieldSelectionMode(vtkSMProperty* prop,
                                       PropertyValueType Type = CHECKED);
  static void setFieldSelectionMode(vtkSMProperty* Property,
                                    const QString& Value,
                                    PropertyValueType Type = CHECKED);
  static QList<QString> getFieldSelectionModeDomain(vtkSMProperty*);
  
  /// get/set the field selection scalar 
  static QString getFieldSelectionScalar(vtkSMProperty* Property,
                                         PropertyValueType Type = CHECKED);
  static void setFieldSelectionScalar(vtkSMProperty* Property,
                                      const QString& Value,
                                      PropertyValueType Type = CHECKED);
  static QList<QString> getFieldSelectionScalarDomain(vtkSMProperty*);
  static QList<QPair<QString, bool> > getFieldSelectionScalarDomainWithPartialArrays(vtkSMProperty*);


  /// Returns a list of domains types for the property. eg.
  /// if a property has vtkSMBoundsDomain and vtkSMArrayListDomain then
  /// this method will returns ["vtkSMBoundsDomain", "vtkSMArrayListDomain"].
  static QList<QString> getDomainTypes(vtkSMProperty* property);

  /// Clears any unchecked values on the property.
  static void clearUncheckedProperties(vtkSMProperty *property);

  /// Converts a vtkVariant into a QVariant.
  static QVariant convertToQVariant(const vtkVariant &variant);
};

#endif // !_pqSMAdaptor_h