Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

OmgAlgorithmManager Class Reference
[Gui]

#include <omgalgorithmmanager.h>

Inheritance diagram for OmgAlgorithmManager:

Inheritance graph
[legend]
Collaboration diagram for OmgAlgorithmManager:

Collaboration graph
[legend]
List of all members.

Detailed Description

A manager for customising algorithm profiles.

Definition at line 38 of file omgalgorithmmanager.h.

Public Slots

void cellClicked (int theRow, int theColumn)
void selectAlgorithm (QString theProfileName)
void on_pbnClone_clicked ()
void on_pbnDelete_clicked ()
void on_pbnApply_clicked ()
void on_pbnDefaults_clicked ()
void refreshAlgorithmTable (QString theGuid="")

Public Member Functions

 OmgAlgorithmManager (QWidget *parent=0, Qt::WFlags fl=0)
 ~OmgAlgorithmManager ()

Protected Slots

void resizeEvent (QResizeEvent *theEvent)

Private Types

typedef QMap< QString, QWidget * > ParametersMap
 A container type for a widget that represents an entry box for a parameter.
typedef QMap< QString, QString > DefaultParametersMap
 for storing default settings for alg widgets - key is widget name, val is default
typedef QMap< QString, QWidget * > ParameterLabels
 a container for storing the label widget that is associated with each parameter
typedef QMap< QString, QWidget * > DescriptionLabels
 a container for storing the description labels, one for each parameter

Private Member Functions

bool saveAlgorithm (OmgAlgorithm &theAlgorithm)
void setParametersGui (OmgAlgorithm &theAlgorithm)

Private Attributes

QVBoxLayout * mpLayout2
 a layout for the parameters frame on the form
QScrollArea * mpScrollArea3
 a scrollarea to go inside the layout
QFrame * mpQFrame4
 a frame to go into the scroll area
QGridLayout * mpLayout5
 a grid layout to apply to the frame - alg parameters will be added to this
ParametersMap mParametersMap
 An instance of the above container type.
DefaultParametersMap mDefaultParametersMap
ParameterLabels mLabelsMap
DescriptionLabels mDescriptionLabelsMap
OmgAlgorithmSet mAlgorithmSet
 A container for all the algorithm profiles we are working with.


Member Typedef Documentation

typedef QMap<QString, QString> OmgAlgorithmManager::DefaultParametersMap [private]
 

for storing default settings for alg widgets - key is widget name, val is default

Definition at line 90 of file omgalgorithmmanager.h.

typedef QMap<QString, QWidget *> OmgAlgorithmManager::DescriptionLabels [private]
 

a container for storing the description labels, one for each parameter

Definition at line 96 of file omgalgorithmmanager.h.

typedef QMap<QString, QWidget *> OmgAlgorithmManager::ParameterLabels [private]
 

a container for storing the label widget that is associated with each parameter

Definition at line 93 of file omgalgorithmmanager.h.

typedef QMap<QString, QWidget *> OmgAlgorithmManager::ParametersMap [private]
 

A container type for a widget that represents an entry box for a parameter.

Definition at line 86 of file omgalgorithmmanager.h.


Constructor & Destructor Documentation

OmgAlgorithmManager::OmgAlgorithmManager QWidget parent = 0,
Qt::WFlags  fl = 0
 

Definition at line 44 of file omgalgorithmmanager.cpp.

References cellClicked(), mpLayout2, mpLayout5, mpQFrame4, mpScrollArea3, and refreshAlgorithmTable().

OmgAlgorithmManager::~OmgAlgorithmManager  ) 
 

Definition at line 67 of file omgalgorithmmanager.cpp.


Member Function Documentation

void OmgAlgorithmManager::cellClicked int  theRow,
int  theColumn
[slot]
 

Definition at line 142 of file omgalgorithmmanager.cpp.

References selectAlgorithm().

Referenced by OmgAlgorithmManager().

void OmgAlgorithmManager::on_pbnApply_clicked  )  [slot]
 

Definition at line 262 of file omgalgorithmmanager.cpp.

References OmgAlgorithmSet::addAlgorithm(), OmgAlgorithmSet::contains(), OmgAlgorithmSet::getAlgorithm(), OmgAlgorithmParameter::id(), mAlgorithmSet, mParametersMap, OmgAlgorithm::name(), OmgAlgorithm::parameter(), refreshAlgorithmTable(), saveAlgorithm(), OmgAlgorithm::setName(), OmgAlgorithm::setParameters(), and OmgAlgorithmParameter::setValue().

void OmgAlgorithmManager::on_pbnClone_clicked  )  [slot]
 

Definition at line 196 of file omgalgorithmmanager.cpp.

References OmgAlgorithmSet::addAlgorithm(), OmgAlgorithmSet::contains(), OmgAlgorithmSet::getAlgorithm(), mAlgorithmSet, OmgAlgorithm::name(), refreshAlgorithmTable(), saveAlgorithm(), OmgGuid::setGuid(), OmgAlgorithm::setName(), and OmgAlgorithm::setOrigin().

void OmgAlgorithmManager::on_pbnDefaults_clicked  )  [slot]
 

Definition at line 476 of file omgalgorithmmanager.cpp.

References mDefaultParametersMap, and mParametersMap.

void OmgAlgorithmManager::on_pbnDelete_clicked  )  [slot]
 

Definition at line 226 of file omgalgorithmmanager.cpp.

References refreshAlgorithmTable().

void OmgAlgorithmManager::refreshAlgorithmTable QString  theGuid = ""  )  [slot]
 

Refresh the list of algorithms in the alg table

Parameters:
theGuid an optional parameter specifying the algorithm that should be selected after the table is refreshed. Leave it blank and the first cell will be selected by default

Definition at line 78 of file omgalgorithmmanager.cpp.

References OmgAlgorithmSet::clear(), OmgAlgorithmSet::count(), OmgAlgorithmSet::getFromActivePlugin(), OmgGuid::guid(), OmgAlgorithmSet::loadAlgorithms(), mAlgorithmSet, OmgAlgorithm::name(), OmgAlgorithm::origin(), and selectAlgorithm().

Referenced by OmgAlgorithmManager(), on_pbnApply_clicked(), on_pbnClone_clicked(), and on_pbnDelete_clicked().

void OmgAlgorithmManager::resizeEvent QResizeEvent *  theEvent  )  [protected, slot]
 

Definition at line 73 of file omgalgorithmmanager.cpp.

bool OmgAlgorithmManager::saveAlgorithm OmgAlgorithm theAlgorithm  )  [private]
 

Save the alg (passed by ref) to disk into the users alg profiles area

Definition at line 502 of file omgalgorithmmanager.cpp.

Referenced by on_pbnApply_clicked(), and on_pbnClone_clicked().

void OmgAlgorithmManager::selectAlgorithm QString  theProfileName  )  [slot]
 

Definition at line 148 of file omgalgorithmmanager.cpp.

References OmgAlgorithm::author(), OmgAlgorithm::bibliography(), OmgAlgorithm::codeAuthor(), OmgAlgorithm::description(), OmgAlgorithmSet::getAlgorithm(), OmgAlgorithm::id(), mAlgorithmSet, OmgAlgorithm::name(), OmgAlgorithm::origin(), OmgAlgorithm::overview(), OmgAlgorithm::parameterCount(), setParametersGui(), and OmgAlgorithm::version().

Referenced by cellClicked(), and refreshAlgorithmTable().

void OmgAlgorithmManager::setParametersGui OmgAlgorithm theAlgorithm  )  [private]
 

Definition at line 327 of file omgalgorithmmanager.cpp.

References OmgAlgorithmParameter::defaultValue(), OmgAlgorithmParameter::description(), OmgAlgorithmParameter::id(), OmgAlgorithmParameter::maximum(), mDefaultParametersMap, mDescriptionLabelsMap, OmgAlgorithmParameter::minimum(), mLabelsMap, mParametersMap, mpLayout5, mpQFrame4, OmgAlgorithmParameter::name(), OmgAlgorithmParameter::type(), and OmgAlgorithmParameter::value().

Referenced by selectAlgorithm().

Here is the call graph for this function:


Member Data Documentation

OmgAlgorithmSet OmgAlgorithmManager::mAlgorithmSet [private]
 

A container for all the algorithm profiles we are working with.

Definition at line 100 of file omgalgorithmmanager.h.

Referenced by on_pbnApply_clicked(), on_pbnClone_clicked(), refreshAlgorithmTable(), and selectAlgorithm().

DefaultParametersMap OmgAlgorithmManager::mDefaultParametersMap [private]
 

Definition at line 91 of file omgalgorithmmanager.h.

Referenced by on_pbnDefaults_clicked(), and setParametersGui().

DescriptionLabels OmgAlgorithmManager::mDescriptionLabelsMap [private]
 

Definition at line 97 of file omgalgorithmmanager.h.

Referenced by setParametersGui().

ParameterLabels OmgAlgorithmManager::mLabelsMap [private]
 

Definition at line 94 of file omgalgorithmmanager.h.

Referenced by setParametersGui().

ParametersMap OmgAlgorithmManager::mParametersMap [private]
 

An instance of the above container type.

Definition at line 88 of file omgalgorithmmanager.h.

Referenced by on_pbnApply_clicked(), on_pbnDefaults_clicked(), and setParametersGui().

QVBoxLayout* OmgAlgorithmManager::mpLayout2 [private]
 

a layout for the parameters frame on the form

Definition at line 77 of file omgalgorithmmanager.h.

Referenced by OmgAlgorithmManager().

QGridLayout* OmgAlgorithmManager::mpLayout5 [private]
 

a grid layout to apply to the frame - alg parameters will be added to this

Definition at line 83 of file omgalgorithmmanager.h.

Referenced by OmgAlgorithmManager(), and setParametersGui().

QFrame* OmgAlgorithmManager::mpQFrame4 [private]
 

a frame to go into the scroll area

Definition at line 81 of file omgalgorithmmanager.h.

Referenced by OmgAlgorithmManager(), and setParametersGui().

QScrollArea* OmgAlgorithmManager::mpScrollArea3 [private]
 

a scrollarea to go inside the layout

Definition at line 79 of file omgalgorithmmanager.h.

Referenced by OmgAlgorithmManager().


The documentation for this class was generated from the following files:
Generated on Mon Apr 28 15:12:29 2008 for openModellerDesktop by  doxygen 1.4.1-20050210