EMEAWindow Class Reference

Generic framework for various evaluation apps. More...

#include <emea.h>

Inheritance diagram for EMEAWindow:

QMainWindow
Collaboration diagram for EMEAWindow:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 EMEAWindow (QWidget *)
 default constructor
 ~EMEAWindow ()
 destructor
void closeEvent (QCloseEvent *)
 Intercept the close event.

Protected Slots

void addWidgetToStack (QWidget *w, bool scrollarea=false)
 Add a widget to the stacked gui.

Protected Member Functions

virtual void setupChain (int threads)=0
 initialize the chain of evaluation
virtual void autoStart ()
 Start the evaluation.
void addToChainStart (NSCore::DataSetProducer *)
 Add elements to the start of the chain.
void addLogging (QString name, QObject *, const char *)
 Add a signal to the logging.
void addThread (QThread *)
 Add the threads to a list that gets stopped automaticly.
template<class ThreadClass>
ThreadClass * objectInNewThread ()
 Instantiate an object in its own thread and return the pointer.
SpectrumGuiCreatorspectrumGuiCreator ()
 The bridge to create Spectrum-Guis for new Spectra.
QStringList arguments ()
 The arguments used to start the app.
void addToChain (NSCore::DataSetChainMember *)
 Add elements to the chain.
void addToChain (QList< NSCore::DataSetChainMember * >)
 Add elements to the chain.

Private Slots

void lateInit ()
 Do the real setup after all the constructors are run.
void delayedAutoStart ()
 Execute the autoStart() with some time-delay so things can settle.
void toggleOsci (bool)
 Switch the connection to the osci.
void toggleViewer (bool)
 Switch the connection to the result-viewer.
void loadXmlFromFile ()
 Xml-stuff...
void loadXmlFromFile (QString)
 Xml-stuff...
void loadXml (QDomDocument)
 Xml-stuff...
void saveXmlToFile ()
 Xml-stuff...
void saveXml (QDomNode, QDomDocument)
 Xml-stuff...

Private Attributes

Private * d


Detailed Description

Generic framework for various evaluation apps.

EMEA stands for Epos Modularized Evaluation Applications.

Todo:
Tutorial how to write emea-apps

Constructor & Destructor Documentation

EMEAWindow::EMEAWindow ( QWidget  ) 

default constructor

EMEAWindow::~EMEAWindow (  ) 

destructor


Member Function Documentation

void EMEAWindow::closeEvent ( QCloseEvent *   ) 

Intercept the close event.

virtual void EMEAWindow::setupChain ( int  threads  )  [protected, pure virtual]

initialize the chain of evaluation

This function is called at the right time during startup to initialize the needed chain of producers and chain-members for the given task.

You compiler will tell you that you have to implement this function. Trust him.

Use addToChainStart() and addToChain() to add elements to the chain and use addWidgetToStack() to add widgets to the stacked gui.

virtual void EMEAWindow::autoStart (  )  [inline, protected, virtual]

Start the evaluation.

The app was told (via commandline) to start the evaluation by itself. Do this here...

void EMEAWindow::addToChainStart ( NSCore::DataSetProducer  )  [protected]

Add elements to the start of the chain.

void EMEAWindow::addToChain ( NSCore::DataSetChainMember  )  [protected]

Add elements to the chain.

Each call will create a new level in the chain. The elements of each level are connected with all elements of the previous (thus producing) level and with all elements of the next (consuming) level.

void EMEAWindow::addToChain ( QList< NSCore::DataSetChainMember * >   )  [protected]

Add elements to the chain.

Each call will create a new level in the chain. The elements of each level are connected with all elements of the previous (thus producing) level and with all elements of the next (consuming) level.

void EMEAWindow::addLogging ( QString  name,
QObject ,
const char *   
) [protected]

Add a signal to the logging.

void EMEAWindow::addThread ( QThread  )  [protected]

Add the threads to a list that gets stopped automaticly.

Referenced by objectInNewThread().

template<class ThreadClass>
ThreadClass* EMEAWindow::objectInNewThread (  )  [inline, protected]

Instantiate an object in its own thread and return the pointer.

This one makes multi-thread emea apps most easy. Simply create the object via this template function and you get threads for free.

You have to add the objects to the chain by hand.

References addThread(), NSCore::Thread_Template< ThreadClass >::item(), and NSCore::Thread_Template< ThreadClass >::waitForStarted().

SpectrumGuiCreator* EMEAWindow::spectrumGuiCreator (  )  [protected]

The bridge to create Spectrum-Guis for new Spectra.

QStringList EMEAWindow::arguments (  )  [protected]

The arguments used to start the app.

void EMEAWindow::addWidgetToStack ( QWidget w,
bool  scrollarea = false 
) [protected, slot]

Add a widget to the stacked gui.

When the widget has an object name (set with setObjectName()) this will be used, if it has an icon (set with setWindowIcon()) this will be used too.

Parameters:
w The widget to add.
scrollarea Whether the widget should be added inside a QScrollArea. Defaults to false.

void EMEAWindow::lateInit (  )  [private, slot]

Do the real setup after all the constructors are run.

C++ forbids to call the virtual setupChain() from the constructor of EMEAWindow, so we schedule lateInit() first after entering the event -loop.

void EMEAWindow::delayedAutoStart (  )  [private, slot]

Execute the autoStart() with some time-delay so things can settle.

void EMEAWindow::toggleOsci ( bool   )  [private, slot]

Switch the connection to the osci.

void EMEAWindow::toggleViewer ( bool   )  [private, slot]

Switch the connection to the result-viewer.

void EMEAWindow::loadXmlFromFile (  )  [private, slot]

Xml-stuff...

void EMEAWindow::loadXmlFromFile ( QString   )  [private, slot]

Xml-stuff...

void EMEAWindow::loadXml ( QDomDocument   )  [private, slot]

Xml-stuff...

void EMEAWindow::saveXmlToFile (  )  [private, slot]

Xml-stuff...

void EMEAWindow::saveXml ( QDomNode  ,
QDomDocument   
) [private, slot]

Xml-stuff...


Member Data Documentation

Private* EMEAWindow::d [private]


The documentation for this class was generated from the following file:

Generated on Tue Apr 12 02:10:11 2011 for epos by  doxygen 1.5.5