Contains the items to display the library component hierarchy to user.
More...
#include <hierarchymodel.h>
|
void | createAbsDef (VLNV const &busDefVLNV) |
| 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 &msg) |
| Send an error message to be printed to user.
|
|
void | exportItem (VLNV const &vlnv) |
| Export an item to a new location.
|
|
void | invalidateFilter () |
| Refresh the item filtering because changes have been made.
|
|
void | noticeMessage (const QString &msg) |
| Send a notification to be printed to user.
|
|
void | openDesign (VLNV const &vlnv, const QString &viewName) |
| Open the design of a component.
|
|
void | openMemoryDesign (VLNV const &vlnv, const QString &viewName) |
| Open the memory design of a component.
|
|
void | openSWDesign (VLNV const &vlnv, const QString &viewName) |
| Open the SW design of a component.
|
|
void | openSystemDesign (VLNV const &vlnv, const QString &viewName) |
| Open the system design of a component.
|
|
void | removeVLNV (QList< VLNV > vlnv) |
| Remove the specified VLNV from the library.
|
|
void | showErrors (VLNV const &vlnv) |
| Shows errors about the item at the given index.
|
|
Contains the items to display the library component hierarchy to user.
Definition at line 28 of file hierarchymodel.h.
◆ Column
Defines the columns for the model.
Enumerator |
---|
OBJECT_COLUMN | |
INSTANCE_COLUMN | |
COLUMN_COUNT | |
Definition at line 35 of file hierarchymodel.h.
◆ HierarchyModel()
The constructor
- Parameters
-
[in] | handler | The instance that manages the library. |
[in] | parent | The owner of this model. |
◆ ~HierarchyModel()
virtual HierarchyModel::~HierarchyModel |
( |
| ) |
|
|
virtualdefault |
◆ columnCount()
virtual int HierarchyModel::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 HierarchyModel::createAbsDef |
( |
VLNV const & | busDefVLNV | ) |
|
|
signal |
Create a new abstraction definition for given bus definition.
◆ createDesign
void HierarchyModel::createDesign |
( |
VLNV const & | vlnv | ) |
|
|
signal |
Create new design with given vlnv.
◆ createSWDesign
void HierarchyModel::createSWDesign |
( |
VLNV const & | vlnv | ) |
|
|
signal |
Create new SW design with given vlnv.
◆ createSystemDesign
void HierarchyModel::createSystemDesign |
( |
VLNV const & | vlnv | ) |
|
|
signal |
Create new system design with given vlnv.
◆ data()
virtual QVariant HierarchyModel::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 HierarchyModel::editItem |
( |
VLNV const & | vlnv | ) |
|
|
signal |
Open the component in a component editor.
◆ errorMessage
void HierarchyModel::errorMessage |
( |
const QString & | msg | ) |
|
|
signal |
Send an error message to be printed to user.
◆ exportItem
void HierarchyModel::exportItem |
( |
VLNV const & | vlnv | ) |
|
|
signal |
Export an item to a new location.
◆ findIndexes()
QModelIndexList HierarchyModel::findIndexes |
( |
VLNV const & | vlnv | ) |
|
Find model indexes of items that represent given vlnv.
- Parameters
-
[in] | vlnv | Identifies the objects to search for. |
- Returns
- QModelIndexList contains indexes of items with given vlnv.
◆ flags()
Qt::ItemFlags HierarchyModel::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.
◆ getChildren()
void HierarchyModel::getChildren |
( |
QList< VLNV > & | childList, |
|
|
VLNV const & | owner ) const |
Get the child items of given object.
- Parameters
-
[out] | childList | The list where the vlnvs of the children are appended. |
[in] | owner | Identifies the object that's children are searched. |
◆ getOwners()
virtual int HierarchyModel::getOwners |
( |
QList< VLNV > & | list, |
|
|
VLNV const & | vlnvToSearch ) const |
|
virtual |
Get the components that have instantiated the given vlnv in their design.
This function makes sure each owner is appended to the list only once.
- Parameters
-
[out] | list | QList where the search results are appended. |
[in] | vlnvToSearch | Identifies the component to search for. |
- Returns
- Number of owners found.
◆ hasChildren()
virtual bool HierarchyModel::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 HierarchyModel::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]
Create a model index for a library item
- Parameters
-
- Returns
- QModelIndex that identifies the libraryItem.
◆ index() [2/2]
virtual QModelIndex HierarchyModel::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.
◆ invalidateFilter
void HierarchyModel::invalidateFilter |
( |
| ) |
|
|
signal |
Refresh the item filtering because changes have been made.
◆ noticeMessage
void HierarchyModel::noticeMessage |
( |
const QString & | msg | ) |
|
|
signal |
Send a notification to be printed to user.
◆ onCreateNewAbsDef
void HierarchyModel::onCreateNewAbsDef |
( |
QModelIndex const & | index | ) |
|
|
slot |
Create new abstraction definition.
◆ onCreateNewDesign
void HierarchyModel::onCreateNewDesign |
( |
QModelIndex const & | index | ) |
|
|
slot |
◆ onCreateNewSWDesign
void HierarchyModel::onCreateNewSWDesign |
( |
QModelIndex const & | index | ) |
|
|
slot |
◆ onCreateNewSystemDesign
void HierarchyModel::onCreateNewSystemDesign |
( |
QModelIndex const & | index | ) |
|
|
slot |
Create new system design.
◆ onDeleteItem
void HierarchyModel::onDeleteItem |
( |
QModelIndex const & | index | ) |
|
|
slot |
◆ onDocumentUpdated
void HierarchyModel::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 HierarchyModel::onExportItem |
( |
QModelIndex const & | index | ) |
|
|
slot |
When export is selected in search view.
◆ onOpenDesign
void HierarchyModel::onOpenDesign |
( |
QModelIndex const & | index | ) |
|
|
slot |
Open the selected hierarchical design.
◆ onOpenItem
void HierarchyModel::onOpenItem |
( |
QModelIndex const & | index | ) |
|
|
slot |
Open the selected component.
◆ onOpenMemoryDesign
void HierarchyModel::onOpenMemoryDesign |
( |
QModelIndex const & | index | ) |
|
|
slot |
Open the memory design of the selected design.
◆ onRemoveVLNV
void HierarchyModel::onRemoveVLNV |
( |
VLNV const & | vlnv | ) |
|
|
slot |
Remove the specified vlnv from the tree.
◆ onResetModel
void HierarchyModel::onResetModel |
( |
| ) |
|
|
slot |
◆ onShowErrors
void HierarchyModel::onShowErrors |
( |
QModelIndex const & | index | ) |
|
|
slot |
Shows errors about the item at the given index.
◆ openDesign
void HierarchyModel::openDesign |
( |
VLNV const & | vlnv, |
|
|
const QString & | viewName ) |
|
signal |
Open the design of a component.
◆ openMemoryDesign
void HierarchyModel::openMemoryDesign |
( |
VLNV const & | vlnv, |
|
|
const QString & | viewName ) |
|
signal |
Open the memory design of a component.
◆ openSWDesign
void HierarchyModel::openSWDesign |
( |
VLNV const & | vlnv, |
|
|
const QString & | viewName ) |
|
signal |
Open the SW design of a component.
◆ openSystemDesign
void HierarchyModel::openSystemDesign |
( |
VLNV const & | vlnv, |
|
|
const QString & | viewName ) |
|
signal |
Open the system design of a component.
◆ parent()
virtual QModelIndex HierarchyModel::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.
◆ referenceCount()
int HierarchyModel::referenceCount |
( |
VLNV const & | vlnv | ) |
const |
Count how many times the given component is instantiated in the library.
This function does not check if the same owner is counted multiple times if same sub-component is instantiated in several components. If count that contains only unique owners then you should use getOwners().
- Parameters
-
[in] | vlnv | Identifies the component that's instances are searched. |
- Returns
- Number of found instances.
◆ removeVLNV
void HierarchyModel::removeVLNV |
( |
QList< VLNV > | vlnv | ) |
|
|
signal |
Remove the specified VLNV from the library.
◆ rowCount()
virtual int HierarchyModel::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 HierarchyModel::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: