The model that contains the LibraryItems to display library hierarchically.
More...
#include <LibraryModel.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 LibraryModel.h.
◆ LibraryModel()
The constructor
- Parameters
-
| [in] | handler | The instance that manages the library. |
| [in] | parent | The owner of this class |
◆ ~LibraryModel()
| virtual LibraryModel::~LibraryModel |
( |
| ) |
|
|
virtual |
◆ columnCount()
| virtual int LibraryModel::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 LibraryModel::createAbsDef |
( |
VLNV const & | vlnv | ) |
|
|
signal |
Create a new abstraction definition for given bus definition.
◆ createDesign
| void LibraryModel::createDesign |
( |
VLNV const & | vlnv | ) |
|
|
signal |
Create new design with given vlnv.
◆ createSWDesign
| void LibraryModel::createSWDesign |
( |
VLNV const & | vlnv | ) |
|
|
signal |
Create new SW design with given vlnv.
◆ createSystemDesign
| void LibraryModel::createSystemDesign |
( |
VLNV const & | vlnv | ) |
|
|
signal |
Create new system design with given vlnv.
◆ data()
| virtual QVariant LibraryModel::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 LibraryModel::editItem |
( |
VLNV const & | vlnv | ) |
|
|
signal |
Open the component in a component editor.
◆ errorMessage
| void LibraryModel::errorMessage |
( |
const QString & | message | ) |
|
|
signal |
Emit an error message to be printed to user.
◆ exportItems
| void LibraryModel::exportItems |
( |
const QList< VLNV > | list | ) |
|
|
signal |
Export a list of vlnv items to a new location.
◆ flags()
| Qt::ItemFlags LibraryModel::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 LibraryModel::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 LibraryModel::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 LibraryModel::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]
Create a model index for a library item
- Parameters
-
- Returns
- QModelIndex that identifies the libraryItem.
◆ invalidateFilter
| void LibraryModel::invalidateFilter |
( |
| ) |
|
|
signal |
Refresh the item filtering because changes have been made.
◆ noticeMessage
| void LibraryModel::noticeMessage |
( |
const QString & | message | ) |
|
|
signal |
Emit a notice message to be printed to user.
◆ onAddVLNV
| void LibraryModel::onAddVLNV |
( |
VLNV const & | vlnv | ) |
|
|
slot |
Add the specified vlnv branch to the tree.
◆ onCreateAbsDef
| void LibraryModel::onCreateAbsDef |
( |
QModelIndex const & | index | ) |
|
|
slot |
Create a new abstraction definition for given bus definition.
◆ onCreateNewDesign
| void LibraryModel::onCreateNewDesign |
( |
QModelIndex const & | index | ) |
|
|
slot |
◆ onCreateNewSWDesign
| void LibraryModel::onCreateNewSWDesign |
( |
QModelIndex const & | index | ) |
|
|
slot |
◆ onCreateNewSystemDesign
| void LibraryModel::onCreateNewSystemDesign |
( |
QModelIndex const & | index | ) |
|
|
slot |
Create new system design.
◆ onDeleteItem
| void LibraryModel::onDeleteItem |
( |
QModelIndex const & | index | ) |
|
|
slot |
When delete is selected in search view.
◆ onDocumentUpdated
| void LibraryModel::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 LibraryModel::onExportItem |
( |
QModelIndex const & | index | ) |
|
|
slot |
When export is selected in search view.
◆ onOpenDesign
| void LibraryModel::onOpenDesign |
( |
QModelIndex const & | index, |
|
|
QString const & | viewName ) |
|
slot |
Open the selected hierarchical design.
◆ onOpenDocument
| void LibraryModel::onOpenDocument |
( |
QModelIndex const & | index | ) |
|
|
slot |
Open the selected document e.g. component or bus definition.
◆ onOpenMemoryDesign
| void LibraryModel::onOpenMemoryDesign |
( |
QModelIndex const & | index, |
|
|
QString const & | viewName ) |
|
slot |
Open the selected memory design.
◆ onOpenSWDesign
| void LibraryModel::onOpenSWDesign |
( |
QModelIndex const & | index | ) |
|
|
slot |
Open the selected hierarchical SW design.
◆ onOpenSystemDesign
| void LibraryModel::onOpenSystemDesign |
( |
QModelIndex const & | index, |
|
|
QString const & | viewName ) |
|
slot |
Open the selected hierarchical system design.
◆ onRemoveVLNV
| void LibraryModel::onRemoveVLNV |
( |
VLNV const & | vlnv | ) |
|
|
slot |
Remove the specified vlnv branch from the tree.
◆ onResetModel
| void LibraryModel::onResetModel |
( |
| ) |
|
|
slot |
◆ onShowErrors
| void LibraryModel::onShowErrors |
( |
QModelIndex const & | index | ) |
|
|
slot |
Shows errors about the item at the given index.
◆ openDesign
| void LibraryModel::openDesign |
( |
VLNV const & | vlnv, |
|
|
QString const & | viewName ) |
|
signal |
Open the design of a component.
◆ openMemoryDesign
| void LibraryModel::openMemoryDesign |
( |
VLNV const & | vlnv, |
|
|
QString const & | viewName ) |
|
signal |
Open the memory design of a HW design.
◆ openSWDesign
| void LibraryModel::openSWDesign |
( |
VLNV const & | vlnv | ) |
|
|
signal |
Open the SW design of a component.
◆ openSystemDesign
| void LibraryModel::openSystemDesign |
( |
VLNV const & | vlnv, |
|
|
QString const & | viewName ) |
|
signal |
Open the system design of a component.
◆ parent()
| virtual QModelIndex LibraryModel::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 LibraryModel::removeVLNV |
( |
QList< VLNV > | vlnvs | ) |
|
|
signal |
Remove the specified VLNV from the library.
◆ rowCount()
| virtual int LibraryModel::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 LibraryModel::showErrors |
( |
VLNV const & | vlnv | ) |
|
|
signal |
Shows errors about the item at the given index.
◆ handler_
The instance that manages the library.
Definition at line 237 of file LibraryModel.h.
The documentation for this class was generated from the following file: