12#ifndef LIBRARYTREEMODEL_H
13#define LIBRARYTREEMODEL_H
17#include <IPXACTmodels/common/VLNV.h>
19#include <KactusAPI/KactusAPIGlobal.h>
21#include <QAbstractItemModel>
24#include <QSharedPointer>
57 virtual QVariant
headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole )
const;
83 virtual QModelIndex
index(
int row,
int column, QModelIndex
const&
parent = QModelIndex())
const;
91 virtual QModelIndex
parent(QModelIndex
const& child)
const;
100 virtual QVariant
data(QModelIndex
const&
index,
int role = Qt::DisplayRole)
const;
LibraryInterface defines an interface to operate the IP-XACT-library.
LibraryItem class is used to create the hierarchical structure of IP library.
void errorMessage(const QString &message)
Emit an error message to be printed to user.
void onCreateNewSWDesign(QModelIndex const &index)
Create new SW design.
void onCreateNewSystemDesign(QModelIndex const &index)
Create new system design.
void onCreateAbsDef(QModelIndex const &index)
Create a new abstraction definition for given bus definition.
void createDesign(VLNV const &vlnv)
Create new design with given vlnv.
virtual QModelIndex parent(QModelIndex const &child) const
LibraryTreeModel(LibraryInterface *handler, QObject *parent=0)
void onCreateNewDesign(QModelIndex const &index)
Create new design.
void onDocumentUpdated(VLNV const &vlnv)
void showErrors(VLNV const &vlnv)
Shows errors about the item at the given index.
virtual ~LibraryTreeModel()
The destructor.
void onOpenSystemDesign(QModelIndex const &index)
Open the selected hierarchical system design.
void exportItems(const QList< VLNV > list)
Export a list of vlnv items to a new location.
QModelIndex index(LibraryItem *item)
virtual bool hasChildren(QModelIndex const &parent=QModelIndex()) const
void openSWDesign(VLNV const &vlnv)
Open the SW design of a component.
void createSWDesign(VLNV const &vlnv)
Create new SW design with given vlnv.
void noticeMessage(const QString &message)
Emit a notice message to be printed to user.
void onResetModel()
Reset the model.
virtual int columnCount(QModelIndex const &parent=QModelIndex()) const
virtual QModelIndex index(int row, int column, QModelIndex const &parent=QModelIndex()) const
void openSystemDesign(VLNV const &vlnv)
Open the system design of a component.
void editItem(VLNV const &vlnv)
Open the component in a component editor.
void onExportItem(QModelIndex const &index)
When export is selected in search view.
void onAddVLNV(VLNV const &vlnv)
Add the specified vlnv branch to the tree.
void createAbsDef(VLNV const &vlnv)
Create a new abstraction definition for given bus definition.
void onOpenSWDesign(QModelIndex const &index)
Open the selected hierarchical SW design.
virtual QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
void onOpenDocument(QModelIndex const &index)
Open the selected document e.g. component or bus definition.
void onRemoveVLNV(VLNV const &vlnv)
Remove the specified vlnv branch from the tree.
virtual QVariant data(QModelIndex const &index, int role=Qt::DisplayRole) const
void onDeleteItem(QModelIndex const &index)
When delete is selected in search view.
void removeVLNV(QList< VLNV > vlnvs)
Remove the specified VLNV from the library.
void onOpenDesign(QModelIndex const &index, QString const &viewName)
Open the selected hierarchical design.
void openDesign(VLNV const &vlnv, QString const &viewName)
Open the design of a component.
Qt::ItemFlags flags(QModelIndex const &index) const
void openMemoryDesign(VLNV const &vlnv, QString const &viewName)
Open the memory design of a HW design.
LibraryItem * getRoot() const
virtual int rowCount(QModelIndex const &parent=QModelIndex()) const
void createSystemDesign(VLNV const &vlnv)
Create new system design with given vlnv.
void onOpenMemoryDesign(QModelIndex const &index, QString const &viewName)
Open the selected memory design.
void invalidateFilter()
Refresh the item filtering because changes have been made.
void onShowErrors(QModelIndex const &index)
Shows errors about the item at the given index.