16 #ifndef pqMultiBlockInspectorPanel_h 17 #define pqMultiBlockInspectorPanel_h 19 #include "pqComponentsModule.h" 31 class QTreeWidgetItem;
35 class vtkDiscretizableColorTransferFunction;
36 class vtkEventQtSlotConnect;
37 class vtkPiecewiseFunction;
52 QString lookupBlockName(
unsigned int flatIndex)
const;
62 void setBlockVisibility(
unsigned int index,
bool visible);
63 void clearBlockVisibility(
unsigned int index);
64 void setBlockVisibility(
const QList<unsigned int>& indices,
bool visible);
65 void clearBlockVisibility(
const QList<unsigned int>& indices);
67 void setBlockColor(
unsigned int index,
const QColor& color);
68 void clearBlockColor(
unsigned int index);
69 void setBlockColor(
const QList<unsigned int>& indices,
const QColor& color);
70 void clearBlockColor(
const QList<unsigned int>& indices);
72 void setBlockOpacity(
unsigned int index,
double opacity);
73 void clearBlockOpacity(
unsigned int index);
74 void setBlockOpacity(
const QList<unsigned int>& indices,
double opacity);
75 void clearBlockOpacity(
const QList<unsigned int>& indices);
77 void promptAndSetBlockOpacity(
unsigned int index);
78 void promptAndSetBlockOpacity(
const QList<unsigned int>& indices);
80 void showOnlyBlock(
unsigned int index);
81 void showOnlyBlocks(
const QList<unsigned int>& indices);
89 void onColorArrayNameModified();
91 void onCustomContextMenuRequested(
const QPoint& pos);
92 void onItemChanged(QTreeWidgetItem* item,
int column);
95 bool visibility,
int inheritedColorIndex,
int inheritedOpacityIndex);
96 void onItemSelectionChanged();
97 void onItemDoubleClicked(QTreeWidgetItem* item,
int column);
98 void updateBlockVisibilities();
99 void updateBlockColors();
100 void updateBlockOpacities();
114 void unsetChildVisibilities(QTreeWidgetItem* parent);
116 int flatIndex, NodeType nodeType,
int inheritedColorIndex,
int leafIndex = -1)
const;
117 QIcon makeOpacityIcon(
int flatIndex, NodeType nodeType,
int inheritedOpacityIndex)
const;
118 QIcon makeNullIcon()
const;
121 QTreeWidget* TreeWidget;
122 QPointer<pqOutputPort> OutputPort;
123 QPointer<pqRepresentation> Representation;
124 QMap<unsigned int, bool> BlockVisibilites;
125 QMap<unsigned int, QColor> BlockColors;
126 QMap<unsigned int, double> BlockOpacities;
127 vtkEventQtSlotConnect* PropertyListener;
129 vtkDiscretizableColorTransferFunction* ColorTransferFunction;
130 vtkPiecewiseFunction* OpacityTransferFunction;
131 unsigned int BlockColorsDistinctValues;
134 pqTimer UpdateUITimer;
143 bool operator<(
const BlockIcon& other)
const 145 QColor c = this->HasColor ? this->Color : QColor();
146 c.setAlphaF(this->HasOpacity ? this->Opacity : 1.0);
148 QColor oc = other.HasColor ? other.Color : QColor();
149 oc.setAlphaF(other.HasOpacity ? other.Opacity : 1.0);
151 return c.rgba() < oc.rgba();
156 #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.
proxy for a VTK object(s) on a server