BornAgain
1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Application wide settings.
Contains settings which the user can change. Also contains settings which may be user editable in the future.
Definition at line 27 of file ApplicationSettings.h.
Classes | |
struct | Palette |
Public Types | |
enum class | Style { native , light , dark } |
Public Member Functions | |
ApplicationSettings () | |
bool | createNewProjectOnStartup () const |
ApplicationSettings::Style | currentStyle () |
QVariant | defaultFunctionalities (const QVariant &absenceValue) const |
bool | defaultIsSingleInstrumentMode () const |
bool | defaultIsSingleSampleMode () const |
bool | defaultUnitIsAngstrom () const |
void | loadStyle (ApplicationSettings::Style style) |
void | loadWindowSizeAndPos (QWidget *w) |
void | saveWindowSizeAndPos (const QWidget *w) |
void | setCreateNewProjectOnStartup (bool b) |
void | setDefaultFunctionalities (const QVariant &functionalities) |
void | setDefaultIsSingleInstrumentMode (bool b) |
void | setDefaultIsSingleSampleMode (bool b) |
void | setDefaultUnitIsAngstrom (bool b) const |
void | setStyleToUse (Style style) |
const Palette & | styleSheetPalette () const |
Style | styleToUse () const |
bool | useNativeFileDialog () const |
Private Attributes | |
ApplicationSettings::Style | m_currentStyle |
Palette | m_styleSheetPalette |
|
strong |
Enumerator | |
---|---|
native | |
light | |
dark |
Definition at line 29 of file ApplicationSettings.h.
ApplicationSettings::ApplicationSettings | ( | ) |
Definition at line 38 of file ApplicationSettings.cpp.
References appSettings.
bool ApplicationSettings::createNewProjectOnStartup | ( | ) | const |
Definition at line 53 of file ApplicationSettings.cpp.
Referenced by MainWindow::MainWindow(), and ActionManager::onAboutToShowSettingsMenu().
ApplicationSettings::Style ApplicationSettings::currentStyle | ( | ) |
Definition at line 185 of file ApplicationSettings.cpp.
References m_currentStyle.
Referenced by GroupBoxCollapser::GroupBoxCollapser(), and ActionManager::onAboutToShowSettingsMenu().
QVariant ApplicationSettings::defaultFunctionalities | ( | const QVariant & | absenceValue | ) | const |
Definition at line 73 of file ApplicationSettings.cpp.
Referenced by ProjectManager::createNewProject().
bool ApplicationSettings::defaultIsSingleInstrumentMode | ( | ) | const |
Definition at line 83 of file ApplicationSettings.cpp.
Referenced by ProjectManager::createNewProject().
bool ApplicationSettings::defaultIsSingleSampleMode | ( | ) | const |
Definition at line 93 of file ApplicationSettings.cpp.
Referenced by ProjectManager::createNewProject().
bool ApplicationSettings::defaultUnitIsAngstrom | ( | ) | const |
Definition at line 103 of file ApplicationSettings.cpp.
Referenced by LayerOrientedSampleEditor::LayerOrientedSampleEditor(), and ActionManager::onAboutToShowSettingsMenu().
void ApplicationSettings::loadStyle | ( | ApplicationSettings::Style | style | ) |
Definition at line 133 of file ApplicationSettings.cpp.
References dark, ApplicationSettings::Palette::headlineBackground, ApplicationSettings::Palette::headlineText, light, m_currentStyle, and m_styleSheetPalette.
Referenced by main(), and ActionManager::onAboutToShowSettingsMenu().
void ApplicationSettings::loadWindowSizeAndPos | ( | QWidget * | w | ) |
Definition at line 121 of file ApplicationSettings.cpp.
Referenced by InstrumentLibraryEditor::InstrumentLibraryEditor(), MaterialEditorDialog::MaterialEditorDialog(), and PythonScriptWidget::PythonScriptWidget().
void ApplicationSettings::saveWindowSizeAndPos | ( | const QWidget * | w | ) |
Definition at line 113 of file ApplicationSettings.cpp.
Referenced by InstrumentLibraryEditor::~InstrumentLibraryEditor(), MaterialEditorDialog::~MaterialEditorDialog(), and PythonScriptWidget::~PythonScriptWidget().
void ApplicationSettings::setCreateNewProjectOnStartup | ( | bool | b | ) |
Definition at line 58 of file ApplicationSettings.cpp.
Referenced by ActionManager::onAboutToShowSettingsMenu().
void ApplicationSettings::setDefaultFunctionalities | ( | const QVariant & | functionalities | ) |
Definition at line 78 of file ApplicationSettings.cpp.
Referenced by ProjectSettingsView::storeAsDefaults().
void ApplicationSettings::setDefaultIsSingleInstrumentMode | ( | bool | b | ) |
Definition at line 88 of file ApplicationSettings.cpp.
Referenced by ProjectSettingsView::storeAsDefaults().
void ApplicationSettings::setDefaultIsSingleSampleMode | ( | bool | b | ) |
Definition at line 98 of file ApplicationSettings.cpp.
Referenced by ProjectSettingsView::storeAsDefaults().
void ApplicationSettings::setDefaultUnitIsAngstrom | ( | bool | b | ) | const |
Definition at line 108 of file ApplicationSettings.cpp.
Referenced by ActionManager::onAboutToShowSettingsMenu().
void ApplicationSettings::setStyleToUse | ( | Style | style | ) |
Definition at line 68 of file ApplicationSettings.cpp.
Referenced by ActionManager::onAboutToShowSettingsMenu().
const ApplicationSettings::Palette & ApplicationSettings::styleSheetPalette | ( | ) | const |
Definition at line 190 of file ApplicationSettings.cpp.
References m_styleSheetPalette.
Referenced by RealDataTreeModel::data(), and InstrumentsTreeModel::data().
ApplicationSettings::Style ApplicationSettings::styleToUse | ( | ) | const |
bool ApplicationSettings::useNativeFileDialog | ( | ) | const |
Definition at line 44 of file ApplicationSettings.cpp.
Referenced by RealDataSelectorWidget::importData1D(), RealDataSelectorWidget::importData2D(), NewProjectDialog::onBrowseDirectory(), PythonScriptWidget::onExportToFileButton(), ProjectManager::openProject(), RealSpaceCanvas::savePicture(), GUI::Plot::savePlot(), and SaveProjectionsAssistant::saveProjections().
|
private |
Definition at line 65 of file ApplicationSettings.h.
Referenced by currentStyle(), and loadStyle().
|
private |
Definition at line 66 of file ApplicationSettings.h.
Referenced by loadStyle(), and styleSheetPalette().