BornAgain
1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Resides at the bottom of SampleView and displays a Python script.
Definition at line 31 of file ScriptPanel.h.
Public Member Functions | |
ScriptPanel (QWidget *parent) | |
void | onSampleModified () |
void | setCurrentSample (MultiLayerItem *sampleItem) |
Protected Member Functions | |
void | hideEvent (QHideEvent *) override |
void | showEvent (QShowEvent *) override |
Private Member Functions | |
QString | generateCodeSnippet () |
generates string representing code snippet for all multi layers in the model More... | |
void | updateEditor () |
Update the editor with the script content. More... | |
Private Attributes | |
CautionSign * | m_cautionSign |
MultiLayerItem * | m_currentMultiLayerItem |
PythonSyntaxHighlighter * | m_highlighter |
QTextEdit * | m_textEdit |
UpdateTimer * | m_updateTimer |
|
explicit |
Definition at line 35 of file ScriptPanel.cpp.
References DesignerHelper::getPythonEditorFontSize(), m_textEdit, m_updateTimer, UpdateTimer::timeToUpdate(), and updateEditor().
|
private |
generates string representing code snippet for all multi layers in the model
Definition at line 101 of file ScriptPanel.cpp.
References CautionSign::clear(), GUI::Transform::ToCore::itemToSample(), m_cautionSign, m_currentMultiLayerItem, and CautionSign::setCautionMessage().
Referenced by updateEditor().
|
overrideprotected |
Definition at line 96 of file ScriptPanel.cpp.
References m_updateTimer, and UpdateTimer::reset().
void ScriptPanel::onSampleModified | ( | ) |
Definition at line 67 of file ScriptPanel.cpp.
References m_updateTimer, and UpdateTimer::scheduleUpdate().
Referenced by SampleView::SampleView().
void ScriptPanel::setCurrentSample | ( | MultiLayerItem * | sampleItem | ) |
Definition at line 61 of file ScriptPanel.cpp.
References m_currentMultiLayerItem, and updateEditor().
Referenced by SampleView::SampleView().
|
overrideprotected |
Definition at line 91 of file ScriptPanel.cpp.
References m_updateTimer, and UpdateTimer::scheduleUpdate().
|
private |
Update the editor with the script content.
Definition at line 73 of file ScriptPanel.cpp.
References generateCodeSnippet(), m_highlighter, and m_textEdit.
Referenced by ScriptPanel(), and setCurrentSample().
|
private |
Definition at line 54 of file ScriptPanel.h.
Referenced by generateCodeSnippet().
|
private |
Definition at line 55 of file ScriptPanel.h.
Referenced by generateCodeSnippet(), and setCurrentSample().
|
private |
Definition at line 52 of file ScriptPanel.h.
Referenced by updateEditor().
|
private |
Definition at line 51 of file ScriptPanel.h.
Referenced by ScriptPanel(), and updateEditor().
|
private |
Definition at line 53 of file ScriptPanel.h.
Referenced by ScriptPanel(), hideEvent(), onSampleModified(), and showEvent().