XbraboView Class Reference

#include <xbraboview.h>

List of all members.


Detailed Description

This class is the MDI view widget which also holds all data pertaining a calculation.

Definition at line 56 of file xbraboview.h.

Public Slots

void setModified (bool state=true)
 Sets the 'modified' status of the calculation.
void moleculeReadCoordinates ()
 Reads coordinates into the AtomSet from a file.
void moleculeSaveCoordinates ()
 Saves the coordinates from the AtomSet into a file.
void moleculeFPS ()
 Calculates the Frames-Per-Second for the current parameters.
void setupGlobal ()
 Sets up the global options.
void setupBrabo ()
 Sets up the Brabo options.
void setupRelax ()
 Sets up the Relax options.
void setupFreq ()
 Sets up the Distor & Forkon options. Not implemented yet.
void setupBuur ()
 Sets up the Buur options. Not implemented yet.
void start ()
 Starts the calculation.
void pause ()
 Pauses the calculation.
void stop ()
 Stops a running calculation.
void writeInput ()
 Writes the needed input files for a calculation.
void cleanCalculation ()
 Cleans the calculation directory.
void viewOutput ()
 Shows the output from the calculation.
void updatePVMHosts (const QStringList &hosts)
 Updates the PVM host list for BraboBase.
void showProperties ()
 Changes which properties are shown in the OpenGL window.

Signals

void changed ()

Public Member Functions

 XbraboView (QWidget *mainWin, QWidget *parent=0, QString title=QString::null, const char *name=0, WFlags f=0)
 The default constructor.
 ~XbraboView ()
 The default destructor.
unsigned int calculationType () const
 Returns the type of the calculation.
unsigned int buurType () const
 Returns the type of crystal environment used.
bool isModified () const
 Returns true if the calculation has been modified and should be saved.
QString name () const
 Returns the name of the calculation.
QString fileName () const
 Returns the filename of the calculation.
QString directory () const
 Returns the directory of the calculation.
bool isRunning () const
 Returns true if the calculation is running.
bool isPaused () const
 Returns true if the calculation is paused.
void cut ()
 Deletes the marked text and puts it on the clipboard.
void copy ()
 Copies the marked text to the clipboard.
void paste ()
 Pastes the contents from the clipboard.
GLMoleculeViewmoleculeView () const
 Returns a pointer to the GLMoleculeView class.
bool loadCML (const QDomDocument *doc)
 Loads all calculation data from a QDomDocument. It returns the success status.
QDomDocument * saveCML ()
 Saves the calculation to a QDomDocument.
void setFileName (const QString filename)
 Sets the filename of the calculation.

Protected Member Functions

void keyPressEvent (QKeyEvent *e)
 Overridden from QextMdiChildFrm::keyPressEvent.
void mouseReleaseEvent (QMouseEvent *e)
 Overridden from QextMdiChildFrm::mouseReleaseEvent.

Private Slots

void popup ()
 Shows a popupmenu with menuoptions.
void updateIteration (unsigned int iteration, double energy)
 Updates the status window with a new iteration and energy.
void updateCycle (unsigned int cycle)
 Updates the status window with a new cycle.
void cleanupCalculation (unsigned int error)
 Does the cleanup after a calculation has ended. The type of error is passed.
void showOutput (QListViewItem *item, const QPoint &, int column)
 Shows the output corresponding to the item clicked on.

Private Member Functions

void loadCMLLocal (const QDomElement *root)
 Loads the positions and sizes of the XbraboView widgets from a QDomElement.
void saveCMLLocal (QDomElement *root)
 Saves the positions and sizes of the XbraboView widgets to a QDomElement.
void updateCaptions ()
 Updates the captions for the widget and taskbar.
void updateBraboSetup ()
 Updates braboSetup according to globalSetup.
void updateRelaxSetup ()
 Updates relaxSetup according to globalSetup.
bool makeDirCurrent (const QString dir, const QString title)
 Makes dir the current directory.
void initGlobalSetup ()
 Construct the GlobalBase widget globalSetup if needed.
void initBraboSetup ()
 Construct the BraboBase widget braboSetup if needed.
void initRelaxSetup ()
 Construct the RelaxBase widget relaxSetup if needed.
bool initCalculation ()
 Construct the Calculation if needed and does an initial setup.
void updateAtomSet ()
 Does the necessary updating when the AtomSet has been changed.

Private Attributes

QVBoxLayout * BigLayout
 Main layout for the widget.
QSplitter * Splitter
 Splitter between the OpenGL window and the statuswindow.
GLMoleculeViewMoleculeView
 The OpenGL view.
QVBoxLayout * StatusLayout
 A sublayout for the status window.
QLabel * TextLabelStatus
 The label above the status window.
StatusTextTextEditStatus
 The status window itself.
QHBoxLayout * ProgressLayout
 A sublayout for the progressbar.
QLabel * TextLabelProgress
 A textlabel for the progressbar.
QProgressBar * ProgressBar
 The progressbar itself.
GlobalBaseglobalSetup
 Dialog for setup of global options.
BraboBasebraboSetup
 Dialog for setup of Brabo options.
RelaxBaserelaxSetup
 Dialog for setup of Relax options.
QWidget * mainWindow
 A pointer to the QextMDIMainFrm as the parent can be zero (used for Toplevel mode).
bool calcModified
 = TRUE if calculation has been modified and should be saved.
QString calcDefaultName
 The default name of the calculation constructed from calcCounter.
QString calcFileName
 The filename of the calculation.
QString calcDate
 The creation date of the calculation as saved in the CML file.
AtomSetatoms
 Contains the atoms and their properties.
unsigned int calcBraboSteps
 Contains the maximum number of brabo iterations.
unsigned int lastProgress
 The progress from the last brabo calculation.
Calculationcalculation
 The calculation class.
QStringList hostListPVM
 A temporary copy of the PVM host list in case braboSetup is not initialized yet.

Static Private Attributes

static unsigned int calcCounter = 0
 A counter that holds the number of new calculations for the current session.


Constructor & Destructor Documentation

XbraboView::XbraboView QWidget *  mainWin,
QWidget *  parent = 0,
QString  title = QString::null,
const char *  name = 0,
WFlags  f = 0
 

The default constructor.

Warning:
parent is not Xbrabo, but QextMdiChildArea or 0 (can dynamically change!). => pointer to Xbrabo passed using mainWin

Definition at line 82 of file xbraboview.cpp.

XbraboView::~XbraboView  ) 
 

The default destructor.

Definition at line 178 of file xbraboview.cpp.


Member Function Documentation

unsigned int XbraboView::calculationType  )  const
 

Returns the type of the calculation.

  • GlobalBase::SINGLE_POINT_ENERGY
  • GlobalBase::ENERGY_AND_FORCES
  • GlobalBase::GEOMETRY_OPTIMIZATION
  • GlobalBase::FREQUENCIES

Definition at line 185 of file xbraboview.cpp.

unsigned int XbraboView::buurType  )  const
 

Returns the type of crystal environment used.

Definition at line 199 of file xbraboview.cpp.

bool XbraboView::isModified  )  const
 

Returns true if the calculation has been modified and should be saved.

Definition at line 212 of file xbraboview.cpp.

QString XbraboView::name  )  const
 

Returns the name of the calculation.

Definition at line 226 of file xbraboview.cpp.

QString XbraboView::fileName  )  const
 

Returns the filename of the calculation.

Definition at line 236 of file xbraboview.cpp.

QString XbraboView::directory  )  const
 

Returns the directory of the calculation.

Definition at line 243 of file xbraboview.cpp.

bool XbraboView::isRunning  )  const
 

Returns true if the calculation is running.

Definition at line 253 of file xbraboview.cpp.

bool XbraboView::isPaused  )  const
 

Returns true if the calculation is paused.

Definition at line 263 of file xbraboview.cpp.

void XbraboView::cut  ) 
 

Deletes the marked text and puts it on the clipboard.

It is currently only connected to the cut facility of StatusText. As that is read-only, nothing is actually cut, only put on the clipboard.

Definition at line 280 of file xbraboview.cpp.

void XbraboView::copy  ) 
 

Copies the marked text to the clipboard.

It is currently only connected to the copy facility of StatusText.

Definition at line 289 of file xbraboview.cpp.

void XbraboView::paste  ) 
 

Pastes the contents from the clipboard.

It is currently only connected to the paste facility of StatusText. As that is read-only, nothing actually happens.

Definition at line 297 of file xbraboview.cpp.

GLMoleculeView * XbraboView::moleculeView  )  const
 

Returns a pointer to the GLMoleculeView class.

Definition at line 306 of file xbraboview.cpp.

bool XbraboView::loadCML const QDomDocument *  doc  ) 
 

Loads all calculation data from a QDomDocument. It returns the success status.

Definition at line 313 of file xbraboview.cpp.

QDomDocument * XbraboView::saveCML  ) 
 

Saves the calculation to a QDomDocument.

Definition at line 436 of file xbraboview.cpp.

void XbraboView::setFileName const QString  filename  ) 
 

Sets the filename of the calculation.

Definition at line 527 of file xbraboview.cpp.

void XbraboView::changed  )  [signal]
 

void XbraboView::setModified bool  state = true  )  [slot]
 

Sets the 'modified' status of the calculation.

Defaults to true if no argument is provided.

Definition at line 539 of file xbraboview.cpp.

void XbraboView::moleculeReadCoordinates  )  [slot]
 

Reads coordinates into the AtomSet from a file.

Definition at line 557 of file xbraboview.cpp.

void XbraboView::moleculeSaveCoordinates  )  [slot]
 

Saves the coordinates from the AtomSet into a file.

Definition at line 587 of file xbraboview.cpp.

void XbraboView::moleculeFPS  )  [slot]
 

Calculates the Frames-Per-Second for the current parameters.

Definition at line 606 of file xbraboview.cpp.

void XbraboView::setupGlobal  )  [slot]
 

Sets up the global options.

Definition at line 613 of file xbraboview.cpp.

void XbraboView::setupBrabo  )  [slot]
 

Sets up the Brabo options.

Definition at line 628 of file xbraboview.cpp.

void XbraboView::setupRelax  )  [slot]
 

Sets up the Relax options.

Definition at line 660 of file xbraboview.cpp.

void XbraboView::setupFreq  )  [slot]
 

Sets up the Distor & Forkon options. Not implemented yet.

Definition at line 680 of file xbraboview.cpp.

void XbraboView::setupBuur  )  [slot]
 

Sets up the Buur options. Not implemented yet.

Definition at line 686 of file xbraboview.cpp.

void XbraboView::start  )  [slot]
 

Starts the calculation.

Definition at line 692 of file xbraboview.cpp.

void XbraboView::pause  )  [slot]
 

Pauses the calculation.

Definition at line 754 of file xbraboview.cpp.

void XbraboView::stop  )  [slot]
 

Stops a running calculation.

Definition at line 772 of file xbraboview.cpp.

void XbraboView::writeInput  )  [slot]
 

Writes the needed input files for a calculation.

Definition at line 783 of file xbraboview.cpp.

void XbraboView::cleanCalculation  )  [slot]
 

Cleans the calculation directory.

Definition at line 808 of file xbraboview.cpp.

void XbraboView::viewOutput  )  [slot]
 

Shows the output from the calculation.

Definition at line 818 of file xbraboview.cpp.

void XbraboView::updatePVMHosts const QStringList &  hosts  )  [slot]
 

Updates the PVM host list for BraboBase.

Definition at line 867 of file xbraboview.cpp.

void XbraboView::showProperties  )  [slot]
 

Changes which properties are shown in the OpenGL window.

This is done through a MoleculePropertiesWidget.

Definition at line 1322 of file xbraboview.cpp.

void XbraboView::keyPressEvent QKeyEvent *  e  )  [protected]
 

Overridden from QextMdiChildFrm::keyPressEvent.

Sends unhandled key events to the main window.

Definition at line 882 of file xbraboview.cpp.

void XbraboView::mouseReleaseEvent QMouseEvent *  e  )  [protected]
 

Overridden from QextMdiChildFrm::mouseReleaseEvent.

Handles left mouse button releases. This will popup a contextmenu.

Definition at line 897 of file xbraboview.cpp.

void XbraboView::popup  )  [private, slot]
 

Shows a popupmenu with menuoptions.

Definition at line 912 of file xbraboview.cpp.

void XbraboView::updateIteration unsigned int  iteration,
double  energy
[private, slot]
 

Updates the status window with a new iteration and energy.

Definition at line 1014 of file xbraboview.cpp.

void XbraboView::updateCycle unsigned int  cycle  )  [private, slot]
 

Updates the status window with a new cycle.

Definition at line 1037 of file xbraboview.cpp.

void XbraboView::cleanupCalculation unsigned int  error  )  [private, slot]
 

Does the cleanup after a calculation has ended. The type of error is passed.

Definition at line 1078 of file xbraboview.cpp.

void XbraboView::showOutput QListViewItem *  item,
const QPoint &  ,
int  column
[private, slot]
 

Shows the output corresponding to the item clicked on.

Definition at line 1122 of file xbraboview.cpp.

void XbraboView::loadCMLLocal const QDomElement *  root  )  [private]
 

Loads the positions and sizes of the XbraboView widgets from a QDomElement.

Definition at line 1355 of file xbraboview.cpp.

void XbraboView::saveCMLLocal QDomElement *  root  )  [private]
 

Saves the positions and sizes of the XbraboView widgets to a QDomElement.

Definition at line 1388 of file xbraboview.cpp.

void XbraboView::updateCaptions  )  [private]
 

Updates the captions for the widget and taskbar.

Definition at line 1404 of file xbraboview.cpp.

void XbraboView::updateBraboSetup  )  [private]
 

Updates braboSetup according to globalSetup.

Definition at line 1418 of file xbraboview.cpp.

void XbraboView::updateRelaxSetup  )  [private]
 

Updates relaxSetup according to globalSetup.

Definition at line 1431 of file xbraboview.cpp.

bool XbraboView::makeDirCurrent const QString  dir,
const QString  title
[private]
 

Makes dir the current directory.

Shows a messagebox with the error and title when something goes wrong.

Definition at line 1444 of file xbraboview.cpp.

void XbraboView::initGlobalSetup  )  [private]
 

Construct the GlobalBase widget globalSetup if needed.

Definition at line 1466 of file xbraboview.cpp.

void XbraboView::initBraboSetup  )  [private]
 

Construct the BraboBase widget braboSetup if needed.

It also calls initGlobalSetup as it needs data from it.

Definition at line 1478 of file xbraboview.cpp.

void XbraboView::initRelaxSetup  )  [private]
 

Construct the RelaxBase widget relaxSetup if needed.

It also calls initGlobalSetup as it needs data from it.

Definition at line 1494 of file xbraboview.cpp.

bool XbraboView::initCalculation  )  [private]
 

Construct the Calculation if needed and does an initial setup.

This function is to be called by start(), loadCML and writeInput. It returns false if any error occurs.

Definition at line 1508 of file xbraboview.cpp.

void XbraboView::updateAtomSet  )  [private]
 

Does the necessary updating when the AtomSet has been changed.

This means new coordinates have been read from file or atoms have been added/deleted.

Definition at line 1569 of file xbraboview.cpp.


Member Data Documentation

QVBoxLayout* XbraboView::BigLayout [private]
 

Main layout for the widget.

Definition at line 133 of file xbraboview.h.

QSplitter* XbraboView::Splitter [private]
 

Splitter between the OpenGL window and the statuswindow.

Definition at line 134 of file xbraboview.h.

GLMoleculeView* XbraboView::MoleculeView [private]
 

The OpenGL view.

Definition at line 135 of file xbraboview.h.

QVBoxLayout* XbraboView::StatusLayout [private]
 

A sublayout for the status window.

Definition at line 136 of file xbraboview.h.

QLabel* XbraboView::TextLabelStatus [private]
 

The label above the status window.

Definition at line 137 of file xbraboview.h.

StatusText* XbraboView::TextEditStatus [private]
 

The status window itself.

Definition at line 138 of file xbraboview.h.

QHBoxLayout* XbraboView::ProgressLayout [private]
 

A sublayout for the progressbar.

Definition at line 139 of file xbraboview.h.

QLabel* XbraboView::TextLabelProgress [private]
 

A textlabel for the progressbar.

Definition at line 140 of file xbraboview.h.

QProgressBar* XbraboView::ProgressBar [private]
 

The progressbar itself.

Definition at line 141 of file xbraboview.h.

GlobalBase* XbraboView::globalSetup [private]
 

Dialog for setup of global options.

Definition at line 143 of file xbraboview.h.

BraboBase* XbraboView::braboSetup [private]
 

Dialog for setup of Brabo options.

Definition at line 144 of file xbraboview.h.

RelaxBase* XbraboView::relaxSetup [private]
 

Dialog for setup of Relax options.

Definition at line 145 of file xbraboview.h.

QWidget* XbraboView::mainWindow [private]
 

A pointer to the QextMDIMainFrm as the parent can be zero (used for Toplevel mode).

Definition at line 147 of file xbraboview.h.

bool XbraboView::calcModified [private]
 

= TRUE if calculation has been modified and should be saved.

Definition at line 150 of file xbraboview.h.

QString XbraboView::calcDefaultName [private]
 

The default name of the calculation constructed from calcCounter.

Definition at line 151 of file xbraboview.h.

QString XbraboView::calcFileName [private]
 

The filename of the calculation.

Definition at line 152 of file xbraboview.h.

QString XbraboView::calcDate [private]
 

The creation date of the calculation as saved in the CML file.

Definition at line 153 of file xbraboview.h.

AtomSet* XbraboView::atoms [private]
 

Contains the atoms and their properties.

Definition at line 154 of file xbraboview.h.

unsigned int XbraboView::calcBraboSteps [private]
 

Contains the maximum number of brabo iterations.

Definition at line 156 of file xbraboview.h.

unsigned int XbraboView::lastProgress [private]
 

The progress from the last brabo calculation.

Definition at line 157 of file xbraboview.h.

Calculation* XbraboView::calculation [private]
 

The calculation class.

Definition at line 158 of file xbraboview.h.

QStringList XbraboView::hostListPVM [private]
 

A temporary copy of the PVM host list in case braboSetup is not initialized yet.

Definition at line 159 of file xbraboview.h.

unsigned int XbraboView::calcCounter = 0 [static, private]
 

A counter that holds the number of new calculations for the current session.

Definition at line 161 of file xbraboview.h.


Generated on Fri May 19 14:31:58 2006 for Brabosphere by  doxygen 1.4.6-NO