This file is indexed.

/usr/include/paraview/pqQueryClauseWidget.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
/*=========================================================================

   Program: ParaView
   Module:    pqQueryClauseWidget.h

   Copyright (c) 2005,2006 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 pqQueryClauseWidget_h
#define pqQueryClauseWidget_h

#include <QWidget>
#include "pqComponentsModule.h"
#include "vtkSelectionNode.h"

class pqOutputPort;
class vtkPVDataSetAttributesInformation;
class vtkSMProxy;

/// pqQueryClauseWidget is used by pqQueryDialog as the widget allowing the user
/// choose the clauses for the queries.
class PQCOMPONENTS_EXPORT pqQueryClauseWidget : public QWidget
{
  Q_OBJECT
  typedef QWidget Superclass;
public:
  enum CriteriaType
    {
    INVALID=0x0,
    INDEX = 0x1,
    GLOBALID =0x2,
    THRESHOLD = 0x4,
    BLOCK =0x10,
    AMR_LEVEL=0x20,
    AMR_BLOCK=0x40,
    PROCESSID=0x80,
    QUERY = 0x8,
    ANY=0xffff
    };

  Q_DECLARE_FLAGS(CriteriaTypes, CriteriaType);

  enum ConditionMode
    {
    SINGLE_VALUE,
    SINGLE_VALUE_GE,
    SINGLE_VALUE_LE,
    PAIR_OF_VALUES,
    TRIPLET_OF_VALUES,
    LIST_OF_VALUES,
    BLOCK_ID_VALUE,
    LIST_OF_BLOCK_ID_VALUES,
    BLOCK_NAME_VALUE,
    AMR_LEVEL_VALUE,
    AMR_BLOCK_VALUE,
    SINGLE_VALUE_MIN,
    SINGLE_VALUE_MAX,
    SINGLE_VALUE_LE_MEAN,
    SINGLE_VALUE_GE_MEAN,
    SINGLE_VALUE_MEAN_WITH_TOLERANCE
    };
public:
  pqQueryClauseWidget(
    QWidget* parent=0, Qt::WindowFlags flags=0);
  virtual ~pqQueryClauseWidget();

  /// Set/Get the data producer.
  void setProducer(pqOutputPort* p)
    { this->Producer = p; }
  pqOutputPort* producer() const
    { return this->Producer; }

  /// Set the attribute type. This determine what arrays are listed in the
  /// selection criteria.
  /// Valid values are from the enum vtkDataObject::AttributeTypes.
  void setAttributeType(int attrType)
    { this->AttributeType = attrType; }
  int attributeType() const
    { return this->AttributeType; }

  /// Creates a new selection source proxy based on the query.
  /// Note that this does not register the proxy, it merely creates the
  /// selection source and returns it.
  vtkSMProxy* newSelectionSource();

public slots:
  /// use this slot to initialize the clause GUI after all properties have been
  /// set.
  /// FIXME: Unsupported Terms: process id, amr-level, amr-block. We will need
  /// to extend VTK selection support for those, so we will implement them later
  /// (possibly 3.10/4.0)
  void initialize()
    { this->initialize(CriteriaTypes(ANY) ^ PROCESSID ^ AMR_LEVEL ^ AMR_BLOCK ^ BLOCK); }

  /// initialize the widget only with the subset of criteria mentioned.
  /// A query clause has two components, the query term and the qualifiers. Some
  /// criteria can be both eg. BLOCK can be both the term or a qualifier. The
  /// available operators may change in such case. Hence, we specify if it's
  /// being used as a qualifier or not.
  void initialize(CriteriaTypes type_flags, bool qualifier_mode=false);

signals:
  /// Fired when the user clicks on the help button.
  void helpRequested();

protected slots:
  /// Based on the selection criteria, populate the options in the selection
  /// "condition" combo box.
  void populateSelectionCondition();

  /// Update the value widget so show the correct widget based on the chosen
  /// criteria and condition.
  void updateValueWidget();

  /// Some query clauses under certain conditions require additional options
  /// from the user. These are managed using more instances of
  /// pqQueryClauseWidget internally. This method creates these new instances if
  /// needed.
  void updateDependentClauseWidgets();

  /// Pops up a dialog showing the composite data structure for the data.
  void showCompositeTree();

protected:
  /// Returns the attribute info for the attribute chosen in the "Selection
  /// Type" combo box.
  vtkPVDataSetAttributesInformation* getChosenAttributeInfo() const;

  /// Based on the selection type and data information from the producer,
  /// populate the "criteria" combo box.
  void populateSelectionCriteria(CriteriaTypes type=ANY);

  /// Returns the current criteria type.
  CriteriaType currentCriteriaType() const;

  ConditionMode currentConditionType() const;

  /// Updates the selection source proxy with the criteria in the clause.
  void addSelectionQualifiers(vtkSMProxy*);

  pqOutputPort* Producer;
  int AttributeType;
  bool AsQualifier;
  QString LastQuery;
private:
  Q_DISABLE_COPY(pqQueryClauseWidget)
  class pqInternals;
  pqInternals* Internals;


};

#endif