Mantid
|
An editor widget for editing a local parameter value. More...
#include <LocalParameterEditor.h>
Signals | |
void | fixParameter (int, bool) |
void | setAllFixed (bool) |
void | setAllValues (double) |
void | setAllValuesToLog () |
void | setConstraint (int, QString) |
void | setConstraintAll (QString) |
void | setTie (int, QString) |
void | setTieAll (QString) |
void | setValueToLog (int) |
Public Member Functions | |
LocalParameterEditor (QWidget *parent, int index, double value, bool fixed, const QString &tie, const QString &constraint, bool othersFixed, bool allOthersFixed, bool othersTied, bool logOptionsEnabled) | |
Constructor. More... | |
Private Slots | |
void | fixAll () |
Send a signal to fix all parameters. More... | |
void | fixParameter () |
Toggle the fix state of the current parameter. More... | |
void | removeAllConstraints () |
void | removeAllTies () |
Remove ties from all parameters. More... | |
void | removeConstraint () |
void | removeTie () |
Send a signal to remove a tie. More... | |
void | setAll () |
Send a signal to set all parameters to the value in the editor. More... | |
void | setConstraint () |
void | setConstraintAll () |
void | setLogOptionsEnabled (bool enabled) |
Slot: when log checkbox state changes, enable/disable the "set to log" and "set all to log" options. More... | |
void | setTie () |
Send a signal to tie a parameter. More... | |
void | setTieAll () |
Set all ties for all parameters. More... | |
void | setToLog () |
Send a signal to set value to log. More... | |
void | unfixAll () |
Send a signal to unfix all parameters. More... | |
void | updateValue (const QString &value) |
SLOT: when user edits value, make sure m_value is updated. More... | |
Private Member Functions | |
bool | eventFilter (QObject *widget, QEvent *evn) override |
Filter events in the line editor to emulate a shortcut (F to fix/unfix). More... | |
void | setEditorState () |
Set the state of the editor elements (the line editor and the button) according to the state of the parameter (fixed, tied, etc) More... | |
Static Private Member Functions | |
static QString | setConstraintDialog (const QString &tie) |
static QString | setTieDialog (const QString &tie) |
Open an input dialog to enter a tie expression. More... | |
Private Attributes | |
bool | m_allOthersFixed |
QPushButton * | m_button |
QString | m_constraint |
QLineEdit * | m_editor |
QAction * | m_fixAction |
QAction * | m_fixAllAction |
bool | m_fixed |
int | m_index |
bool | m_othersConstrained |
bool | m_othersFixed |
bool | m_othersTied |
QAction * | m_removeAllConstraintsAction |
QAction * | m_removeAllTiesAction |
QAction * | m_removeConstraintAction |
QAction * | m_removeTieAction |
QAction * | m_setAllAction |
QAction * | m_setAllToLogAction |
QAction * | m_setConstraintAction |
QAction * | m_setConstraintToAllAction |
QAction * | m_setTieAction |
QAction * | m_setTieToAllAction |
QAction * | m_setToLogAction |
QString | m_tie |
QAction * | m_unfixAllAction |
QString | m_value |
An editor widget for editing a local parameter value.
It allows edit the values as well as fix/unfix the parameter.
Definition at line 23 of file LocalParameterEditor.h.
MantidQt::MantidWidgets::LocalParameterEditor::LocalParameterEditor | ( | QWidget * | parent, |
int | index, | ||
double | value, | ||
bool | fixed, | ||
const QString & | tie, | ||
const QString & | constraint, | ||
bool | othersFixed, | ||
bool | allOthersFixed, | ||
bool | othersTied, | ||
bool | logOptionsEnabled | ||
) |
Constructor.
parent | :: Parent widget. |
index | :: Index of the spectrum which parameter is edited. |
value | :: Current parameter value. |
fixed | :: Is the parameter fixed initially? |
tie | :: Parameter's current tie (or empty string). |
constraint | :: Parameter's current constraint (or empty string). |
othersFixed | :: True if some other local parameters are fixed. |
allOthersFixed | :: True if all other local parameters are fixed. |
othersTied | :: True if there are other tied parameters. |
logOptionsEnabled | :: True if the log checkbox is ticked. |
Definition at line 34 of file LocalParameterEditor.cpp.
References fixAll(), fixParameter(), m_button, m_editor, m_fixAction, m_fixAllAction, m_fixed, m_removeAllConstraintsAction, m_removeAllTiesAction, m_removeConstraintAction, m_removeTieAction, m_setAllAction, m_setAllToLogAction, m_setConstraintAction, m_setConstraintToAllAction, m_setTieAction, m_setTieToAllAction, m_setToLogAction, m_unfixAllAction, removeAllConstraints(), removeAllTies(), removeConstraint(), removeTie(), setAll(), setAllValuesToLog(), setConstraint(), setConstraintAll(), setEditorState(), setTie(), setTieAll(), setToLog(), unfixAll(), and updateValue().
|
overrideprivate |
Filter events in the line editor to emulate a shortcut (F to fix/unfix).
Definition at line 248 of file LocalParameterEditor.cpp.
References fixParameter(), m_editor, m_index, m_tie, m_value, and setTie().
|
privateslot |
Send a signal to fix all parameters.
Definition at line 159 of file LocalParameterEditor.cpp.
References m_allOthersFixed, m_fixed, m_othersFixed, setAllFixed(), and setEditorState().
Referenced by LocalParameterEditor().
|
privateslot |
Toggle the fix state of the current parameter.
Definition at line 152 of file LocalParameterEditor.cpp.
References fixParameter(), m_fixed, m_index, and setEditorState().
|
signal |
Referenced by eventFilter(), fixParameter(), and LocalParameterEditor().
|
privateslot |
Definition at line 237 of file LocalParameterEditor.cpp.
References m_constraint, m_othersConstrained, setConstraintAll(), and setEditorState().
Referenced by LocalParameterEditor().
|
privateslot |
Remove ties from all parameters.
Definition at line 205 of file LocalParameterEditor.cpp.
References m_othersTied, m_tie, setEditorState(), and setTieAll().
Referenced by LocalParameterEditor().
|
privateslot |
Definition at line 221 of file LocalParameterEditor.cpp.
References m_constraint, m_index, setConstraint(), and setEditorState().
Referenced by LocalParameterEditor().
|
privateslot |
Send a signal to remove a tie.
Definition at line 187 of file LocalParameterEditor.cpp.
References m_index, m_tie, setEditorState(), and setTie().
Referenced by LocalParameterEditor().
|
privateslot |
Send a signal to set all parameters to the value in the editor.
Definition at line 146 of file LocalParameterEditor.cpp.
References m_editor, setAllValues(), and value.
Referenced by LocalParameterEditor().
|
signal |
Referenced by fixAll(), and unfixAll().
|
signal |
Referenced by setAll().
|
signal |
Referenced by LocalParameterEditor().
|
privateslot |
Definition at line 212 of file LocalParameterEditor.cpp.
References m_constraint, m_index, setConstraint(), setConstraintDialog(), and setEditorState().
|
signal |
Referenced by LocalParameterEditor(), removeConstraint(), and setConstraint().
|
privateslot |
Definition at line 227 of file LocalParameterEditor.cpp.
References m_constraint, m_othersConstrained, setConstraintAll(), setConstraintDialog(), and setEditorState().
|
signal |
Referenced by LocalParameterEditor(), removeAllConstraints(), and setConstraintAll().
|
staticprivate |
Definition at line 307 of file LocalParameterEditor.cpp.
Referenced by setConstraint(), and setConstraintAll().
|
private |
Set the state of the editor elements (the line editor and the button) according to the state of the parameter (fixed, tied, etc)
Definition at line 267 of file LocalParameterEditor.cpp.
References MantidQt::MantidWidgets::isNumber(), m_allOthersFixed, m_constraint, m_editor, m_fixAction, m_fixAllAction, m_fixed, m_othersFixed, m_othersTied, m_removeAllConstraintsAction, m_removeAllTiesAction, m_removeConstraintAction, m_removeTieAction, m_setAllAction, m_tie, m_unfixAllAction, and m_value.
Referenced by fixAll(), fixParameter(), LocalParameterEditor(), removeAllConstraints(), removeAllTies(), removeConstraint(), removeTie(), setConstraint(), setConstraintAll(), setTie(), setTieAll(), and unfixAll().
|
privateslot |
Slot: when log checkbox state changes, enable/disable the "set to log" and "set all to log" options.
enabled | :: [input] Whether to enable or disable options |
Definition at line 328 of file LocalParameterEditor.cpp.
References m_setAllToLogAction, and m_setToLogAction.
|
privateslot |
Send a signal to tie a parameter.
Definition at line 177 of file LocalParameterEditor.cpp.
References m_index, m_tie, setEditorState(), setTie(), and setTieDialog().
|
signal |
Referenced by eventFilter(), LocalParameterEditor(), removeTie(), and setTie().
|
privateslot |
Set all ties for all parameters.
Definition at line 194 of file LocalParameterEditor.cpp.
References m_othersTied, m_tie, setEditorState(), setTieAll(), and setTieDialog().
|
signal |
Referenced by LocalParameterEditor(), removeAllTies(), and setTieAll().
|
staticprivate |
Open an input dialog to enter a tie expression.
Definition at line 297 of file LocalParameterEditor.cpp.
Referenced by setTie(), and setTieAll().
|
privateslot |
Send a signal to set value to log.
Definition at line 245 of file LocalParameterEditor.cpp.
References m_index, and setValueToLog().
Referenced by LocalParameterEditor().
|
signal |
Referenced by setToLog().
|
privateslot |
Send a signal to unfix all parameters.
Definition at line 168 of file LocalParameterEditor.cpp.
References m_allOthersFixed, m_fixed, m_othersFixed, setAllFixed(), and setEditorState().
Referenced by LocalParameterEditor().
|
privateslot |
SLOT: when user edits value, make sure m_value is updated.
value | :: [input] Changed text in the edit box |
Definition at line 321 of file LocalParameterEditor.cpp.
References m_value, and value.
Referenced by LocalParameterEditor().
|
private |
Definition at line 84 of file LocalParameterEditor.h.
Referenced by fixAll(), setEditorState(), and unfixAll().
|
private |
Definition at line 62 of file LocalParameterEditor.h.
Referenced by LocalParameterEditor().
|
private |
Definition at line 82 of file LocalParameterEditor.h.
Referenced by removeAllConstraints(), removeConstraint(), setConstraint(), setConstraintAll(), and setEditorState().
|
private |
Definition at line 61 of file LocalParameterEditor.h.
Referenced by eventFilter(), LocalParameterEditor(), setAll(), and setEditorState().
|
private |
Definition at line 64 of file LocalParameterEditor.h.
Referenced by LocalParameterEditor(), and setEditorState().
|
private |
Definition at line 65 of file LocalParameterEditor.h.
Referenced by LocalParameterEditor(), and setEditorState().
|
private |
Definition at line 80 of file LocalParameterEditor.h.
Referenced by fixAll(), fixParameter(), LocalParameterEditor(), setEditorState(), and unfixAll().
|
private |
Definition at line 78 of file LocalParameterEditor.h.
Referenced by eventFilter(), fixParameter(), removeConstraint(), removeTie(), setConstraint(), setTie(), and setToLog().
|
private |
Definition at line 86 of file LocalParameterEditor.h.
Referenced by removeAllConstraints(), and setConstraintAll().
|
private |
Definition at line 83 of file LocalParameterEditor.h.
Referenced by fixAll(), setEditorState(), and unfixAll().
|
private |
Definition at line 85 of file LocalParameterEditor.h.
Referenced by removeAllTies(), setEditorState(), and setTieAll().
|
private |
Definition at line 74 of file LocalParameterEditor.h.
Referenced by LocalParameterEditor(), and setEditorState().
|
private |
Definition at line 70 of file LocalParameterEditor.h.
Referenced by LocalParameterEditor(), and setEditorState().
|
private |
Definition at line 72 of file LocalParameterEditor.h.
Referenced by LocalParameterEditor(), and setEditorState().
|
private |
Definition at line 68 of file LocalParameterEditor.h.
Referenced by LocalParameterEditor(), and setEditorState().
|
private |
Definition at line 63 of file LocalParameterEditor.h.
Referenced by LocalParameterEditor(), and setEditorState().
|
private |
Definition at line 76 of file LocalParameterEditor.h.
Referenced by LocalParameterEditor(), and setLogOptionsEnabled().
|
private |
Definition at line 71 of file LocalParameterEditor.h.
Referenced by LocalParameterEditor().
|
private |
Definition at line 73 of file LocalParameterEditor.h.
Referenced by LocalParameterEditor().
|
private |
Definition at line 67 of file LocalParameterEditor.h.
Referenced by LocalParameterEditor().
|
private |
Definition at line 69 of file LocalParameterEditor.h.
Referenced by LocalParameterEditor().
|
private |
Definition at line 75 of file LocalParameterEditor.h.
Referenced by LocalParameterEditor(), and setLogOptionsEnabled().
|
private |
Definition at line 81 of file LocalParameterEditor.h.
Referenced by eventFilter(), removeAllTies(), removeTie(), setEditorState(), setTie(), and setTieAll().
|
private |
Definition at line 66 of file LocalParameterEditor.h.
Referenced by LocalParameterEditor(), and setEditorState().
|
private |
Definition at line 79 of file LocalParameterEditor.h.
Referenced by eventFilter(), setEditorState(), and updateValue().