Public Slots | Signals | Public Member Functions | Protected Member Functions | List of all members
pqChooseColorPresetReaction Class Reference

Reaction to pop up a color palette chooser dialog. More...

#include <pqChooseColorPresetReaction.h>

Inheritance diagram for pqChooseColorPresetReaction:
Inheritance graph
[legend]
Collaboration diagram for pqChooseColorPresetReaction:
Collaboration graph
[legend]

Public Slots

bool choosePreset (const char *presetName=nullptr)
 Choose color preset for the representation set using setRepresentation(). More...
 
void setRepresentation (pqDataRepresentation *repr)
 Set the data representation explicitly when track_active_objects is false. More...
 
void setTransferFunction (vtkSMProxy *lut)
 Set the transfer function proxy. More...
 
void updateEnableState () override
 Updates the enabled state. More...
 
void setAllowsRegexpMatching (bool allow)
 Show/hide widget in the dialog. More...
 
QRegularExpression regularExpression ()
 Return the regular expression specified in the Dialog. More...
 
bool loadAnnotations ()
 Return if annotations should be loaded. More...
 

Signals

void presetApplied (const QString &)
 fired every time a preset is applied. More...
 

Public Member Functions

 pqChooseColorPresetReaction (QAction *parent, bool track_active_objects=true)
 
 ~pqChooseColorPresetReaction () override
 
- Public Member Functions inherited from pqReaction
 pqReaction (QAction *parent, Qt::ConnectionType type=Qt::AutoConnection)
 Constructor. More...
 
 ~pqReaction () override
 
QAction * parentAction () const
 Provides access to the parent action. More...
 

Protected Member Functions

void onTriggered () override
 Called when the action is triggered. More...
 

Additional Inherited Members

- Protected Slots inherited from pqReaction
virtual void updateEnableState ()
 
virtual void updateMasterEnableState (bool)
 
- Protected Attributes inherited from pqReaction
bool IsMaster
 

Detailed Description

Reaction to pop up a color palette chooser dialog.

pqChooseColorPresetReaction is used by pqColorEditorPropertyWidget (for example) allow the user to change the color palette. It pops up a modal dialog with color presets to select and apply. There are three ways of using this reaction:

In all modes, the reaction will fire the presetApplied() signal to indicate a new preset has been applied. Typically one can hook that signal up to render affected views.

Definition at line 43 of file pqChooseColorPresetReaction.h.

Constructor & Destructor Documentation

◆ pqChooseColorPresetReaction()

pqChooseColorPresetReaction::pqChooseColorPresetReaction ( QAction *  parent,
bool  track_active_objects = true 
)

◆ ~pqChooseColorPresetReaction()

pqChooseColorPresetReaction::~pqChooseColorPresetReaction ( )
override

Member Function Documentation

◆ choosePreset

bool pqChooseColorPresetReaction::choosePreset ( const char *  presetName = nullptr)
slot

Choose color preset for the representation set using setRepresentation().

Returns false if representation cannot be located or its is not using scalar coloring.

◆ setRepresentation

void pqChooseColorPresetReaction::setRepresentation ( pqDataRepresentation repr)
slot

Set the data representation explicitly when track_active_objects is false.

◆ setTransferFunction

void pqChooseColorPresetReaction::setTransferFunction ( vtkSMProxy lut)
slot

Set the transfer function proxy.

This can be used, instead of setRepresentation() when track_active_objects was false to directly set the transfer function proxy on which to apply the preset.

◆ updateEnableState

void pqChooseColorPresetReaction::updateEnableState ( )
overrideslot

Updates the enabled state.

Applications need not explicitly call this.

◆ setAllowsRegexpMatching

void pqChooseColorPresetReaction::setAllowsRegexpMatching ( bool  allow)
inlineslot

Show/hide widget in the dialog.

Allows a regexp as user entry to do the matching between data values and preset. Intended to be used for series preset.

Definition at line 82 of file pqChooseColorPresetReaction.h.

◆ regularExpression

QRegularExpression pqChooseColorPresetReaction::regularExpression ( )
slot

Return the regular expression specified in the Dialog.

◆ loadAnnotations

bool pqChooseColorPresetReaction::loadAnnotations ( )
slot

Return if annotations should be loaded.

◆ presetApplied

void pqChooseColorPresetReaction::presetApplied ( const QString &  )
signal

fired every time a preset is applied.

◆ onTriggered()

void pqChooseColorPresetReaction::onTriggered ( )
overrideprotectedvirtual

Called when the action is triggered.

Reimplemented from pqReaction.


The documentation for this class was generated from the following file: