#include <preferencesbase.h>
It is instantiation during startup of the program and then reads the settings from an ini file or the registry, providing defaults if no settings can be found.
Definition at line 49 of file preferencesbase.h.
Public Slots | |
void | loadSettings () |
Loads the program settings from file. | |
void | saveSettings () |
Saves the program settings to file. | |
void | updateVisuals () |
Updates the background image & color of the mainwindow and sets the style. | |
Signals | |
void | newPVMHosts (const QStringList &hosts) |
Public Member Functions | |
PreferencesBase (QWidget *parent=0, const char *name=0, bool modal=FALSE, WFlags fl=0) | |
~PreferencesBase () | |
The default destructor. | |
unsigned int | preferredBasisset () const |
Returns the index of the basisset used as the preferred basisset. | |
bool | useBinDirectory () const |
Returns true if the .11 should be written to a special directory (different from the calculation directory). | |
GLBaseParameters | getGLBaseParameters () const |
Returns a struct containing all OpenGL parameters used in GLView. | |
GLMoleculeParameters | getGLMoleculeParameters () const |
Returns a struct containing all OpenGL parameters used in GLSimpleMoleculeView. | |
QStringList | getPVMHosts () const |
Returns the list of available PVM hosts. | |
void | setToolbarsInfo (const QString &info, const bool status) |
Sets the info needed to restore the toolbars. | |
void | getToolbarsInfo (bool &status, QString &info) const |
Returns the info needed to restore the toolbars. | |
Protected Slots | |
void | accept () |
Overridden version of PreferencesWidget::accept(). | |
void | reject () |
Overridden version of PreferencesWidget::reject(). | |
Private Types | |
enum | { SettingsVersion = 100 } |
Private Slots | |
void | changed () |
Sets the 'changed' status of PreferencesBase. | |
void | selectWidget (QIconViewItem *item) |
Shows a widget from WidgetStackCategory depending on the iconview item. | |
void | changeExecutable () |
Updates LabelProgram & LineEditExecutable with the currently selected item in ListViewExecutables. | |
void | updateExecutable (const QString &text) |
Updates the current item of ListViewExecutables with text . | |
void | updateAllExecutables () |
Renames all items of ListViewExecutables according to the pattern path+name+extension. | |
void | selectBinDir () |
Selects a new directory for LineEditBin using a standard filedialog. | |
void | selectExecutable () |
Selects an executable for LineEditExecutable using a standard filedialog. | |
void | selectBasisDir () |
Selects a new directory for LineEditBasis using a standard filedialog. | |
void | selectBackground () |
Selects a background image for LineEditBackground using a standard filedialog. | |
void | updateLineEditBondSizeLines () |
Updates LineEditBondSizeLines according to SliderBondSizeLines. | |
void | updateLineEditBondSizeTubes () |
Updates LineEditBondSizeTubes according to SliderBondSizeTubes. | |
void | updateSliderBondSizeTubes () |
Updates SliderBondSizeTubes according to LineEditBondSizeTubes. | |
void | updateLineEditForceSizeTubes () |
Updates LineEditForceSizeTubes according to SliderForceSizeTubes. | |
void | updateSliderForceSizeTubes () |
Updates SliderForceSizeTubes according to LineEditForceSizeTubes. | |
void | updateOpacitySelection () |
Updates TextLabelSelection according to SliderSelectionOpacity. | |
void | updateOpacityForces () |
Updates TextLabelForces according to SliderForcesOpacity. | |
void | updateColorButtonForce () |
Enables/disables ColorButtonForce according to the selected colring type. | |
void | changePVMHost () |
Updates LineEditPVMHost with the selected item in ListViewPVMHosts. | |
void | updatePVMHost (const QString &text) |
Updates the current item of ListViewPVMHosts with text. | |
void | newPVMHost () |
Adds a new host to ListViewPVMHosts with the name 'new host'. | |
void | deletePVMHost () |
Removes the currently selected host of ListViewPVMHosts. | |
void | changedPVM () |
Indicates that the PVM host list has changed. | |
Private Member Functions | |
void | makeConnections () |
Sets up all permanent coonections. | |
void | init () |
Initializes the widget. Called once from the constructor. | |
void | initOpenGL () |
Determines the capabilities of the current OpenGL implementation. | |
void | saveWidgets () |
Saves the status of the widgets to the struct data. | |
void | restoreWidgets () |
Restores the status of the widgets from the contents of the struct data. | |
void | updateStyle () |
Updates the style of the application according to the current item of ComboBoxStyle. | |
void | updatePaths () |
Updates the data of the class Paths. | |
Private Attributes | |
QString | startupStyleName |
Contains the startup style name. | |
QextMdiMainFrm * | mainWindow |
Contains a pointer to the main window. | |
WidgetData | data |
Contains the status of all widgets. | |
bool | widgetChanged |
= true if any of the widgets have changed. | |
bool | pvmHostsChanged |
= true if the PVM host list has changed. | |
QString | tempBondSizeBS |
Contains the bond size for ball&stick. | |
QString | tempBondSizeL |
Contains the bond size for lines. | |
float | minLineWidthGL |
Contains the minimum possible linewidth for a glLineWidth call. | |
float | maxLineWidthGL |
Contains the maximum possible linewidth for a glLineWidth call. | |
float | lineWidthGranularity |
Contains the granularity for OpenGL linewidths. | |
QString | toolbarsInfo |
Contains the info needed to restore the toolbars. | |
bool | toolbarsStatus |
Contains the visibility of the statusbar (not present in toolbarsInfo). | |
Classes | |
struct | WidgetData |
A struct for saving the status of all widgets of PreferencesWidget. More... |
|
Definition at line 108 of file preferencesbase.h. |
|
Definition at line 87 of file preferencesbase.cpp. |
|
The default destructor.
Definition at line 103 of file preferencesbase.cpp. |
|
Returns the index of the basisset used as the preferred basisset.
Definition at line 110 of file preferencesbase.cpp. |
|
Returns true if the .11 should be written to a special directory (different from the calculation directory).
Definition at line 117 of file preferencesbase.cpp. |
|
Returns a struct containing all OpenGL parameters used in GLView.
Definition at line 125 of file preferencesbase.cpp. |
|
Returns a struct containing all OpenGL parameters used in GLSimpleMoleculeView.
Definition at line 173 of file preferencesbase.cpp. |
|
Returns the list of available PVM hosts.
Definition at line 202 of file preferencesbase.cpp. |
|
Sets the info needed to restore the toolbars.
Definition at line 209 of file preferencesbase.cpp. |
|
Returns the info needed to restore the toolbars.
Definition at line 217 of file preferencesbase.cpp. |
|
|
|
Loads the program settings from file. On linux, this file is $HOME/.qt/brabosphererc while on Windows they are read from the registry. It also sets up the geometry of the widgets. Definition at line 230 of file preferencesbase.cpp. |
|
Saves the program settings to file. ATM only called from the destructor, but possibly useful as a public slot. The following stuff is or should be saved:
Definition at line 324 of file preferencesbase.cpp. |
|
Updates the background image & color of the mainwindow and sets the style.
Definition at line 404 of file preferencesbase.cpp. |
|
Overridden version of PreferencesWidget::accept(). Sets the accept/reject status of the widget depending on whether any actual changes have been made. Definition at line 435 of file preferencesbase.cpp. |
|
Overridden version of PreferencesWidget::reject(). Rejects any possible changes made. Definition at line 459 of file preferencesbase.cpp. |
|
Sets the 'changed' status of PreferencesBase.
Definition at line 477 of file preferencesbase.cpp. |
|
Shows a widget from WidgetStackCategory depending on the iconview item.
Definition at line 484 of file preferencesbase.cpp. |
|
Updates LabelProgram & LineEditExecutable with the currently selected item in ListViewExecutables.
Definition at line 500 of file preferencesbase.cpp. |
|
Updates the current item of ListViewExecutables with
Definition at line 515 of file preferencesbase.cpp. |
|
Renames all items of ListViewExecutables according to the pattern path+name+extension.
Definition at line 526 of file preferencesbase.cpp. |
|
Selects a new directory for LineEditBin using a standard filedialog.
Definition at line 574 of file preferencesbase.cpp. |
|
Selects an executable for LineEditExecutable using a standard filedialog.
Definition at line 583 of file preferencesbase.cpp. |
|
Selects a new directory for LineEditBasis using a standard filedialog.
Definition at line 592 of file preferencesbase.cpp. |
|
Selects a background image for LineEditBackground using a standard filedialog.
Definition at line 601 of file preferencesbase.cpp. |
|
Updates LineEditBondSizeLines according to SliderBondSizeLines.
Definition at line 610 of file preferencesbase.cpp. |
|
Updates LineEditBondSizeTubes according to SliderBondSizeTubes.
Definition at line 617 of file preferencesbase.cpp. |
|
Updates SliderBondSizeTubes according to LineEditBondSizeTubes.
Definition at line 626 of file preferencesbase.cpp. |
|
Updates LineEditForceSizeTubes according to SliderForceSizeTubes.
Definition at line 635 of file preferencesbase.cpp. |
|
Updates SliderForceSizeTubes according to LineEditForceSizeTubes.
Definition at line 644 of file preferencesbase.cpp. |
|
Updates TextLabelSelection according to SliderSelectionOpacity.
Definition at line 653 of file preferencesbase.cpp. |
|
Updates TextLabelForces according to SliderForcesOpacity.
Definition at line 663 of file preferencesbase.cpp. |
|
Enables/disables ColorButtonForce according to the selected colring type.
Definition at line 673 of file preferencesbase.cpp. |
|
Updates LineEditPVMHost with the selected item in ListViewPVMHosts.
Definition at line 680 of file preferencesbase.cpp. |
|
Updates the current item of ListViewPVMHosts with text.
Definition at line 700 of file preferencesbase.cpp. |
|
Adds a new host to ListViewPVMHosts with the name 'new host'.
Definition at line 711 of file preferencesbase.cpp. |
|
Removes the currently selected host of ListViewPVMHosts.
Definition at line 719 of file preferencesbase.cpp. |
|
Indicates that the PVM host list has changed.
Definition at line 733 of file preferencesbase.cpp. |
|
Sets up all permanent coonections.
Definition at line 745 of file preferencesbase.cpp. |
|
Initializes the widget. Called once from the constructor.
Definition at line 832 of file preferencesbase.cpp. |
|
Determines the capabilities of the current OpenGL implementation. ATM: minimum/maximum linewidth, linewidth granularity in the future: stereo mode, etc. Called once from the constructor. Definition at line 905 of file preferencesbase.cpp. |
|
Saves the status of the widgets to the struct data.
Definition at line 937 of file preferencesbase.cpp. |
|
Restores the status of the widgets from the contents of the struct data.
Definition at line 1010 of file preferencesbase.cpp. |
|
Updates the style of the application according to the current item of ComboBoxStyle.
Definition at line 1080 of file preferencesbase.cpp. |
|
Updates the data of the class Paths.
Definition at line 1102 of file preferencesbase.cpp. |
|
Contains the startup style name.
Definition at line 173 of file preferencesbase.h. |
|
Contains a pointer to the main window.
Definition at line 174 of file preferencesbase.h. |
|
Contains the status of all widgets.
Definition at line 176 of file preferencesbase.h. |
|
= true if any of the widgets have changed.
Definition at line 177 of file preferencesbase.h. |
|
= true if the PVM host list has changed.
Definition at line 178 of file preferencesbase.h. |
|
Contains the bond size for ball&stick.
Definition at line 179 of file preferencesbase.h. |
|
Contains the bond size for lines.
Definition at line 180 of file preferencesbase.h. |
|
Contains the minimum possible linewidth for a glLineWidth call.
Definition at line 181 of file preferencesbase.h. |
|
Contains the maximum possible linewidth for a glLineWidth call.
Definition at line 182 of file preferencesbase.h. |
|
Contains the granularity for OpenGL linewidths.
Definition at line 183 of file preferencesbase.h. |
|
Contains the info needed to restore the toolbars.
Definition at line 184 of file preferencesbase.h. |
|
Contains the visibility of the statusbar (not present in toolbarsInfo).
Definition at line 185 of file preferencesbase.h. |