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

pqExpressionsManagerDialog is a dialog class to edit and export expressions. More...

#include <pqExpressionsDialog.h>

Inherits QDialog.

Signals

void expressionSelected (const QString &expr)
 Emitted after click on "UseCurrent" button. More...
 

Public Member Functions

 pqExpressionsManagerDialog (QWidget *parent, const QString &group="")
 
 ~pqExpressionsManagerDialog () override
 

Protected Slots

void addNewExpression ()
 Add a new empty expression in the current group, and select it. More...
 
void removeSelectedExpressions ()
 Remove the selected expressions. More...
 
void removeAllExpressions ()
 Remove all expressions. More...
 
void onClose ()
 Save window state and store inner model to settings. More...
 
void updateUi ()
 Update the dialog according to the current state. More...
 
void filterGroup ()
 Update table filtering based on group. More...
 
void onUseCurrent ()
 Triggered by "UseCurrent" button. More...
 
void keyReleaseEvent (QKeyEvent *event) override
 Reimplemented to handle del. More...
 
void save ()
 Save expressions to settings. More...
 
void exportToFile ()
 Export / import expressions to (respectively from) file. More...
 
bool importFromFile ()
 Export / import expressions to (respectively from) file. More...
 

Detailed Description

pqExpressionsManagerDialog is a dialog class to edit and export expressions.

Expressions are loaded from the settings, and are saved on close. Expressions can be exported to a *.json file. When importing a *.json file, new expressions are appended to the current list. Already existing expressions are not duplicated.

Expected formatting of the file:

* {
*   "version": "<version>",
*    "Expressions": [
*      {
*        "Expression": <expressions string>,
*        "Name": "<expression name>",
*        "Group": "<expression_group>"
*      }
*    ],
* }
* 

Definition at line 63 of file pqExpressionsDialog.h.

Constructor & Destructor Documentation

◆ pqExpressionsManagerDialog()

pqExpressionsManagerDialog::pqExpressionsManagerDialog ( QWidget *  parent,
const QString &  group = "" 
)

◆ ~pqExpressionsManagerDialog()

pqExpressionsManagerDialog::~pqExpressionsManagerDialog ( )
override

Member Function Documentation

◆ expressionSelected

void pqExpressionsManagerDialog::expressionSelected ( const QString &  expr)
signal

Emitted after click on "UseCurrent" button.

Argument is the first selected expression.

◆ addNewExpression

void pqExpressionsManagerDialog::addNewExpression ( )
protectedslot

Add a new empty expression in the current group, and select it.

If there is already such empty expression, use it instead of adding a new one.

◆ removeSelectedExpressions

void pqExpressionsManagerDialog::removeSelectedExpressions ( )
protectedslot

Remove the selected expressions.

◆ removeAllExpressions

void pqExpressionsManagerDialog::removeAllExpressions ( )
protectedslot

Remove all expressions.

◆ onClose

void pqExpressionsManagerDialog::onClose ( )
protectedslot

Save window state and store inner model to settings.

◆ updateUi

void pqExpressionsManagerDialog::updateUi ( )
protectedslot

Update the dialog according to the current state.

Enable / disables buttons based on selection.

◆ filterGroup

void pqExpressionsManagerDialog::filterGroup ( )
protectedslot

Update table filtering based on group.

◆ exportToFile

void pqExpressionsManagerDialog::exportToFile ( )
protectedslot

Export / import expressions to (respectively from) file.

Open a dialog to get the *.json file.

◆ importFromFile

bool pqExpressionsManagerDialog::importFromFile ( )
protectedslot

Export / import expressions to (respectively from) file.

Open a dialog to get the *.json file.

◆ onUseCurrent

void pqExpressionsManagerDialog::onUseCurrent ( )
protectedslot

Triggered by "UseCurrent" button.

Emit signal expressionSelected().

◆ keyReleaseEvent

void pqExpressionsManagerDialog::keyReleaseEvent ( QKeyEvent *  event)
overrideprotectedslot

Reimplemented to handle del.

◆ save

void pqExpressionsManagerDialog::save ( )
protectedslot

Save expressions to settings.


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