Kactus2
Kactus2 reference guide
Loading...
Searching...
No Matches
LibraryTreeModel Class Reference

The model that contains the LibraryItems to display library hierarchically. More...

#include <LibraryTreeModel.h>

Inheritance diagram for LibraryTreeModel:

Public Slots

void onAddVLNV (VLNV const &vlnv)
 Add the specified vlnv branch to the tree.
 
void onCreateAbsDef (QModelIndex const &index)
 Create a new abstraction definition for given bus definition.
 
void onCreateNewDesign (QModelIndex const &index)
 Create new design.
 
void onCreateNewSWDesign (QModelIndex const &index)
 Create new SW design.
 
void onCreateNewSystemDesign (QModelIndex const &index)
 Create new system design.
 
void onDeleteItem (QModelIndex const &index)
 When delete is selected in search view.
 
void onDocumentUpdated (VLNV const &vlnv)
 
void onExportItem (QModelIndex const &index)
 When export is selected in search view.
 
void onOpenDesign (QModelIndex const &index, QString const &viewName)
 Open the selected hierarchical design.
 
void onOpenDocument (QModelIndex const &index)
 Open the selected document e.g. component or bus definition.
 
void onOpenMemoryDesign (QModelIndex const &index, QString const &viewName)
 Open the selected memory design.
 
void onOpenSWDesign (QModelIndex const &index)
 Open the selected hierarchical SW design.
 
void onOpenSystemDesign (QModelIndex const &index)
 Open the selected hierarchical system design.
 
void onRemoveVLNV (VLNV const &vlnv)
 Remove the specified vlnv branch from the tree.
 
void onResetModel ()
 Reset the model.
 
void onShowErrors (QModelIndex const &index)
 Shows errors about the item at the given index.
 

Signals

void createAbsDef (VLNV const &vlnv)
 Create a new abstraction definition for given bus definition.
 
void createDesign (VLNV const &vlnv)
 Create new design with given vlnv.
 
void createSWDesign (VLNV const &vlnv)
 Create new SW design with given vlnv.
 
void createSystemDesign (VLNV const &vlnv)
 Create new system design with given vlnv.
 
void editItem (VLNV const &vlnv)
 Open the component in a component editor.
 
void errorMessage (const QString &message)
 Emit an error message to be printed to user.
 
void exportItems (const QList< VLNV > list)
 Export a list of vlnv items to a new location.
 
void invalidateFilter ()
 Refresh the item filtering because changes have been made.
 
void noticeMessage (const QString &message)
 Emit a notice message to be printed to user.
 
void openDesign (VLNV const &vlnv, QString const &viewName)
 Open the design of a component.
 
void openMemoryDesign (VLNV const &vlnv, QString const &viewName)
 Open the memory design of a HW design.
 
void openSWDesign (VLNV const &vlnv)
 Open the SW design of a component.
 
void openSystemDesign (VLNV const &vlnv)
 Open the system design of a component.
 
void removeVLNV (QList< VLNV > vlnvs)
 Remove the specified VLNV from the library.
 
void showErrors (VLNV const &vlnv)
 Shows errors about the item at the given index.
 

Public Member Functions

 LibraryTreeModel (LibraryInterface *handler, QObject *parent=0)
 
virtual ~LibraryTreeModel ()
 The destructor.
 
virtual int columnCount (QModelIndex const &parent=QModelIndex()) const
 
virtual QVariant data (QModelIndex const &index, int role=Qt::DisplayRole) const
 
Qt::ItemFlags flags (QModelIndex const &index) const
 
LibraryItemgetRoot () const
 
virtual bool hasChildren (QModelIndex const &parent=QModelIndex()) const
 
virtual QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
 
virtual QModelIndex index (int row, int column, QModelIndex const &parent=QModelIndex()) const
 
QModelIndex index (LibraryItem *item)
 
virtual QModelIndex parent (QModelIndex const &child) const
 
virtual int rowCount (QModelIndex const &parent=QModelIndex()) const
 

Detailed Description

The model that contains the LibraryItems to display library hierarchically.

Definition at line 32 of file LibraryTreeModel.h.

Constructor & Destructor Documentation

◆ LibraryTreeModel()

LibraryTreeModel::LibraryTreeModel ( LibraryInterface * handler,
QObject * parent = 0 )

The constructor

Parameters
[in]handlerThe instance that manages the library.
[in]parentThe owner of this class

◆ ~LibraryTreeModel()

virtual LibraryTreeModel::~LibraryTreeModel ( )
virtual

The destructor.

Member Function Documentation

◆ columnCount()

virtual int LibraryTreeModel::columnCount ( QModelIndex const & parent = QModelIndex()) const
virtual

Get the number of columns in this model

Parameters
[in]parentModel index identifying the item that's column count is wanted.
Returns
Number of columns.

◆ createAbsDef

void LibraryTreeModel::createAbsDef ( VLNV const & vlnv)
signal

Create a new abstraction definition for given bus definition.

◆ createDesign

void LibraryTreeModel::createDesign ( VLNV const & vlnv)
signal

Create new design with given vlnv.

◆ createSWDesign

void LibraryTreeModel::createSWDesign ( VLNV const & vlnv)
signal

Create new SW design with given vlnv.

◆ createSystemDesign

void LibraryTreeModel::createSystemDesign ( VLNV const & vlnv)
signal

Create new system design with given vlnv.

◆ data()

virtual QVariant LibraryTreeModel::data ( QModelIndex const & index,
int role = Qt::DisplayRole ) const
virtual

Get the data associated with given object.

Parameters
[in]indexModel index that identifies the object that's data is wanted.
[in]roleSpecifies the type of data wanted.
Returns
QVariant Containing the requested data.

◆ editItem

void LibraryTreeModel::editItem ( VLNV const & vlnv)
signal

Open the component in a component editor.

◆ errorMessage

void LibraryTreeModel::errorMessage ( const QString & message)
signal

Emit an error message to be printed to user.

◆ exportItems

void LibraryTreeModel::exportItems ( const QList< VLNV > list)
signal

Export a list of vlnv items to a new location.

◆ flags()

Qt::ItemFlags LibraryTreeModel::flags ( QModelIndex const & index) const

Get the flags that identify possible methods for given object.

Parameters
[in]indexModel index identifying the object that's flags are requested.
Returns
Qt::ItemFlags that specify how the object can be handled.

◆ getRoot()

LibraryItem * LibraryTreeModel::getRoot ( ) const

Get the root item of the tree.

Returns
The root item

◆ hasChildren()

virtual bool LibraryTreeModel::hasChildren ( QModelIndex const & parent = QModelIndex()) const
virtual

Does the specified item have child items or not.

Parameters
[in]parentModel index identifying the object that's children are asked.
Returns
True if object has child objects.

◆ headerData()

virtual QVariant LibraryTreeModel::headerData ( int section,
Qt::Orientation orientation,
int role = Qt::DisplayRole ) const
virtual

Get the data for the headers of this model.

Parameters
[in]sectionSpecifies the column of the header.
[in]orientationThe orientation of the header, only Qt::Horizontal supported.
[in]roleSpecifies the role of the data.
Returns
QVariant containing the data.

◆ index() [1/2]

virtual QModelIndex LibraryTreeModel::index ( int row,
int column,
QModelIndex const & parent = QModelIndex() ) const
virtual

Get the model index of the specified object.

Parameters
[in]rowRow number of the object.
[in]columnColumn number of the object.
[in]parentModel index of the parent of the object.
Returns
QModelIndex that identifies the object.

◆ index() [2/2]

QModelIndex LibraryTreeModel::index ( LibraryItem * item)

Create a model index for a library item

Parameters
[in]itemThe LibraryItem that's model index is wanted
Returns
QModelIndex that identifies the libraryItem.

◆ invalidateFilter

void LibraryTreeModel::invalidateFilter ( )
signal

Refresh the item filtering because changes have been made.

◆ noticeMessage

void LibraryTreeModel::noticeMessage ( const QString & message)
signal

Emit a notice message to be printed to user.

◆ onAddVLNV

void LibraryTreeModel::onAddVLNV ( VLNV const & vlnv)
slot

Add the specified vlnv branch to the tree.

◆ onCreateAbsDef

void LibraryTreeModel::onCreateAbsDef ( QModelIndex const & index)
slot

Create a new abstraction definition for given bus definition.

◆ onCreateNewDesign

void LibraryTreeModel::onCreateNewDesign ( QModelIndex const & index)
slot

Create new design.

◆ onCreateNewSWDesign

void LibraryTreeModel::onCreateNewSWDesign ( QModelIndex const & index)
slot

Create new SW design.

◆ onCreateNewSystemDesign

void LibraryTreeModel::onCreateNewSystemDesign ( QModelIndex const & index)
slot

Create new system design.

◆ onDeleteItem

void LibraryTreeModel::onDeleteItem ( QModelIndex const & index)
slot

When delete is selected in search view.

◆ onDocumentUpdated

void LibraryTreeModel::onDocumentUpdated ( VLNV const & vlnv)
slot

This function should be called when an IP-XACT document has changed.

Function updates the hierarchical model so that changes made to the document are visible.

Parameters
[in]vlnvIdentifies the document that changed.

◆ onExportItem

void LibraryTreeModel::onExportItem ( QModelIndex const & index)
slot

When export is selected in search view.

◆ onOpenDesign

void LibraryTreeModel::onOpenDesign ( QModelIndex const & index,
QString const & viewName )
slot

Open the selected hierarchical design.

◆ onOpenDocument

void LibraryTreeModel::onOpenDocument ( QModelIndex const & index)
slot

Open the selected document e.g. component or bus definition.

◆ onOpenMemoryDesign

void LibraryTreeModel::onOpenMemoryDesign ( QModelIndex const & index,
QString const & viewName )
slot

Open the selected memory design.

◆ onOpenSWDesign

void LibraryTreeModel::onOpenSWDesign ( QModelIndex const & index)
slot

Open the selected hierarchical SW design.

◆ onOpenSystemDesign

void LibraryTreeModel::onOpenSystemDesign ( QModelIndex const & index)
slot

Open the selected hierarchical system design.

◆ onRemoveVLNV

void LibraryTreeModel::onRemoveVLNV ( VLNV const & vlnv)
slot

Remove the specified vlnv branch from the tree.

◆ onResetModel

void LibraryTreeModel::onResetModel ( )
slot

Reset the model.

◆ onShowErrors

void LibraryTreeModel::onShowErrors ( QModelIndex const & index)
slot

Shows errors about the item at the given index.

◆ openDesign

void LibraryTreeModel::openDesign ( VLNV const & vlnv,
QString const & viewName )
signal

Open the design of a component.

◆ openMemoryDesign

void LibraryTreeModel::openMemoryDesign ( VLNV const & vlnv,
QString const & viewName )
signal

Open the memory design of a HW design.

◆ openSWDesign

void LibraryTreeModel::openSWDesign ( VLNV const & vlnv)
signal

Open the SW design of a component.

◆ openSystemDesign

void LibraryTreeModel::openSystemDesign ( VLNV const & vlnv)
signal

Open the system design of a component.

◆ parent()

virtual QModelIndex LibraryTreeModel::parent ( QModelIndex const & child) const
virtual

Get the model index of the parent of the object

Parameters
[in]childModel index that identifies the child of the object.
Returns
QModelIndex that identifies the parent of the given object.

◆ removeVLNV

void LibraryTreeModel::removeVLNV ( QList< VLNV > vlnvs)
signal

Remove the specified VLNV from the library.

◆ rowCount()

virtual int LibraryTreeModel::rowCount ( QModelIndex const & parent = QModelIndex()) const
virtual

Get the number of rows an item has.

Parameters
[in]parentModel index identifying the item that's row count is wanted
Returns
Number of rows the item has.

◆ showErrors

void LibraryTreeModel::showErrors ( VLNV const & vlnv)
signal

Shows errors about the item at the given index.


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