|
NorMIT-nav
2023.01.05-dev+develop.0da12
An IGT application
|
Go to the documentation of this file. 1 #ifndef CXTREEITEMMODEL_H
2 #define CXTREEITEMMODEL_H
15 class QTreeWidgetItem;
37 virtual int rowCount(
const QModelIndex&
parent = QModelIndex() )
const;
39 virtual QVariant
data(
const QModelIndex&
index,
int role = Qt::DisplayRole )
const;
40 virtual bool setData(
const QModelIndex&
index,
const QVariant& value,
int role);
41 virtual Qt::ItemFlags
flags(
const QModelIndex&
index )
const;
42 virtual QVariant
headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole )
const;
44 virtual QModelIndex
index(
int row,
int column,
const QModelIndex&
parent = QModelIndex() )
const;
45 virtual QModelIndex
parent(
const QModelIndex&
index )
const;
61 void currentItemChangedSlot(
const QModelIndex& current,
const QModelIndex& previous);
62 void onRepositoryChanged(
TreeNode* node);
65 int mViewGroupCount, mViewGroupIndex, mColorIndex, mNameIndex, mColumnCount;
68 QItemSelectionModel* mSelectionModel;
73 bool isViewGroupColumn(
int col)
const;
74 int viewGroupFromColumn(
int col)
const;
77 void fillModelTreeFromViewManager(
TreeNodePtr root);
78 QIcon getColorIcon(QColor color)
const;
79 QColor adjustColorToContrastWithWhite(QColor color)
const;
80 void createShowColumnsProperty();
81 void onShowColumnsChanged();
87 #endif // CXTREEITEMMODEL_H
Helper class for xml files used to store ssc/cx data.
virtual int rowCount(const QModelIndex &parent=QModelIndex()) const
virtual QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
virtual QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
void setSelectionModel(QItemSelectionModel *selectionModel)
Namespace for all CustusX production code.
virtual QModelIndex parent(const QModelIndex &index) const
boost::shared_ptr< class VisServices > VisServicesPtr
virtual int columnCount(const QModelIndex &parent=QModelIndex()) const
void currentItemChanged()
TreeNodePtr getNodeFromIndex(const QModelIndex &index)
StringListPropertyPtr getShowColumnsProperty()
boost::shared_ptr< class TreeRepository > TreeRepositoryPtr
boost::shared_ptr< TreeNode > TreeNodePtr
virtual bool setData(const QModelIndex &index, const QVariant &value, int role)
boost::shared_ptr< class StringListProperty > StringListPropertyPtr
TreeItemModel(XmlOptionFile options, VisServicesPtr services, QObject *parent=0)
TreeNodePtr getCurrentItem()
virtual Qt::ItemFlags flags(const QModelIndex &index) const
virtual QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const