LibEngsas
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
EDependencyItem Class Reference

#include <edependencyitem.h>

+ Inheritance diagram for EDependencyItem:
+ Collaboration diagram for EDependencyItem:

Public Member Functions

 EDependencyItem (EXmlItem *parent=NULL)
 
QVariant data (int column, int role=Qt::DisplayRole) const
 used by EXmlModel::data() to retrieve the role data of this item. More...
 
bool load (const QDomElement element, QMap< QString, EXmlParserItem * > parser)
 
bool save (QDomElement &useElem)
 
void setName (QString name)
 
QString name () const
 
void setVersion (QString version)
 
QString version () const
 
void setWebsite (QString url)
 
QString website () const
 
EXmlItemcopy () const
 Returns a pointer to a new element, copied from this one. More...
 
- Public Member Functions inherited from EXmlItem
 EXmlItem (QString tagName, EXmlItem *parent=0)
 
virtual ~EXmlItem ()
 
int rowCount () const
 
virtual bool setData (int column, QVariant value, int role=Qt::EditRole)
 Called by EXmlModel::setData() to set the role data for this item to value. More...
 
virtual void setParent (EXmlItem *parent)
 Do not forget to call the base class implementation, when reimplementing this function. More...
 
EXmlItemparent () const
 
virtual bool addChild (int row, EXmlItem *item, bool emitInsertRows=true)
 Adds item as a child to this item at position row. More...
 
virtual bool removeChild (int row, bool emitRemoveRows=true)
 Removes and deletes the child at row. More...
 
EXmlItemchild (int row) const
 
int row (EXmlItem *child) const
 Returns the row of the child. More...
 
void setTagName (QString tagName)
 
QString tagName () const
 Return the tag name (in lowercase), which is handled by this EXmlItem. More...
 

Static Public Member Functions

static EXmlItemcreate (EXmlModel *model)
 

Private Attributes

QString myName
 
QString myVersion
 
QString myWebsite
 

Additional Inherited Members

- Signals inherited from EXmlItem
void changed (EXmlItem *item)
 
void rowsAboutToBeInserted (EXmlItem *parent, int start, int end)
 
void rowsInserted ()
 
void rowsAboutToBeRemoved (EXmlItem *parent, int start, int end)
 
void rowsRemoved ()
 
- Protected Slots inherited from EXmlItem
virtual void changedByPass (EXmlItem *item)
 Just forwards the changed signal. More...
 
virtual void rowsAboutToBeInsertedByPass (EXmlItem *parent, int start, int end)
 Just forwards the rowsAboutToBeInserted() signal. More...
 
virtual void rowsInsertedByPass ()
 Just forwards the rowsInserted() signal. More...
 
virtual void rowsAboutToBeRemovedByPass (EXmlItem *parent, int start, int end)
 Just forwards the rowsAboutToBeRemoved() signal. More...
 
virtual void rowsRemovedByPass ()
 Just forwards the rowsRemoved() signal. More...
 
- Protected Member Functions inherited from EXmlItem
virtual void copyBase (EXmlItem *target) const
 Copies all the standard stuff into target. More...
 

Constructor & Destructor Documentation

EDependencyItem::EDependencyItem ( EXmlItem parent = NULL)
inline

+ Here is the caller graph for this function:

Member Function Documentation

EXmlItem * EDependencyItem::copy ( ) const
virtual

Returns a pointer to a new element, copied from this one.

To copy all standard stuff, use the copyBase(EXmlItem*) function. So implement this function in all base classes like this:

YourClass *myCopy = new YourClass();
copyBase(myCopy);
// now set your custom values. e.g.:
myCopy->setCustomValue(customValue());
return myCopy;

Remember, that copyBase() does copy recursivly. That means, it adds copies of all children to the copy.

Implements EXmlItem.

+ Here is the call graph for this function:

EXmlItem * EDependencyItem::create ( EXmlModel model)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

QVariant EDependencyItem::data ( int  column,
int  role = Qt::DisplayRole 
) const
virtual

used by EXmlModel::data() to retrieve the role data of this item.

Implement this function to return data to the view

See also
EDependencyItem::data()

Implements EXmlItem.

+ Here is the call graph for this function:

bool EDependencyItem::load ( const QDomElement  element,
QMap< QString, EXmlParserItem * >  parser 
)
virtual

Is called from the Model or the parent item, to load the content of element. Therefore this function must also create child EXmlItem's, if child tags are found, which can not be handled by it's own. For this purpose the mapping parser is given. The key of this map is the tagName which belongs to the parser item. If the found tag is not in the list, return false. If it is found, call the EXmlParseritem::load(QDomElement, EXmlItem *, QMap<QString, EXmlParserItem*>) function to process underlaying data. But create a new QDomElement as a child.

Note
If adding childs with addChild(), set emitLayoutChanges to false, to avoid emitting not needed layout changed signals.
See also
EDependencyItem::load() as an implementation example

Implements EXmlItem.

+ Here is the call graph for this function:

QString EDependencyItem::name ( ) const

+ Here is the caller graph for this function:

bool EDependencyItem::save ( QDomElement &  useElem)
virtual

This function should convert the current handled data back into a QDomElement. The given useElem should be used to store the own data into. Your childs should be appended to childs of useElem. These can be done by calling this base implementation after processing your part.

Returns
false, if useElem is a null element or something other went wrong.
See also
EDependencyItem::save() for an example implementation

Reimplemented from EXmlItem.

+ Here is the call graph for this function:

void EDependencyItem::setName ( QString  name)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void EDependencyItem::setVersion ( QString  version)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void EDependencyItem::setWebsite ( QString  url)

+ Here is the caller graph for this function:

QString EDependencyItem::version ( ) const

+ Here is the caller graph for this function:

QString EDependencyItem::website ( ) const

+ Here is the caller graph for this function:

Member Data Documentation

QString EDependencyItem::myName
private
QString EDependencyItem::myVersion
private
QString EDependencyItem::myWebsite
private

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