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