digiKam
Digikam::BookmarksModel Class Reference
+ Inheritance diagram for Digikam::BookmarksModel:

Public Types

enum  Roles {
  TypeRole = Qt::UserRole + 1 , UrlRole = Qt::UserRole + 2 , UrlStringRole = Qt::UserRole + 3 , SeparatorRole = Qt::UserRole + 4 ,
  DateAddedRole = Qt::UserRole + 5
}
 

Public Slots

void entryAdded (BookmarkNode *item)
 
void entryChanged (BookmarkNode *item)
 
void entryRemoved (BookmarkNode *parent, int row, BookmarkNode *item)
 

Public Member Functions

BookmarksManagerbookmarksManager () const
 
 BookmarksModel (BookmarksManager *const mngr, QObject *const parent=nullptr)
 
int columnCount (const QModelIndex &parent=QModelIndex()) const override
 
QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const override
 
bool dropMimeData (const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) override
 
Qt::ItemFlags flags (const QModelIndex &index) const override
 
bool hasChildren (const QModelIndex &parent=QModelIndex()) const override
 
QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
 
QModelIndex index (BookmarkNode *node) const
 
QModelIndex index (int, int, const QModelIndex &=QModelIndex()) const override
 
QMimeData * mimeData (const QModelIndexList &indexes) const override
 
QStringList mimeTypes () const override
 
BookmarkNodenode (const QModelIndex &index) const
 
QModelIndex parent (const QModelIndex &index=QModelIndex()) const override
 
bool removeRows (int row, int count, const QModelIndex &parent=QModelIndex()) override
 
int rowCount (const QModelIndex &parent=QModelIndex()) const override
 
bool setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override
 
Qt::DropActions supportedDropActions () const override
 
 ~BookmarksModel () override
 

Detailed Description

BookmarksModel is a QAbstractItemModel wrapper around the BookmarkManager

Member Enumeration Documentation

◆ Roles

Enumerator
TypeRole 
UrlRole 
UrlStringRole 
SeparatorRole 
DateAddedRole 

Constructor & Destructor Documentation

◆ BookmarksModel()

Digikam::BookmarksModel::BookmarksModel ( BookmarksManager *const  mngr,
QObject *const  parent = nullptr 
)
explicit

◆ ~BookmarksModel()

Digikam::BookmarksModel::~BookmarksModel ( )
override

Member Function Documentation

◆ bookmarksManager()

BookmarksManager * Digikam::BookmarksModel::bookmarksManager ( ) const

◆ columnCount()

int Digikam::BookmarksModel::columnCount ( const QModelIndex &  parent = QModelIndex()) const
override

References parent().

Referenced by index().

◆ data()

◆ dropMimeData()

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

◆ entryAdded

void Digikam::BookmarksModel::entryAdded ( BookmarkNode item)
slot

◆ entryChanged

void Digikam::BookmarksModel::entryChanged ( BookmarkNode item)
slot

References index().

Referenced by BookmarksModel().

◆ entryRemoved

void Digikam::BookmarksModel::entryRemoved ( BookmarkNode parent,
int  row,
BookmarkNode item 
)
slot

References index(), and parent().

Referenced by BookmarksModel().

◆ flags()

Qt::ItemFlags Digikam::BookmarksModel::flags ( const QModelIndex &  index) const
override

◆ hasChildren()

bool Digikam::BookmarksModel::hasChildren ( const QModelIndex &  parent = QModelIndex()) const
override

◆ headerData()

QVariant Digikam::BookmarksModel::headerData ( int  section,
Qt::Orientation  orientation,
int  role = Qt::DisplayRole 
) const
override

◆ index() [1/2]

QModelIndex Digikam::BookmarksModel::index ( BookmarkNode node) const

◆ index() [2/2]

QModelIndex Digikam::BookmarksModel::index ( int  row,
int  column,
const QModelIndex &  parent = QModelIndex() 
) const
override

◆ mimeData()

QMimeData * Digikam::BookmarksModel::mimeData ( const QModelIndexList &  indexes) const
override

◆ mimeTypes()

QStringList Digikam::BookmarksModel::mimeTypes ( ) const
override

◆ node()

BookmarkNode * Digikam::BookmarksModel::node ( const QModelIndex &  index) const

◆ parent()

QModelIndex Digikam::BookmarksModel::parent ( const QModelIndex &  index = QModelIndex()) const
override

◆ removeRows()

bool Digikam::BookmarksModel::removeRows ( int  row,
int  count,
const QModelIndex &  parent = QModelIndex() 
)
override

◆ rowCount()

int Digikam::BookmarksModel::rowCount ( const QModelIndex &  parent = QModelIndex()) const
override

References Digikam::BookmarkNode::children(), and parent().

Referenced by index(), and removeRows().

◆ setData()

bool Digikam::BookmarksModel::setData ( const QModelIndex &  index,
const QVariant &  value,
int  role = Qt::EditRole 
)
override

◆ supportedDropActions()

Qt::DropActions Digikam::BookmarksModel::supportedDropActions ( ) const
override

The documentation for this class was generated from the following files: