pqColorAnnotationsWidget is used to edit annotations and colors More...
#include <pqColorAnnotationsWidget.h>
Inherits QWidget.
Signals | |
void | annotationsChanged () |
Fired when the annotations are changed. More... | |
void | indexedColorsChanged () |
Fired when the indexed colors are changed. More... | |
void | indexedOpacitiesChanged () |
Fired when the indexed opacities are changed. More... | |
void | visibilitiesChanged () |
Fired when the visibilities are changed. More... | |
void | opacityMappingChanged () |
Fired when the opacity mapping status is changed. More... | |
void | presetChanged (const QString &name) |
Fired when a new preset is applied. More... | |
void | selectionChanged (const QItemSelection &, const QItemSelection &) |
Fired when the currently focused item changed. More... | |
Public Member Functions | |
pqColorAnnotationsWidget (QWidget *parent=nullptr) | |
~pqColorAnnotationsWidget () override | |
void | setLookupTableProxy (vtkSMProxy *proxy) |
void | applyPreset (const char *presetName) |
Apply a color preset using its name. More... | |
void | indexedLookupStateUpdated (bool indexed) |
Ensures that the table for indexedColors are shown only when this is set to true. More... | |
bool | addActiveAnnotations (bool force) |
Use active representation to create annotations. More... | |
bool | addActiveAnnotations (bool force, bool extend) |
Setting extend=true grows the list of annotations resulting in a union of previous annotations and annotations for the data range of the active source proxy. More... | |
QModelIndex | currentIndex () |
Return current model index from table. More... | |
QModelIndexList | selectedIndexes () |
Return the selected indexes. More... | |
void | setAnnotationsModel (pqAnnotationsModel *model) |
Set the annotionModel on the underlying table. More... | |
void | setSupportsReorder (bool reorder) |
Set reordering support on the table. More... | |
void | sort (int column, Qt::SortOrder order=Qt::AscendingOrder) |
Sort the underlying proxy model. More... | |
void | allowsUserDefinedValues (bool allow) |
Show/Hide relevant widgets. More... | |
void | allowsRegexpMatching (bool allow) |
Setup ChooseColor dialog. More... | |
void | enablePresets (bool enable) |
Show/Hide relevant widgets. More... | |
void | supportsVisibilityCheck (bool val) |
Show/Hide the Visibility column. More... | |
void | supportsOpacityMapping (bool val) |
Show/Hide the EnableOpacityMapping button. More... | |
void | setColumnVisibility (pqAnnotationsModel::ColumnRoles col, bool visible) |
Show/Hide given column. More... | |
QString | currentAnnotationValue () |
Get the current annotation value. More... | |
QStringList | selectedAnnotations () |
Get the selected annotations values. More... | |
void | setSelectedAnnotations (const QStringList &annotations) |
bool | presetLoadAnnotations () |
Get if annotations should be loaded with the preset. More... | |
QRegularExpression | presetRegularExpression () |
Get the regular expression to use to apply the preset. More... | |
QList< QVariant > | annotations () const |
Get/Set the annotations. More... | |
void | setAnnotations (const QList< QVariant > &) |
Get/Set the annotations. More... | |
QList< QVariant > | indexedColors () const |
Get/Set the indexed colors. More... | |
void | setIndexedColors (const QList< QVariant > &) |
Get/Set the indexed colors. More... | |
QList< QVariant > | indexedOpacities () const |
Get/Set the indexed opacities. More... | |
void | setIndexedOpacities (const QList< QVariant > &) |
Get/Set the indexed opacities. More... | |
QList< QVariant > | visibilities () const |
Get/Set the indexed visibilities. More... | |
void | setVisibilities (const QList< QVariant > &) |
Get/Set the indexed visibilities. More... | |
QVariant | opacityMapping () const |
Get/Set the opacity mapping status. More... | |
void | setOpacityMapping (const QVariant &) |
Get/Set the opacity mapping status. More... | |
const char * | currentPresetName () |
Get / Set the name of the current preset in use. More... | |
void | setCurrentPresetName (const char *name) |
Get / Set the name of the current preset in use. More... | |
Protected Member Functions | |
bool | addActiveAnnotationsFromVisibleSources (bool force) |
Create annotations from visibles part of the active representation. More... | |
pqColorAnnotationsWidget is used to edit annotations and colors
Definition at line 21 of file pqColorAnnotationsWidget.h.
pqColorAnnotationsWidget::pqColorAnnotationsWidget | ( | QWidget * | parent = nullptr | ) |
|
override |
void pqColorAnnotationsWidget::setLookupTableProxy | ( | vtkSMProxy * | proxy | ) |
QList<QVariant> pqColorAnnotationsWidget::annotations | ( | ) | const |
Get/Set the annotations.
This is a list generated by flattening 2-tuples where 1st value is the annotated value and second is the annotation text.
void pqColorAnnotationsWidget::setAnnotations | ( | const QList< QVariant > & | ) |
Get/Set the annotations.
This is a list generated by flattening 2-tuples where 1st value is the annotated value and second is the annotation text.
QList<QVariant> pqColorAnnotationsWidget::indexedColors | ( | ) | const |
Get/Set the indexed colors.
This is a list generated by flattening 3-tuples (r,g,b).
void pqColorAnnotationsWidget::setIndexedColors | ( | const QList< QVariant > & | ) |
Get/Set the indexed colors.
This is a list generated by flattening 3-tuples (r,g,b).
QList<QVariant> pqColorAnnotationsWidget::indexedOpacities | ( | ) | const |
Get/Set the indexed opacities.
void pqColorAnnotationsWidget::setIndexedOpacities | ( | const QList< QVariant > & | ) |
Get/Set the indexed opacities.
QList<QVariant> pqColorAnnotationsWidget::visibilities | ( | ) | const |
Get/Set the indexed visibilities.
void pqColorAnnotationsWidget::setVisibilities | ( | const QList< QVariant > & | ) |
Get/Set the indexed visibilities.
QVariant pqColorAnnotationsWidget::opacityMapping | ( | ) | const |
Get/Set the opacity mapping status.
void pqColorAnnotationsWidget::setOpacityMapping | ( | const QVariant & | ) |
Get/Set the opacity mapping status.
void pqColorAnnotationsWidget::applyPreset | ( | const char * | presetName | ) |
Apply a color preset using its name.
void pqColorAnnotationsWidget::indexedLookupStateUpdated | ( | bool | indexed | ) |
Ensures that the table for indexedColors are shown only when this is set to true.
bool pqColorAnnotationsWidget::addActiveAnnotations | ( | bool | force | ) |
Use active representation to create annotations.
This method grows the list of annotations. It is equivalent to calling pqColorAnnotationsWidget::addActiveAnnotations(force, true)
bool pqColorAnnotationsWidget::addActiveAnnotations | ( | bool | force, |
bool | extend | ||
) |
Setting extend=true grows the list of annotations resulting in a union of previous annotations and annotations for the data range of the active source proxy.
QModelIndex pqColorAnnotationsWidget::currentIndex | ( | ) |
Return current model index from table.
Uses QSortFilterProxyModel if exists.
QModelIndexList pqColorAnnotationsWidget::selectedIndexes | ( | ) |
Return the selected indexes.
void pqColorAnnotationsWidget::setAnnotationsModel | ( | pqAnnotationsModel * | model | ) |
Set the annotionModel on the underlying table.
void pqColorAnnotationsWidget::setSupportsReorder | ( | bool | reorder | ) |
Set reordering support on the table.
void pqColorAnnotationsWidget::sort | ( | int | column, |
Qt::SortOrder | order = Qt::AscendingOrder |
||
) |
Sort the underlying proxy model.
void pqColorAnnotationsWidget::allowsUserDefinedValues | ( | bool | allow | ) |
Show/Hide relevant widgets.
If allow is false, hide the buttons that add/remove lines.
void pqColorAnnotationsWidget::allowsRegexpMatching | ( | bool | allow | ) |
Setup ChooseColor dialog.
If allow is true, add a line edit to specify a regexp to do the matching between data values and preset. Intended to be used for series preset.
void pqColorAnnotationsWidget::enablePresets | ( | bool | enable | ) |
Show/Hide relevant widgets.
If enable is false, hide the buttons that save / load presets.
void pqColorAnnotationsWidget::supportsVisibilityCheck | ( | bool | val | ) |
Show/Hide the Visibility column.
void pqColorAnnotationsWidget::supportsOpacityMapping | ( | bool | val | ) |
Show/Hide the EnableOpacityMapping button.
void pqColorAnnotationsWidget::setColumnVisibility | ( | pqAnnotationsModel::ColumnRoles | col, |
bool | visible | ||
) |
Show/Hide given column.
const char* pqColorAnnotationsWidget::currentPresetName | ( | ) |
Get / Set the name of the current preset in use.
void pqColorAnnotationsWidget::setCurrentPresetName | ( | const char * | name | ) |
Get / Set the name of the current preset in use.
QString pqColorAnnotationsWidget::currentAnnotationValue | ( | ) |
Get the current annotation value.
QStringList pqColorAnnotationsWidget::selectedAnnotations | ( | ) |
Get the selected annotations values.
void pqColorAnnotationsWidget::setSelectedAnnotations | ( | const QStringList & | annotations | ) |
bool pqColorAnnotationsWidget::presetLoadAnnotations | ( | ) |
Get if annotations should be loaded with the preset.
QRegularExpression pqColorAnnotationsWidget::presetRegularExpression | ( | ) |
Get the regular expression to use to apply the preset.
|
signal |
Fired when the annotations are changed.
|
signal |
Fired when the indexed colors are changed.
|
signal |
Fired when the indexed opacities are changed.
|
signal |
Fired when the visibilities are changed.
|
signal |
Fired when the opacity mapping status is changed.
|
signal |
Fired when a new preset is applied.
|
signal |
Fired when the currently focused item changed.
|
protected |
Create annotations from visibles part of the active representation.