digiKam Developer Documentation: Digikam::TagMngrListModel Class Reference

| digiKam Developer Documentation Professional Photo Management with the Power of Open Source

Loading...
Searching...
No Matches
Public Member Functions | List of all members
Digikam::TagMngrListModel Class Reference
Inheritance diagram for Digikam::TagMngrListModel:

## Public Member Functions
| TagMngrListModel (QObject *const parent=nullptr)
ListItem * | addItem (QList< QVariant > values)
| add new item to list.
QList< ListItem * > | allItems () const
| return all items from List, usually to be saved in KConfig.
int | columnCount (const QModelIndex &parent=QModelIndex()) const override
QVariant | data (const QModelIndex &index, int role) const override
| Standard methods to be implemented when subcassing QAbstractItemModel.
void | deleteItem (ListItem *const item)
bool | dropMimeData (const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) override
Qt::ItemFlags | flags (const QModelIndex &index) const override
QList< int > | getDragNewSelection () const
QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
QModelIndex | index (int row, int column, const QModelIndex &parent=QModelIndex()) const override
QMimeData * | mimeData (const QModelIndexList &indexes) const override
QStringList | mimeTypes () const override
QModelIndex | parent (const QModelIndex &index) const override
int | rowCount (const QModelIndex &parent=QModelIndex()) const override
bool | setData (const QModelIndex &index, const QVariant &value, int role) override
Qt::DropActions | supportedDropActions () const override
| Reimplemented methods for handling drag-n-drop, encoding and decoding mime types.

## Member Function Documentation

## ◆ addItem()

ListItem * Digikam::TagMngrListModel::addItem | ( | QList< QVariant > | values | ) |

Parameters

  values | A list of data for item: Name as QString, QBrush as background and qlonglong as id.

Returns
  pointer to newly created listitem.

Note
  containsItem will return a valid pointer if item with the same values is already added to it's children list.

## ◆ dropMimeData()

bool Digikam::TagMngrListModel::dropMimeData | ( | const QMimeData * | data,
|  | Qt::DropAction | action,
|  | int | row,
|  | int | column,
|  | const QModelIndex & | parent
| ) |  |
| override

Note
  after drag-n-drop selection is messed up, store the interval were new items are and TagsMngrListView will update selection.