Contains the items to display the library component hierarchy to user.
More...
#include <HierarchyModelBase.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 HierarchyModelBase.h.
◆ Column
Defines the columns for the model.
| Enumerator |
|---|
| OBJECT_COLUMN | |
| INSTANCE_COLUMN | |
| COLUMN_COUNT | |
Definition at line 35 of file HierarchyModelBase.h.
◆ HierarchyModelBase()
| HierarchyModelBase::HierarchyModelBase |
( |
LibraryInterface * | handler, |
|
|
QObject * | parent ) |
The constructor
- Parameters
-
| [in] | handler | The instance that manages the library. |
| [in] | parent | The owner of this model. |
◆ ~HierarchyModelBase()
| virtual HierarchyModelBase::~HierarchyModelBase |
( |
| ) |
|
|
virtualdefault |
◆ columnCount()
| virtual int HierarchyModelBase::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 HierarchyModelBase::createAbsDef |
( |
VLNV const & | busDefVLNV | ) |
|
|
signal |
Create a new abstraction definition for given bus definition.
◆ createDesign
| void HierarchyModelBase::createDesign |
( |
VLNV const & | vlnv | ) |
|
|
signal |
Create new design with given vlnv.
◆ createSWDesign
| void HierarchyModelBase::createSWDesign |
( |
VLNV const & | vlnv | ) |
|
|
signal |
Create new SW design with given vlnv.
◆ createSystemDesign
| void HierarchyModelBase::createSystemDesign |
( |
VLNV const & | vlnv | ) |
|
|
signal |
Create new system design with given vlnv.
◆ data()
| virtual QVariant HierarchyModelBase::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 HierarchyModelBase::editItem |
( |
VLNV const & | vlnv | ) |
|
|
signal |
Open the component in a component editor.
◆ errorMessage
| void HierarchyModelBase::errorMessage |
( |
const QString & | msg | ) |
|
|
signal |
Send an error message to be printed to user.
◆ exportItem
| void HierarchyModelBase::exportItem |
( |
VLNV const & | vlnv | ) |
|
|
signal |
Export an item to a new location.
◆ findIndexes()
| QModelIndexList HierarchyModelBase::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 HierarchyModelBase::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 HierarchyModelBase::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 HierarchyModelBase::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 HierarchyModelBase::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 HierarchyModelBase::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]
| QModelIndex HierarchyModelBase::index |
( |
HierarchyItem * | item | ) |
const |
Create a model index for a library item
- Parameters
-
- Returns
- QModelIndex that identifies the libraryItem.
◆ index() [2/2]
| virtual QModelIndex HierarchyModelBase::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 HierarchyModelBase::invalidateFilter |
( |
| ) |
|
|
signal |
Refresh the item filtering because changes have been made.
◆ noticeMessage
| void HierarchyModelBase::noticeMessage |
( |
const QString & | msg | ) |
|
|
signal |
Send a notification to be printed to user.
◆ onCreateNewAbsDef
| void HierarchyModelBase::onCreateNewAbsDef |
( |
QModelIndex const & | index | ) |
|
|
slot |
Create new abstraction definition.
◆ onCreateNewDesign
| void HierarchyModelBase::onCreateNewDesign |
( |
QModelIndex const & | index | ) |
|
|
slot |
◆ onCreateNewSWDesign
| void HierarchyModelBase::onCreateNewSWDesign |
( |
QModelIndex const & | index | ) |
|
|
slot |
◆ onCreateNewSystemDesign
| void HierarchyModelBase::onCreateNewSystemDesign |
( |
QModelIndex const & | index | ) |
|
|
slot |
Create new system design.
◆ onDeleteItem
| void HierarchyModelBase::onDeleteItem |
( |
QModelIndex const & | index | ) |
|
|
slot |
◆ onDocumentUpdated
| void HierarchyModelBase::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 HierarchyModelBase::onExportItem |
( |
QModelIndex const & | index | ) |
|
|
slot |
When export is selected in search view.
◆ onOpenDesign
| void HierarchyModelBase::onOpenDesign |
( |
QModelIndex const & | index | ) |
|
|
slot |
Open the selected hierarchical design.
◆ onOpenItem
| void HierarchyModelBase::onOpenItem |
( |
QModelIndex const & | index | ) |
|
|
slot |
Open the selected component.
◆ onOpenMemoryDesign
| void HierarchyModelBase::onOpenMemoryDesign |
( |
QModelIndex const & | index | ) |
|
|
slot |
Open the memory design of the selected design.
◆ onRemoveVLNV
| void HierarchyModelBase::onRemoveVLNV |
( |
VLNV const & | vlnv | ) |
|
|
slot |
Remove the specified vlnv from the tree.
◆ onResetModel
| void HierarchyModelBase::onResetModel |
( |
| ) |
|
|
slot |
◆ onShowErrors
| void HierarchyModelBase::onShowErrors |
( |
QModelIndex const & | index | ) |
|
|
slot |
Shows errors about the item at the given index.
◆ openDesign
| void HierarchyModelBase::openDesign |
( |
VLNV const & | vlnv, |
|
|
const QString & | viewName ) |
|
signal |
Open the design of a component.
◆ openMemoryDesign
| void HierarchyModelBase::openMemoryDesign |
( |
VLNV const & | vlnv, |
|
|
const QString & | viewName ) |
|
signal |
Open the memory design of a component.
◆ openSWDesign
| void HierarchyModelBase::openSWDesign |
( |
VLNV const & | vlnv, |
|
|
const QString & | viewName ) |
|
signal |
Open the SW design of a component.
◆ openSystemDesign
| void HierarchyModelBase::openSystemDesign |
( |
VLNV const & | vlnv, |
|
|
const QString & | viewName ) |
|
signal |
Open the system design of a component.
◆ parent()
| virtual QModelIndex HierarchyModelBase::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 HierarchyModelBase::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 HierarchyModelBase::removeVLNV |
( |
QList< VLNV > | vlnv | ) |
|
|
signal |
Remove the specified VLNV from the library.
◆ rowCount()
| virtual int HierarchyModelBase::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 HierarchyModelBase::showErrors |
( |
VLNV const & | vlnv | ) |
|
|
signal |
Shows errors about the item at the given index.
◆ handler_
The documentation for this class was generated from the following file: