12#ifndef HIERARCHYMODEL_H
13#define HIERARCHYMODEL_H
17#include <KactusAPI/KactusAPIGlobal.h>
19#include <QAbstractItemModel>
20#include <QSharedPointer>
60 virtual QVariant
headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole)
const;
87 virtual QModelIndex
index(
int row,
int column, QModelIndex
const&
parent = QModelIndex())
const;
95 virtual QModelIndex
parent(QModelIndex
const& child)
const;
104 virtual QVariant
data(QModelIndex
const&
index,
int role = Qt::DisplayRole)
const;
152 virtual int getOwners(QList<VLNV>& list, VLNV
const& vlnvToSearch)
const;
168 void getChildren(QList<VLNV>& childList, VLNV
const& owner)
const;
Represents a single component in the library in hierarchy view.
void onCreateNewSWDesign(QModelIndex const &index)
Create new SW design.
void noticeMessage(const QString &msg)
Send a notification to be printed to user.
void exportItem(VLNV const &vlnv)
Export an item to a new location.
QModelIndexList findIndexes(VLNV const &vlnv)
virtual QModelIndex index(int row, int column, QModelIndex const &parent=QModelIndex()) const
void getChildren(QList< VLNV > &childList, VLNV const &owner) const
virtual QModelIndex parent(QModelIndex const &child) const
void openSWDesign(VLNV const &vlnv, const QString &viewName)
Open the SW design of a component.
void onOpenItem(QModelIndex const &index)
Open the selected component.
Qt::ItemFlags flags(QModelIndex const &index) const
Column
Defines the columns for the model.
void showErrors(VLNV const &vlnv)
Shows errors about the item at the given index.
virtual QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
virtual int columnCount(QModelIndex const &parent=QModelIndex()) const
void onExportItem(QModelIndex const &index)
When export is selected in search view.
void removeVLNV(QList< VLNV > vlnv)
Remove the specified VLNV from the library.
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 onResetModel()
Reset the model.
void openSystemDesign(VLNV const &vlnv, const QString &viewName)
Open the system design of a component.
void openDesign(VLNV const &vlnv, const QString &viewName)
Open the design of a component.
void onDocumentUpdated(VLNV const &vlnv)
QModelIndex index(HierarchyItem *item) const
void openMemoryDesign(VLNV const &vlnv, const QString &viewName)
Open the memory design of a component.
void onCreateNewAbsDef(QModelIndex const &index)
Create new abstraction 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.
virtual bool hasChildren(QModelIndex const &parent=QModelIndex()) const
void onRemoveVLNV(VLNV const &vlnv)
Remove the specified vlnv from the tree.
virtual int rowCount(QModelIndex const &parent=QModelIndex()) const
int referenceCount(VLNV const &vlnv) const
virtual QVariant data(QModelIndex const &index, int role=Qt::DisplayRole) const
void onOpenMemoryDesign(QModelIndex const &index)
Open the memory design of the selected design.
void onCreateNewDesign(QModelIndex const &index)
Create new design.
virtual int getOwners(QList< VLNV > &list, VLNV const &vlnvToSearch) const
void onDeleteItem(QModelIndex const &index)
When delete is selected.
void invalidateFilter()
Refresh the item filtering because changes have been made.
void onCreateNewSystemDesign(QModelIndex const &index)
Create new system design.
virtual ~HierarchyModel()=default
The destructor.
void onShowErrors(QModelIndex const &index)
Shows errors about the item at the given index.
HierarchyModel(LibraryInterface *handler, QObject *parent)
void onOpenDesign(QModelIndex const &index)
Open the selected hierarchical design.
void createAbsDef(VLNV const &busDefVLNV)
Create a new abstraction definition for given bus definition.
LibraryInterface defines an interface to operate the IP-XACT-library.