16 #ifndef pqMultiBlockInspectorPanel_h 17 #define pqMultiBlockInspectorPanel_h 19 #include "pqComponentsModule.h" 31 class QTreeWidgetItem;
35 class vtkDiscretizableColorTransferFunction;
36 class vtkEventQtSlotConnect;
37 class vtkPiecewiseFunction;
38 class vtkPVCompositeDataInformation;
52 QString lookupBlockName(
unsigned int flatIndex)
const;
60 void setBlockVisibility(
unsigned int index,
bool visible);
61 void clearBlockVisibility(
unsigned int index);
62 void setBlockVisibility(
const QList<unsigned int>& indices,
bool visible);
63 void clearBlockVisibility(
const QList<unsigned int>& indices);
65 void setBlockColor(
unsigned int index,
const QColor &color);
66 void clearBlockColor(
unsigned int index);
67 void setBlockColor(
const QList<unsigned int>& indices,
const QColor &color);
68 void clearBlockColor(
const QList<unsigned int>& indices);
70 void setBlockOpacity(
unsigned int index,
double opacity);
71 void clearBlockOpacity(
unsigned int index);
72 void setBlockOpacity(
const QList<unsigned int> &indices,
double opacity);
73 void clearBlockOpacity(
const QList<unsigned int> &indices);
75 void promptAndSetBlockOpacity(
unsigned int index);
76 void promptAndSetBlockOpacity(
const QList<unsigned int> &indices);
78 void showOnlyBlock(
unsigned int index);
79 void showOnlyBlocks(
const QList<unsigned int>& indices);
85 void onColorArrayNameModified();
87 void onCustomContextMenuRequested(
const QPoint &pos);
88 void onItemChanged(QTreeWidgetItem *item,
int column);
90 void updateTree(vtkPVCompositeDataInformation *iter,
91 QTreeWidgetItem *parent,
92 int& flatIndex,
bool visibility,
93 int inheritedColorIndex,
94 int inheritedOpacityIndex);
95 void onItemSelectionChanged();
96 void onItemDoubleClicked(QTreeWidgetItem * item,
int column);
97 void updateBlockVisibilities();
98 void updateBlockColors();
99 void updateBlockOpacities();
110 void buildTree(vtkPVCompositeDataInformation *iter,
111 QTreeWidgetItem *parent,
114 void unsetChildVisibilities(QTreeWidgetItem *parent);
115 QIcon makeColorIcon(
int flatIndex, NodeType nodeType,
116 int inheritedColorIndex,
int leafIndex=-1)
const;
117 QIcon makeOpacityIcon(
int flatIndex, NodeType nodeType,
118 int inheritedOpacityIndex)
const;
119 QIcon makeNullIcon()
const;
124 QTreeWidget *TreeWidget;
125 QPointer<pqOutputPort> OutputPort;
126 QPointer<pqRepresentation> Representation;
127 QMap<unsigned int, bool> BlockVisibilites;
128 QMap<unsigned int, QColor> BlockColors;
129 QMap<unsigned int, double> BlockOpacities;
130 vtkEventQtSlotConnect *PropertyListener;
131 vtkSMProxy *ColorTransferProxy;
132 vtkDiscretizableColorTransferFunction* ColorTransferFunction;
133 vtkPiecewiseFunction* OpacityTransferFunction;
134 unsigned int BlockColorsDistinctValues;
137 pqTimer UpdateUITimer;
146 bool operator<(
const BlockIcon &other)
const 148 QColor c = this->HasColor ? this->Color : QColor();
149 c.setAlphaF(this->HasOpacity ? this->Opacity : 1.0);
151 QColor oc = other.HasColor ? other.Color : QColor();
152 oc.setAlphaF(other.HasOpacity ? other.Opacity : 1.0);
154 return c.rgba() < oc.rgba();
159 #endif // pqMultiBlockInspectorPanel_h pqOutputPort is a server manager model item for an output port of any pqPipelineSource item...
This is PQ representation for a single representation.