• Skip to content
  • Skip to link menu
KDE 4.4 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

digikam

Digikam::AbstractCountingAlbumModel

Digikam::AbstractCountingAlbumModel Class Reference

#include <abstractalbummodel.h>

Inheritance diagram for Digikam::AbstractCountingAlbumModel:
Inheritance graph
[legend]

List of all members.

Public Slots

void excludeChildrenCount (const QModelIndex &index)
void includeChildrenCount (const QModelIndex &index)
void setCountMap (const QMap< int, int > &idCountMap)
void setShowCount (bool show)
bool showCount () const

Public Member Functions

 AbstractCountingAlbumModel (Album::Type albumType, Album *rootAlbum, RootAlbumBehavior rootBehavior=IncludeRootAlbum, QObject *parent=0)

Protected Member Functions

virtual void albumCleared (Album *album)
virtual QVariant albumData (Album *a, int role) const
virtual Album * albumForId (int id) const =0
virtual QString albumName (Album *a) const
virtual void allAlbumsCleared ()
void setCount (Album *album, int count)

Detailed Description

Definition at line 199 of file abstractalbummodel.h.


Constructor & Destructor Documentation

Digikam::AbstractCountingAlbumModel::AbstractCountingAlbumModel ( Album::Type  albumType,
Album *  rootAlbum,
RootAlbumBehavior  rootBehavior = IncludeRootAlbum,
QObject *  parent = 0 
)

Supports displaying a count alongside the album name in DisplayRole.

Definition at line 483 of file abstractalbummodel.cpp.


Member Function Documentation

void Digikam::AbstractCountingAlbumModel::albumCleared ( Album *   )  [protected, virtual]

Notification when an entry is removed.

Reimplemented from Digikam::AbstractAlbumModel.

Reimplemented in Digikam::AbstractCheckableAlbumModel.

Definition at line 617 of file abstractalbummodel.cpp.

QVariant Digikam::AbstractCountingAlbumModel::albumData ( Album *  a,
int  role 
) const [protected, virtual]

For subclassing convenience: A part of the implementation of data().

Reimplemented from Digikam::AbstractAlbumModel.

Reimplemented in Digikam::AbstractCheckableAlbumModel.

Definition at line 601 of file abstractalbummodel.cpp.

virtual Album* Digikam::AbstractCountingAlbumModel::albumForId ( int  id  )  const [protected, pure virtual]

need to implement in subclass

Implemented in Digikam::AlbumModel, Digikam::TagModel, and Digikam::DateAlbumModel.

QString Digikam::AbstractCountingAlbumModel::albumName ( Album *  a  )  const [protected, virtual]

Can reimplement in subclass.

Reimplemented in Digikam::DateAlbumModel.

Definition at line 612 of file abstractalbummodel.cpp.

void Digikam::AbstractCountingAlbumModel::allAlbumsCleared (  )  [protected, virtual]

Notification when all entries are removed.

Reimplemented from Digikam::AbstractAlbumModel.

Reimplemented in Digikam::AbstractCheckableAlbumModel.

Definition at line 624 of file abstractalbummodel.cpp.

void Digikam::AbstractCountingAlbumModel::excludeChildrenCount ( const QModelIndex &  index  )  [slot]

Displays only the count of the album, without adding child albums' counts.

This is the default. Can connect to QTreeView's expanded() signal.

Definition at line 505 of file abstractalbummodel.cpp.

void Digikam::AbstractCountingAlbumModel::includeChildrenCount ( const QModelIndex &  index  )  [slot]

Displays sum of the count of the album and child albums' counts.

Can connect to QTreeView's collapsed() signal.

Definition at line 514 of file abstractalbummodel.cpp.

void Digikam::AbstractCountingAlbumModel::setCount ( Album *  album,
int  count 
) [protected]

If you do not use setCountMap, excludeChildrenCount and includeChildrenCount, you can set a count here.

Definition at line 573 of file abstractalbummodel.cpp.

void Digikam::AbstractCountingAlbumModel::setCountMap ( const QMap< int, int > &  idCountMap  )  [slot]

Enable displaying the count.

Set a map of album id -> count (excluding children). If an album is not contained, no count is displayed. To display a count of 0, there must be an entry album id -> 0.

Definition at line 523 of file abstractalbummodel.cpp.

void Digikam::AbstractCountingAlbumModel::setShowCount ( bool  show  )  [slot]

Call to enable or disable showing the count. Default is false.

Definition at line 491 of file abstractalbummodel.cpp.

bool Digikam::AbstractCountingAlbumModel::showCount (  )  const [slot]

Definition at line 500 of file abstractalbummodel.cpp.


The documentation for this class was generated from the following files:
  • abstractalbummodel.h
  • abstractalbummodel.cpp

digikam

Skip menu "digikam"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

API Reference

Skip menu "API Reference"
  • digikam
Generated for API Reference by doxygen 1.5.9-20090814
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal