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... | |
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 35 of file pqExpressionsDialog.h.
pqExpressionsManagerDialog::pqExpressionsManagerDialog | ( | QWidget * | parent, |
const QString & | group = "" |
||
) |
|
override |
|
signal |
Emitted after click on "UseCurrent" button.
Argument is the first selected expression.
|
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.
|
protectedslot |
Remove the selected expressions.
|
protectedslot |
Remove all expressions.
|
protectedslot |
Save window state and store inner model to settings.
|
protectedslot |
Update the dialog according to the current state.
Enable / disables buttons based on selection.
|
protectedslot |
Update table filtering based on group.
|
protectedslot |
Export / import expressions to (respectively from) file.
Open a dialog to get the *.json file.
|
protectedslot |
Export / import expressions to (respectively from) file.
Open a dialog to get the *.json file.
|
protectedslot |
Triggered by "UseCurrent" button.
Emit signal expressionSelected().
|
overrideprotectedslot |
Reimplemented to handle del.
|
protectedslot |
Save expressions to settings.