digikam
Digikam::AbstractAlbumModel Class Reference
#include <abstractalbummodel.h>

Public Types | |
| enum | AlbumDataRole { AlbumTypeRole = Qt::UserRole, AlbumPointerRole = Qt::UserRole + 1 } |
| enum | RootAlbumBehavior { IncludeRootAlbum, IgnoreRootAlbum } |
Signals | |
| void | rootAlbumAvailable () |
Public Member Functions | |
| AbstractAlbumModel (Album::Type albumType, Album *rootAlbum, RootAlbumBehavior rootBehavior=IncludeRootAlbum, QObject *parent=0) | |
| ~AbstractAlbumModel () | |
| Album * | albumForIndex (const QModelIndex &index) const |
| Album::Type | albumType () const |
| virtual int | columnCount (const QModelIndex &parent=QModelIndex()) const |
| virtual QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const |
| AlbumModelDragDropHandler * | dragDropHandler () const |
| virtual bool | dropMimeData (const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) |
| virtual Qt::ItemFlags | flags (const QModelIndex &index) const |
| virtual bool | hasChildren (const QModelIndex &parent=QModelIndex()) const |
| 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 |
| QModelIndex | indexForAlbum (Album *album) const |
| virtual QMimeData * | mimeData (const QModelIndexList &indexes) const |
| virtual QStringList | mimeTypes () const |
| virtual QModelIndex | parent (const QModelIndex &index) const |
| Album * | rootAlbum () const |
| QModelIndex | rootAlbumIndex () const |
| virtual int | rowCount (const QModelIndex &parent=QModelIndex()) const |
| void | setDragDropHandler (AlbumModelDragDropHandler *handler) |
| virtual Qt::DropActions | supportedDropActions () const |
Protected Slots | |
| void | slotAlbumAboutToBeAdded (Album *album, Album *parent, Album *prev) |
| void | slotAlbumAboutToBeDeleted (Album *album) |
| void | slotAlbumAdded (Album *) |
| void | slotAlbumHasBeenDeleted (void *) |
| void | slotAlbumIconChanged (Album *album) |
| void | slotAlbumRenamed (Album *album) |
| void | slotAlbumsCleared () |
Protected Member Functions | |
| virtual void | albumCleared (Album *) |
| virtual QVariant | albumData (Album *a, int role) const |
| virtual void | allAlbumsCleared () |
| virtual QString | columnHeader () const |
| virtual QVariant | decorationRole (Album *a) const |
| virtual bool | filterAlbum (Album *album) const |
| virtual Qt::ItemFlags | itemFlags (Album *album) const |
| void | setEnableDrag (bool enable) |
| void | setEnableDrop (bool enable) |
Detailed Description
Definition at line 46 of file abstractalbummodel.h.
Member Enumeration Documentation
- Enumerator:
AlbumTypeRole Returns the Album::Type of the associated album.
AlbumPointerRole Returns a pointer to the associated Album object.
Definition at line 68 of file abstractalbummodel.h.
AbstractAlbumModel is the abstract base class for all models that present Album objects as managed by AlbumManager.
You will want to create an instance of the base classes.
- Enumerator:
Definition at line 58 of file abstractalbummodel.h.
Constructor & Destructor Documentation
| Digikam::AbstractAlbumModel::AbstractAlbumModel | ( | Album::Type | albumType, | |
| Album * | rootAlbum, | |||
| RootAlbumBehavior | rootBehavior = IncludeRootAlbum, |
|||
| QObject * | parent = 0 | |||
| ) |
Create an AbstractAlbumModel object for albums with the given type.
Pass the root album if it is already available. Do not use this class directly, but one of the subclasses.
Definition at line 41 of file abstractalbummodel.cpp.
| Digikam::AbstractAlbumModel::~AbstractAlbumModel | ( | ) |
Definition at line 71 of file abstractalbummodel.cpp.
Member Function Documentation
| virtual void Digikam::AbstractAlbumModel::albumCleared | ( | Album * | ) | [inline, protected, virtual] |
Notification when an entry is removed.
Reimplemented in Digikam::AbstractCountingAlbumModel, and Digikam::AbstractCheckableAlbumModel.
Definition at line 140 of file abstractalbummodel.h.
For subclassing convenience: A part of the implementation of data().
Reimplemented in Digikam::AbstractCountingAlbumModel, Digikam::AbstractCheckableAlbumModel, and Digikam::SearchModel.
Definition at line 86 of file abstractalbummodel.cpp.
| Album * Digikam::AbstractAlbumModel::albumForIndex | ( | const QModelIndex & | index | ) | const |
Returns the album object associated with the given model index.
Reimplemented in Digikam::AlbumModel, Digikam::TagModel, Digikam::SearchModel, and Digikam::DateAlbumModel.
Definition at line 284 of file abstractalbummodel.cpp.
| Album::Type Digikam::AbstractAlbumModel::albumType | ( | ) | const |
Returns the Album::Type of the contained albums.
Definition at line 299 of file abstractalbummodel.cpp.
| virtual void Digikam::AbstractAlbumModel::allAlbumsCleared | ( | ) | [inline, protected, virtual] |
Notification when all entries are removed.
Reimplemented in Digikam::AbstractCountingAlbumModel, and Digikam::AbstractCheckableAlbumModel.
Definition at line 142 of file abstractalbummodel.h.
| int Digikam::AbstractAlbumModel::columnCount | ( | const QModelIndex & | parent = QModelIndex() |
) | const [virtual] |
Definition at line 132 of file abstractalbummodel.cpp.
| QString Digikam::AbstractAlbumModel::columnHeader | ( | ) | const [protected, virtual] |
For subclassing convenience: A part of the implementation of headerData().
Reimplemented in Digikam::AbstractSpecificAlbumModel.
Definition at line 309 of file abstractalbummodel.cpp.
| QVariant Digikam::AbstractAlbumModel::data | ( | const QModelIndex & | index, | |
| int | role = Qt::DisplayRole | |||
| ) | const [virtual] |
Definition at line 76 of file abstractalbummodel.cpp.
For subclassing convenience: A part of the implementation of data().
Reimplemented in Digikam::AlbumModel, Digikam::TagModel, and Digikam::DateAlbumModel.
Definition at line 304 of file abstractalbummodel.cpp.
| AlbumModelDragDropHandler * Digikam::AbstractAlbumModel::dragDropHandler | ( | ) | const |
Returns the drag drop handler, or 0 if none is installed.
Definition at line 255 of file abstractalbummodel.cpp.
| bool Digikam::AbstractAlbumModel::dropMimeData | ( | const QMimeData * | data, | |
| Qt::DropAction | action, | |||
| int | row, | |||
| int | column, | |||
| const QModelIndex & | parent | |||
| ) | [virtual] |
Reimplemented from QAbstractItemModel.
Definition at line 219 of file abstractalbummodel.cpp.
| bool Digikam::AbstractAlbumModel::filterAlbum | ( | Album * | album | ) | const [protected, virtual] |
Returns true for those and only those albums that shall be contained in this model.
They must have a common root album, which is set in the constructor.
Reimplemented in Digikam::SearchModel.
Definition at line 324 of file abstractalbummodel.cpp.
| Qt::ItemFlags Digikam::AbstractAlbumModel::flags | ( | const QModelIndex & | index | ) | const [virtual] |
Reimplemented in Digikam::AbstractCheckableAlbumModel.
Definition at line 137 of file abstractalbummodel.cpp.
| bool Digikam::AbstractAlbumModel::hasChildren | ( | const QModelIndex & | parent = QModelIndex() |
) | const [virtual] |
Definition at line 146 of file abstractalbummodel.cpp.
| QVariant Digikam::AbstractAlbumModel::headerData | ( | int | section, | |
| Qt::Orientation | orientation, | |||
| int | role = Qt::DisplayRole | |||
| ) | const [virtual] |
Definition at line 105 of file abstractalbummodel.cpp.
| QModelIndex Digikam::AbstractAlbumModel::index | ( | int | row, | |
| int | column, | |||
| const QModelIndex & | parent = QModelIndex() | |||
| ) | const [virtual] |
Definition at line 165 of file abstractalbummodel.cpp.
| QModelIndex Digikam::AbstractAlbumModel::indexForAlbum | ( | Album * | album | ) | const |
Return the QModelIndex for the given album, or an invalid index if the album is not contained in this model.
Definition at line 260 of file abstractalbummodel.cpp.
| Qt::ItemFlags Digikam::AbstractAlbumModel::itemFlags | ( | Album * | album | ) | const [protected, virtual] |
For subclassing convenience: A part of the implementation of itemFlags().
Definition at line 314 of file abstractalbummodel.cpp.
| QMimeData * Digikam::AbstractAlbumModel::mimeData | ( | const QModelIndexList & | indexes | ) | const [virtual] |
Definition at line 225 of file abstractalbummodel.cpp.
| QStringList Digikam::AbstractAlbumModel::mimeTypes | ( | ) | const [virtual] |
Definition at line 212 of file abstractalbummodel.cpp.
| QModelIndex Digikam::AbstractAlbumModel::parent | ( | const QModelIndex & | index | ) | const [virtual] |
Definition at line 197 of file abstractalbummodel.cpp.
| Album * Digikam::AbstractAlbumModel::rootAlbum | ( | ) | const |
Definition at line 289 of file abstractalbummodel.cpp.
| void Digikam::AbstractAlbumModel::rootAlbumAvailable | ( | ) | [signal] |
This is initialized once after creation, if the root album becomes available, if it was not already available at time of construction.
This is emitted regardless of root album policy.
| QModelIndex Digikam::AbstractAlbumModel::rootAlbumIndex | ( | ) | const |
Return the index corresponding to the root album. If the policy is IgnoreRootAlbum, this is an invalid index. */.
Definition at line 294 of file abstractalbummodel.cpp.
| int Digikam::AbstractAlbumModel::rowCount | ( | const QModelIndex & | parent = QModelIndex() |
) | const [virtual] |
Definition at line 113 of file abstractalbummodel.cpp.
| void Digikam::AbstractAlbumModel::setDragDropHandler | ( | AlbumModelDragDropHandler * | handler | ) |
Set a drag drop handler.
Definition at line 250 of file abstractalbummodel.cpp.
| void Digikam::AbstractAlbumModel::setEnableDrag | ( | bool | enable | ) | [protected] |
Switch on drag and drop globally for all items.
Default is true. For per-item cases reimplement itemFlags().
Definition at line 240 of file abstractalbummodel.cpp.
| void Digikam::AbstractAlbumModel::setEnableDrop | ( | bool | enable | ) | [protected] |
Definition at line 245 of file abstractalbummodel.cpp.
| void Digikam::AbstractAlbumModel::slotAlbumAboutToBeAdded | ( | Album * | album, | |
| Album * | parent, | |||
| Album * | prev | |||
| ) | [protected, slot] |
Definition at line 329 of file abstractalbummodel.cpp.
| void Digikam::AbstractAlbumModel::slotAlbumAboutToBeDeleted | ( | Album * | album | ) | [protected, slot] |
Definition at line 362 of file abstractalbummodel.cpp.
| void Digikam::AbstractAlbumModel::slotAlbumAdded | ( | Album * | album | ) | [protected, slot] |
Definition at line 349 of file abstractalbummodel.cpp.
| void Digikam::AbstractAlbumModel::slotAlbumHasBeenDeleted | ( | void * | p | ) | [protected, slot] |
Definition at line 377 of file abstractalbummodel.cpp.
| void Digikam::AbstractAlbumModel::slotAlbumIconChanged | ( | Album * | album | ) | [protected, slot] |
Definition at line 393 of file abstractalbummodel.cpp.
| void Digikam::AbstractAlbumModel::slotAlbumRenamed | ( | Album * | album | ) | [protected, slot] |
Definition at line 399 of file abstractalbummodel.cpp.
| void Digikam::AbstractAlbumModel::slotAlbumsCleared | ( | ) | [protected, slot] |
Definition at line 386 of file abstractalbummodel.cpp.
| Qt::DropActions Digikam::AbstractAlbumModel::supportedDropActions | ( | ) | const [virtual] |
Definition at line 207 of file abstractalbummodel.cpp.
The documentation for this class was generated from the following files:
KDE 4.4 API Reference