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();
65 int mViewGroupCount, mViewGroupIndex, mColorIndex, mNameIndex, mColumnCount;
68 QItemSelectionModel* mSelectionModel;
73 bool isViewGroupColumn(
int col)
const;
74 int viewGroupFromColumn(
int col)
const;
76 TreeNode* itemFromIndex(
const QModelIndex& index)
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
boost::shared_ptr< class TreeRepository > TreeRepositoryPtr
void currentItemChanged()
boost::shared_ptr< TreeNode > TreeNodePtr
boost::shared_ptr< class VisServices > VisServicesPtr
virtual Qt::ItemFlags flags(const QModelIndex &index) const
TreeNodePtr getCurrentItem()
virtual bool setData(const QModelIndex &index, const QVariant &value, int role)
virtual QModelIndex parent(const QModelIndex &index) const
virtual int columnCount(const QModelIndex &parent=QModelIndex()) const
TreeItemModel(XmlOptionFile options, VisServicesPtr services, QObject *parent=0)
virtual QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
virtual QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const
boost::shared_ptr< class StringListProperty > StringListPropertyPtr
void setSelectionModel(QItemSelectionModel *selectionModel)
TreeNodePtr getNodeFromIndex(const QModelIndex &index)
StringListPropertyPtr getShowColumnsProperty()
virtual int rowCount(const QModelIndex &parent=QModelIndex()) const
virtual QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
Helper class for xml files used to store ssc/cx data.