|
BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Panel to setup ASCII parser. More...
Public Types | |
| enum | SeparatorButtonId { AUTOMATIC , SPACE , COMMA , CUSTOM } |
Signals | |
| void | parserPropertyChanged () |
| int | targetCanvasChanged (int canvas_index) |
Public Member Functions | |
| ParserPropertyWidget (QWidget *parent=nullptr) | |
| ~ParserPropertyWidget () | |
| std::unique_ptr< ParserInterface > | createParser () const |
| Creates parser from parser properties. More... | |
| void | setTargetCanvas (const QStringList &canvas_names, int current_index) |
| Sets list of canvas names as possible import targets. More... | |
Private Slots | |
| void | onParserPropertyChange () |
Private Member Functions | |
| void | addCustomSeparatorRow (QGridLayout *layout, QButtonGroup *group) |
| Adds row to the grid: elements with custom separator settings. More... | |
| void | addIgnoreNumbersPatternRow (QGridLayout *layout) |
| Adds row to the grid: elements with pattern to ignore line numbers. More... | |
| void | addIgnoreStringPatternRow (QGridLayout *layout) |
| Adds row to the grid: elements with pattern to ignore lines. More... | |
| void | addImportToBlock (QGridLayout *layout) |
| Adds row to the grid: elements related to the import target. More... | |
| void | addSectionLabel (const QString &text, QGridLayout *layout) |
| void | addStandardSeparatorRow (QGridLayout *layout, QButtonGroup *group) |
| Adds row to the grid: elements with standard separator settings. More... | |
| QGridLayout * | createGridLayout () |
| void | readSettings () |
| Reads widget settings. More... | |
| void | writeSettings () |
| Writes widget settings. More... | |
Private Attributes | |
| QLineEdit * | m_customSeparatorLineEdit {nullptr} |
| ParserOptions | m_options |
| QButtonGroup * | m_separatorButtonGroup {nullptr} |
| QComboBox * | m_targetCanvasCombo {nullptr} |
Panel to setup ASCII parser.
Intended for concrete class DefaultParser. Contains selection of separator symbols, patterns to ignore lines, and import target settings.
Definition at line 35 of file parserpropertywidget.h.
| gui2::ParserPropertyWidget::ParserPropertyWidget | ( | QWidget * | parent = nullptr | ) |
Definition at line 63 of file parserpropertywidget.cpp.
References createGridLayout(), and readSettings().
| gui2::ParserPropertyWidget::~ParserPropertyWidget | ( | ) |
Definition at line 72 of file parserpropertywidget.cpp.
References writeSettings().
|
private |
Adds row to the grid: elements with custom separator settings.
Definition at line 208 of file parserpropertywidget.cpp.
References CUSTOM, m_customSeparatorLineEdit, m_options, gui2::ParserOptions::m_separator, onParserPropertyChange(), and ModelView::Utils::WidthOfLetterM().
Referenced by createGridLayout().
|
private |
Adds row to the grid: elements with pattern to ignore line numbers.
Definition at line 278 of file parserpropertywidget.cpp.
References m_options, gui2::ParserOptions::m_skip_index_pattern, and onParserPropertyChange().
Referenced by createGridLayout().
|
private |
Adds row to the grid: elements with pattern to ignore lines.
Definition at line 242 of file parserpropertywidget.cpp.
References gui2::ParserOptions::m_header_prefix, m_options, and onParserPropertyChange().
Referenced by createGridLayout().
|
private |
Adds row to the grid: elements related to the import target.
Definition at line 317 of file parserpropertywidget.cpp.
References m_targetCanvasCombo, and targetCanvasChanged().
Referenced by createGridLayout().
|
private |
|
private |
Adds row to the grid: elements with standard separator settings.
Definition at line 165 of file parserpropertywidget.cpp.
References AUTOMATIC, COMMA, m_options, gui2::ParserOptions::m_separator, onParserPropertyChange(), and SPACE.
Referenced by createGridLayout().
|
private |
Definition at line 133 of file parserpropertywidget.cpp.
References addCustomSeparatorRow(), addIgnoreNumbersPatternRow(), addIgnoreStringPatternRow(), addImportToBlock(), addSectionLabel(), addStandardSeparatorRow(), and m_separatorButtonGroup.
Referenced by ParserPropertyWidget().
| std::unique_ptr< ParserInterface > gui2::ParserPropertyWidget::createParser | ( | ) | const |
Creates parser from parser properties.
Definition at line 79 of file parserpropertywidget.cpp.
References m_options, and gui2::ParserOptions::m_separator.
Referenced by gui2::LoaderSelectorPanel::createParser().
|
privateslot |
Definition at line 96 of file parserpropertywidget.cpp.
References gui2::ParserOptions::m_header_prefix, m_options, gui2::ParserOptions::m_separator, gui2::ParserOptions::m_skip_index_pattern, and parserPropertyChanged().
Referenced by addCustomSeparatorRow(), addIgnoreNumbersPatternRow(), addIgnoreStringPatternRow(), and addStandardSeparatorRow().
|
signal |
Referenced by gui2::LoaderSelectorPanel::init_connections(), and onParserPropertyChange().
|
private |
Reads widget settings.
Definition at line 107 of file parserpropertywidget.cpp.
References m_customSeparatorLineEdit, m_separatorButtonGroup, and PyUtils::toString().
Referenced by ParserPropertyWidget().
| void gui2::ParserPropertyWidget::setTargetCanvas | ( | const QStringList & | canvas_names, |
| int | current_index | ||
| ) |
Sets list of canvas names as possible import targets.
Definition at line 90 of file parserpropertywidget.cpp.
References m_targetCanvasCombo.
Referenced by gui2::LoaderSelectorPanel::setTargetCanvas().
|
signal |
Referenced by addImportToBlock(), and gui2::LoaderSelectorPanel::init_connections().
|
private |
Writes widget settings.
Definition at line 125 of file parserpropertywidget.cpp.
References m_customSeparatorLineEdit, and m_separatorButtonGroup.
Referenced by ~ParserPropertyWidget().
|
private |
Definition at line 70 of file parserpropertywidget.h.
Referenced by addCustomSeparatorRow(), readSettings(), and writeSettings().
|
private |
Definition at line 67 of file parserpropertywidget.h.
Referenced by addCustomSeparatorRow(), addIgnoreNumbersPatternRow(), addIgnoreStringPatternRow(), addStandardSeparatorRow(), createParser(), and onParserPropertyChange().
|
private |
Definition at line 68 of file parserpropertywidget.h.
Referenced by createGridLayout(), readSettings(), and writeSettings().
|
private |
Definition at line 69 of file parserpropertywidget.h.
Referenced by addImportToBlock(), and setTargetCanvas().