NSCore::MathTreeRoot Class Reference

#include <mathexpression.h>

Inheritance diagram for NSCore::MathTreeRoot:

NSCore::MathExpression NSCore::QTreeItem QObject NSCore::PointerProtection_Skel NSEvaluation::FilterExpression
Collaboration diagram for NSCore::MathTreeRoot:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 MathTreeRoot (NSCore::QTreeItem *parent)
 ~MathTreeRoot ()
void deleteMe (MathExpression *exp, NSCore::GuiServer_Interface *gui)
 delete items in a thread-save way...
void addChild (MathExpression *pexp, NSCore::GuiServer_Interface *gui)
 add new items in a thread-save way...
double value (AcqisitionDataSet &)
 Abstract function that does the work.
QStringList guiActions () const
 GUI: return the supported actions.
void guiExecAction (QString, GuiServer_Interface *)
 GUI: execute the named action.
void setSingleChild (bool n)
bool singleChild () const

Properties

bool singleChild

Private Slots

void workOnCache ()

Private Member Functions

QString debug () const
 Custom debug text.
QDomNode saveToXML (QDomDocument doc)
 Store the information of this element into a new QDomElement.
bool restoreFromXML (QDomNode node)
 Restore the state of this element from the given QDomNode.
bool createFromXML (QDomNode)
 Create childs from XML.

Private Attributes

QList< QPair< QString,
NSCore::MathExpression * > > 
_childsToAdd
bool _singleChild


Constructor & Destructor Documentation

NSCore::MathTreeRoot::MathTreeRoot ( NSCore::QTreeItem parent  ) 

NSCore::MathTreeRoot::~MathTreeRoot (  ) 


Member Function Documentation

void NSCore::MathTreeRoot::deleteMe ( MathExpression exp,
NSCore::GuiServer_Interface gui 
) [virtual]

delete items in a thread-save way...

...by handing the action to the parent until it gets handled in a different way.

Reimplemented from NSCore::MathExpression.

void NSCore::MathTreeRoot::addChild ( MathExpression pexp,
NSCore::GuiServer_Interface gui 
) [virtual]

add new items in a thread-save way...

...by handing the action to the parent until it gets handled in a different way.

Reimplemented from NSCore::MathExpression.

double NSCore::MathTreeRoot::value ( AcqisitionDataSet  )  [virtual]

Abstract function that does the work.

This has to be implemented to do the work.

Implements NSCore::MathExpression.

Reimplemented in NSEvaluation::FilterExpression.

QStringList NSCore::MathTreeRoot::guiActions (  )  const [inline, virtual]

GUI: return the supported actions.

These actions will get symbols/buttons to get executed.

If you implement this, remember to call the parent guiActions() too:

 SomeTreeItem::guiActions() const {
   return QStringList() << <your actions> << BaseClass::guiActions();
 }

Reimplemented from NSCore::MathExpression.

References NSCore::QTreeItem::guiActions().

void NSCore::MathTreeRoot::guiExecAction ( QString  n,
GuiServer_Interface gui 
) [virtual]

GUI: execute the named action.

If you implemented guiActions() you will also want to implement this. If you can't handle the named action yourself, call guiExecAction() of the parent class.

Of course this can also be used as a filter if you want to restrict access to actions of the parent class.

The second parameter lets you interact with the user by some basic means.

Parameters:
n The action to execute
gui The gui to use for interactions

Reimplemented from NSCore::MathExpression.

void NSCore::MathTreeRoot::setSingleChild ( bool  n  )  [inline]

References _singleChild.

bool NSCore::MathTreeRoot::singleChild (  )  const [inline]

References _singleChild.

void NSCore::MathTreeRoot::workOnCache (  )  [private, slot]

QString NSCore::MathTreeRoot::debug (  )  const [inline, private, virtual]

Custom debug text.

This function has to be implemented and has to return the internal debug-data that is to be printed...

Implements NSCore::QTreeItem.

Reimplemented in NSEvaluation::FilterExpression.

QDomNode NSCore::MathTreeRoot::saveToXML ( QDomDocument  doc  )  [private, virtual]

Store the information of this element into a new QDomElement.

This function is only to save the state of this element, all the recursive stuff will be done by toXml().

Parameters:
doc The QDomDocument to use for creation of the element

Implements NSCore::QTreeItem.

Reimplemented in NSEvaluation::FilterExpression.

bool NSCore::MathTreeRoot::restoreFromXML ( QDomNode  node  )  [private, virtual]

Restore the state of this element from the given QDomNode.

You don't have to do the recursive stuff here, that is handled in fromXml() for you. Only the things done in saveToXML need/can be restored here.

If you succeeded and want the childs to be restored too, return true.

Parameters:
node The QDomNode to restore from

Implements NSCore::QTreeItem.

Reimplemented in NSEvaluation::FilterExpression.

bool NSCore::MathTreeRoot::createFromXML ( QDomNode  node  )  [private, virtual]

Create childs from XML.

On fromXml() this gets called after successfull return from restoreFromXML(). If you want to create childs of this item from the childs of the QDomNode given, you can do so.

The return value defines whether fromXml will be called on the childs for the child-xml-items.

The default implementation returns true, so the child items get a chance to restore their state too.

Parameters:
node The QDomNode to restore from

Reimplemented from NSCore::QTreeItem.


Member Data Documentation

QList< QPair<QString,NSCore::MathExpression*> > NSCore::MathTreeRoot::_childsToAdd [private]

Referenced by setSingleChild(), and singleChild().


Property Documentation

bool NSCore::MathTreeRoot::singleChild [read, write]


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

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