Commit ba0019f4 authored by Dirk Wilden's avatar Dirk Wilden
Browse files

only some doku

git-svn-id: 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 73996eaa
......@@ -48,54 +48,76 @@ class TreeModel : public QAbstractItemModel
/// Constructor
TreeModel(QObject *_parent = 0);
/// Destructor
/// Get the data of the corresponding entry
QVariant data(const QModelIndex &index, int role) const;
/// return the types of the corresponding entry
Qt::ItemFlags flags(const QModelIndex &index) const;
/// return the header data of the model
QVariant headerData(int section,
Qt::Orientation orientation,
int role = Qt::DisplayRole) const;
/// Get the ModelIndex at given row,column
QModelIndex index(int row, int column,
const QModelIndex &parent = QModelIndex()) const;
/// Get the parent ModelIndex
QModelIndex parent(const QModelIndex &index) const;
/// get the number of rows
int rowCount(const QModelIndex &parent = QModelIndex()) const;
/// get the number of columns
int columnCount(const QModelIndex &parent = QModelIndex()) const;
/// The object with the given id has been updated. Check if model has to be changed
void updatedObject(int id_);
/// Set the data at the given index
bool setData(const QModelIndex &index, const QVariant &value , int role);
/// Get the BaseObject corresponding to a given ModelIndex
BaseObject *getItem(const QModelIndex &index) const;
/// Return the ModelIndex corresponding to a given BaseObject and Column
QModelIndex getModelIndex(BaseObject* _object, int _column );
/// Check if the given item is the root item
bool isRoot(BaseObject * _item);
bool isRoot(BaseObject* _item);
/// Get the name of a given object
bool getObjectName(BaseObject* _object , QString& _name);
//drag & Drop
/** @name Drag and Drop
* @{ */
/// supported drag & Drop actions
Qt::DropActions supportedDropActions() const;
/// stores the mimeType for Drag & Drop
QStringList mimeTypes() const;
/// get the mimeData for a given ModelIndex
QMimeData* mimeData(const QModelIndexList& indexes) const;
/// Called when mimeData is dropped somewhere
bool dropMimeData(const QMimeData *data,
Qt::DropAction action, int row, int column, const QModelIndex &parent);
/** @} */
/// Rootitem of the tree
BaseObject* rootItem_;
......@@ -110,7 +132,6 @@ private:
void updateSourceSelection(BaseObject* _obj );
void updateTargetSelection(BaseObject* _obj );
///@todo : Save group names on exit
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment