NCL Composer  0.1.5
 All Classes Functions Variables Pages
NCLTreeWidget Class Reference

Handles a NCL document as a tree. More...

#include <NCLTreeWidget.h>

Inheritance diagram for NCLTreeWidget:
Collaboration diagram for NCLTreeWidget:

Public Slots

bool updateFromText (QString text)
 Updates the tree representation based on the XML text parameter. More...
 
QTreeWidgetItem * addElement (QTreeWidgetItem *father, int pos, QString tagname, QString id, QMap< QString, QString > &attrs, int line_in_text=-1, int column_in_text=-1)
 Add an element as child of father and return this element. More...
 
QTreeWidgetItem * getItemById (QString itemId)
 Returns a QTreeWidgetItem with identifier equal to itemId. More...
 
void removeItem (QString itemId)
 Remove the element. More...
 
void updateItem (QTreeWidgetItem *item, QString tagname, QMap< QString, QString > &attrs)
 
void errorNotification (QString message, QString filename, int line, int column, int severity)
 
void expandAll ()
 
void resetFont ()
 Reset font to its default family and size.
 
void zoomIn ()
 Increases the font and icon size.
 
void zoomOut ()
 Decreases the font and icon sizes.
 
void resetZoom ()
 Reset font and icon sizes to defaults.
 

Signals

void elementAddedByUser (QString, QString, QMap< QString, QString > &, bool)
 
void elementRemovedByUser (QString)
 
void parserErrorNotify (QString message, QString filename, int line, int column, int severity)
 

Public Member Functions

 NCLTreeWidget (QWidget *parent=0)
 Constructs a ncl tree widget with the given parent. More...
 
virtual ~NCLTreeWidget ()
 Destroys the tree widget and all its items.
 
void setDefaultFont (const QFont &defaultFont)
 Sets the default font of the TreeWidget.
 
void mouseMoveEvent (QMouseEvent *event)
 Reimplementation of mouseMoveEvent.
 
QSize sizeHint () const
 

Detailed Description

Handles a NCL document as a tree.

OutlineView plugin is just a wrapper over this class to send and receive messsages from Composer Core.

Definition at line 42 of file NCLTreeWidget.h.

Constructor & Destructor Documentation

NCLTreeWidget::NCLTreeWidget ( QWidget *  parent = 0)

Constructs a ncl tree widget with the given parent.

Parameters
parentThe

Definition at line 29 of file NCLTreeWidget.cpp.

Member Function Documentation

QTreeWidgetItem * NCLTreeWidget::addElement ( QTreeWidgetItem *  father,
int  pos,
QString  tagname,
QString  id,
QMap< QString, QString > &  attrs,
int  line_in_text = -1,
int  column_in_text = -1 
)
slot

Add an element as child of father and return this element.

Parameters
father
pos
tagname
id
attrs
line_in_text
column_in_text
Returns
QTreeWidgetItem *

Definition at line 133 of file NCLTreeWidget.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void NCLTreeWidget::elementAddedByUser ( QString  ,
QString  ,
QMap< QString, QString > &  ,
bool   
)
signal
Parameters
QString
QString
\parambool
void NCLTreeWidget::elementRemovedByUser ( QString  )
signal
Parameters
QString
void NCLTreeWidget::errorNotification ( QString  message,
QString  filename,
int  line,
int  column,
int  severity 
)
slot
Parameters
message
filename
line
column
severity

Definition at line 442 of file NCLTreeWidget.cpp.

Here is the caller graph for this function:

QTreeWidgetItem * NCLTreeWidget::getItemById ( QString  itemId)
slot

Returns a QTreeWidgetItem with identifier equal to itemId.

Parameters
itemIdThe identifier of the element.
Returns
QTreeWidgetItem* The element with identifier itemId.

Definition at line 220 of file NCLTreeWidget.cpp.

Here is the caller graph for this function:

void NCLTreeWidget::parserErrorNotify ( QString  message,
QString  filename,
int  line,
int  column,
int  severity 
)
signal
Parameters
message
filename
line
column
severity

Here is the caller graph for this function:

void NCLTreeWidget::removeItem ( QString  itemId)
slot

Remove the element.

Parameters
itemId

Definition at line 243 of file NCLTreeWidget.cpp.

Here is the caller graph for this function:

bool NCLTreeWidget::updateFromText ( QString  text)
slot

Updates the tree representation based on the XML text parameter.

Parameters
textThe source of the document should be represented as a tree.
Returns
bool Return false if the

Definition at line 98 of file NCLTreeWidget.cpp.

Here is the call graph for this function:

void NCLTreeWidget::updateItem ( QTreeWidgetItem *  item,
QString  tagname,
QMap< QString, QString > &  attrs 
)
slot
Parameters
item
tagname
attrs
Todo:
Create a method to return an Icon to a given element.

Definition at line 309 of file NCLTreeWidget.cpp.

Here is the caller graph for this function:


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