The model that contains the LibraryItems to display library hierarchically.
More...
#include <LibraryTreeModel.h>
|
| 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, QString const &viewName) |
| | 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.
|
| |
The model that contains the LibraryItems to display library hierarchically.
Definition at line 32 of file LibraryTreeModel.h.
◆ LibraryTreeModel()
| LibraryTreeModel::LibraryTreeModel |
( |
LibraryInterface * | handler, |
|
|
QObject * | parent = 0 ) |
The constructor
- Parameters
-
| [in] | handler | The instance that manages the library. |
| [in] | parent | The owner of this class |
◆ ~LibraryTreeModel()
| virtual LibraryTreeModel::~LibraryTreeModel |
( |
| ) |
|
|
virtual |
◆ columnCount()
| virtual int LibraryTreeModel::columnCount |
( |
QModelIndex const & | parent = QModelIndex() | ) |
const |
|
virtual |
Get the number of columns in this model
- Parameters
-
| [in] | parent | Model 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] | index | Model index that identifies the object that's data is wanted. |
| [in] | role | Specifies 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] | index | Model index identifying the object that's flags are requested. |
- Returns
- Qt::ItemFlags that specify how the object can be handled.
◆ getRoot()
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] | parent | Model 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] | section | Specifies the column of the header. |
| [in] | orientation | The orientation of the header, only Qt::Horizontal supported. |
| [in] | role | Specifies 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] | row | Row number of the object. |
| [in] | column | Column number of the object. |
| [in] | parent | Model 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
-
- 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 |
◆ onCreateNewSWDesign
| void LibraryTreeModel::onCreateNewSWDesign |
( |
QModelIndex const & | index | ) |
|
|
slot |
◆ 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] | vlnv | Identifies 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, |
|
|
QString const & | viewName ) |
|
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 |
◆ 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, |
|
|
QString const & | viewName ) |
|
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] | child | Model 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] | parent | Model 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: