Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

GlobalParametersDialog Class Reference

#include <GlobalParametersDialog.h>

List of all members.

Public Member Functions

 GlobalParametersDialog (QWidget *parent, DBInterface *netDBInterface, SimulationManager *)
bool loadParameters ()
 ~GlobalParametersDialog ()

Private Slots

void applyButtonPressed ()
void cancelButtonPressed ()
void loadDefaultsButtonPressed ()
void makeDefaultsButtonPressed ()
void okButtonPressed ()

Private Member Functions

void addParameter (QString *labelText, QLineEdit *lineEdit, QVBoxLayout *vBox)
 GlobalParametersDialog (const GlobalParametersDialog &)
GlobalParametersDialog operator= (const GlobalParametersDialog &)
void storeParameters ()

Private Attributes

map< const char *, bool, charKeyCompare > boolParameterMap
map< const char *, QCheckBox *,
charKeyCompare > 
checkBoxMap
map< const char *, double,
charKeyCompare > 
defaultValueMap
map< const char *, QString *,
charKeyCompare > 
labelMap
map< const char *, QLineEdit *,
charKeyCompare > 
lineEditMap
QStringList mapKeyStrList
DBInterface * networkDBInterface
QDoubleValidator * paramValidator
SimulationManagersimulationManager


Detailed Description

Dialog that enables the editing of parameters that apply across the simulation as a whole.

Definition at line 46 of file GlobalParametersDialog.h.


Constructor & Destructor Documentation

GlobalParametersDialog::GlobalParametersDialog QWidget *  parent,
DBInterface *  netDBInter,
SimulationManager simMan
 

Constructor.

Definition at line 42 of file GlobalParametersDialog.cpp.

References addParameter(), applyButtonPressed(), boolParameterMap, cancelButtonPressed(), checkBoxMap, defaultValueMap, labelMap, lineEditMap, loadDefaultsButtonPressed(), makeDefaultsButtonPressed(), mapKeyStrList, networkDBInterface, okButtonPressed(), paramValidator, and simulationManager.

GlobalParametersDialog::~GlobalParametersDialog  ) 
 

Destructor.

Definition at line 182 of file GlobalParametersDialog.cpp.

References labelMap.

GlobalParametersDialog::GlobalParametersDialog const GlobalParametersDialog  )  [private]
 

Declare copy constructor private so it cannot be used inadvertently.


Member Function Documentation

void GlobalParametersDialog::addParameter QString *  labelText,
QLineEdit *  lineEdit,
QVBoxLayout *  vBox
[private]
 

Adds a parameter to the dialog.

Definition at line 337 of file GlobalParametersDialog.cpp.

References paramValidator.

Referenced by GlobalParametersDialog().

void GlobalParametersDialog::applyButtonPressed  )  [private, slot]
 

Stores the global parameters when the apply button is pressed.

Definition at line 292 of file GlobalParametersDialog.cpp.

References SimulationManager::setGlobalParameters(), simulationManager, and storeParameters().

Referenced by GlobalParametersDialog().

void GlobalParametersDialog::cancelButtonPressed  )  [private, slot]
 

Slot connected to cancel button that closes dialog without storing values.

Definition at line 299 of file GlobalParametersDialog.cpp.

Referenced by GlobalParametersDialog().

void GlobalParametersDialog::loadDefaultsButtonPressed  )  [private, slot]
 

Loads up the default parameters.

Definition at line 305 of file GlobalParametersDialog.cpp.

References boolParameterMap, checkBoxMap, defaultValueMap, and lineEditMap.

Referenced by GlobalParametersDialog().

bool GlobalParametersDialog::loadParameters  ) 
 

Extract the current values of the parameters from the database NOTE This assumes that there is at least 1 parameter.

Definition at line 199 of file GlobalParametersDialog.cpp.

References checkBoxMap, defaultValueMap, lineEditMap, and networkDBInterface.

Referenced by SimulationWidget::globalParamButtonPressed().

void GlobalParametersDialog::makeDefaultsButtonPressed  )  [private, slot]
 

Makes the currently entered parameters the defaults.

Definition at line 319 of file GlobalParametersDialog.cpp.

Referenced by GlobalParametersDialog().

void GlobalParametersDialog::okButtonPressed  )  [private, slot]
 

Stores the parameters and hides the dialog.

Definition at line 325 of file GlobalParametersDialog.cpp.

References SimulationManager::setGlobalParameters(), simulationManager, and storeParameters().

Referenced by GlobalParametersDialog().

GlobalParametersDialog GlobalParametersDialog::operator= const GlobalParametersDialog  )  [private]
 

Declare assignment private so it cannot be used inadvertently.

void GlobalParametersDialog::storeParameters  )  [private]
 

Stores the parameters in the database.

Definition at line 350 of file GlobalParametersDialog.cpp.

References checkBoxMap, lineEditMap, and networkDBInterface.

Referenced by applyButtonPressed(), and okButtonPressed().


Member Data Documentation

map<const char*, bool, charKeyCompare> GlobalParametersDialog::boolParameterMap [private]
 

Records whether a value is a check box type. Only check box values are included in this map.

Definition at line 85 of file GlobalParametersDialog.h.

Referenced by GlobalParametersDialog(), and loadDefaultsButtonPressed().

map<const char*, QCheckBox*, charKeyCompare> GlobalParametersDialog::checkBoxMap [private]
 

Holds references to all the check boxes.

Definition at line 88 of file GlobalParametersDialog.h.

Referenced by GlobalParametersDialog(), loadDefaultsButtonPressed(), loadParameters(), and storeParameters().

map<const char *, double, charKeyCompare> GlobalParametersDialog::defaultValueMap [private]
 

Map holding the default values for each of the parameters.

Definition at line 81 of file GlobalParametersDialog.h.

Referenced by GlobalParametersDialog(), loadDefaultsButtonPressed(), and loadParameters().

map<const char *, QString*, charKeyCompare> GlobalParametersDialog::labelMap [private]
 

Map holding all the descriptions for the labels.

Definition at line 78 of file GlobalParametersDialog.h.

Referenced by GlobalParametersDialog(), and ~GlobalParametersDialog().

map<const char *, QLineEdit*, charKeyCompare> GlobalParametersDialog::lineEditMap [private]
 

Map holding all the references to the line edits.

Definition at line 75 of file GlobalParametersDialog.h.

Referenced by GlobalParametersDialog(), loadDefaultsButtonPressed(), loadParameters(), and storeParameters().

QStringList GlobalParametersDialog::mapKeyStrList [private]
 

Holds all the map keys so they do not vanish.

Definition at line 91 of file GlobalParametersDialog.h.

Referenced by GlobalParametersDialog().

DBInterface* GlobalParametersDialog::networkDBInterface [private]
 

Reference to database handling class.

Definition at line 66 of file GlobalParametersDialog.h.

Referenced by GlobalParametersDialog(), loadParameters(), and storeParameters().

QDoubleValidator* GlobalParametersDialog::paramValidator [private]
 

Validator for line edit input.

Definition at line 72 of file GlobalParametersDialog.h.

Referenced by addParameter(), and GlobalParametersDialog().

SimulationManager* GlobalParametersDialog::simulationManager [private]
 

Reference to simulation manager.

Definition at line 69 of file GlobalParametersDialog.h.

Referenced by applyButtonPressed(), GlobalParametersDialog(), and okButtonPressed().


The documentation for this class was generated from the following files:
Generated on Mon Sep 3 22:29:05 2007 for SpikeStream Application by  doxygen 1.4.4