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

Classes

class  Item
 

Public Types

typedef DatabaseFields::Hash< QVariant > DatabaseFieldsHashRaw
 
enum  GroupingMode { GroupingHideGrouped = 0 , GroupingIgnoreGrouping = 1 , GroupingShowSubItems = 2 }
 

Public Slots

void slotSetActive (const bool isActive)
 

Signals

void signalGroupingModeChanged ()
 

Public Member Functions

void addColumnAt (const TableViewColumnConfiguration &cpp, const int targetColumn=-1)
 
void addColumnAt (const TableViewColumnDescription &description, const int targetColumn=-1)
 
QList< ItemInfoallItemInfo () const
 
int columnCount (const QModelIndex &i) const override
 
QVariant data (const QModelIndex &i, int role) const override
 
int deepRowCount () const
 
QModelIndex deepRowIndex (const int rowNumber) const
 
bool dropMimeData (const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) override
 
int findChildSortedPosition (Item *const parentItem, Item *const childItem)
 
int firstDeepRowNotInList (const QList< QModelIndex > &needleList)
 
Qt::ItemFlags flags (const QModelIndex &index) const override
 
QModelIndex fromItemFilterModelIndex (const QModelIndex &imageFilterModelIndex)
 
QModelIndex fromItemModelIndex (const QModelIndex &imageModelIndex)
 
TableViewColumngetColumnObject (const int columnIndex)
 
QList< TableViewColumn * > getColumnObjects ()
 
TableViewColumnProfile getColumnProfile () const
 
GroupingMode groupingMode () const
 
bool hasChildren (const QModelIndex &parent=QModelIndex()) const override
 
QVariant headerData (int section, Qt::Orientation orientation, int role) const override
 
qlonglong imageId (const QModelIndex &anIndex) const
 
QList< qlonglong > imageIds (const QModelIndexList &indexList) const
 
ItemInfo imageInfo (const QModelIndex &index) const
 
QList< ItemInfoimageInfos (const QModelIndexList &indexList) const
 
QModelIndex index (int row, int column, const QModelIndex &parent=QModelIndex()) const override
 
QModelIndex indexFromImageId (const qlonglong imageId, const int columnIndex) const
 
int indexToDeepRowNumber (const QModelIndex &index) const
 
ItemInfo infoFromItem (Item *const item) const
 
ItemInfoList infosFromItems (const QList< Item * > &items) const
 
QVariant itemDatabaseFieldRaw (Item *const item, const DatabaseFields::Set &requestedField)
 
DatabaseFieldsHashRaw itemDatabaseFieldsRaw (Item *const item, const DatabaseFields::Set &requestedSet)
 
ItemitemFromImageId (const qlonglong imageId) const
 
ItemitemFromIndex (const QModelIndex &i) const
 
QModelIndex itemIndex (Item *const item) const
 
bool lessThan (Item *const itemA, Item *const itemB)
 
void loadColumnProfile (const TableViewColumnProfile &columnProfile)
 
QMimeData * mimeData (const QModelIndexList &indexes) const override
 
QStringList mimeTypes () const override
 
QModelIndex parent (const QModelIndex &childIndex) const override
 
void removeColumnAt (const int columnIndex)
 
int rowCount (const QModelIndex &parent) const override
 
void scheduleResort ()
 
void setGroupingMode (const GroupingMode newGroupingMode)
 
QList< Item * > sortItems (const QList< Item * > &itemList)
 
Qt::DropActions supportedDropActions () const override
 drag-and-drop related functions More...
 
 TableViewModel (TableViewShared *const sharedObject, QObject *const parent=nullptr)
 
QModelIndex toCol0 (const QModelIndex &anIndex) const
 
QModelIndex toItemFilterModelIndex (const QModelIndex &i) const
 
QModelIndex toItemModelIndex (const QModelIndex &i) const
 
 ~TableViewModel () override
 

Protected Member Functions

void sort (int column, Qt::SortOrder order=Qt::AscendingOrder) override
 

Member Typedef Documentation

◆ DatabaseFieldsHashRaw

Member Enumeration Documentation

◆ GroupingMode

Enumerator
GroupingHideGrouped 
GroupingIgnoreGrouping 
GroupingShowSubItems 

Constructor & Destructor Documentation

◆ TableViewModel()

Digikam::TableViewModel::TableViewModel ( TableViewShared *const  sharedObject,
QObject *const  parent = nullptr 
)
explicit

◆ ~TableViewModel()

Digikam::TableViewModel::~TableViewModel ( )
override

Member Function Documentation

◆ addColumnAt() [1/2]

void Digikam::TableViewModel::addColumnAt ( const TableViewColumnConfiguration cpp,
const int  targetColumn = -1 
)

◆ addColumnAt() [2/2]

void Digikam::TableViewModel::addColumnAt ( const TableViewColumnDescription description,
const int  targetColumn = -1 
)

◆ allItemInfo()

QList< ItemInfo > Digikam::TableViewModel::allItemInfo ( ) const

References infosFromItems().

◆ columnCount()

◆ data()

QVariant Digikam::TableViewModel::data ( const QModelIndex &  i,
int  role 
) const
override

◆ deepRowCount()

int Digikam::TableViewModel::deepRowCount ( ) const

References hasChildren(), and index().

Referenced by deepRowIndex().

◆ deepRowIndex()

QModelIndex Digikam::TableViewModel::deepRowIndex ( const int  rowNumber) const

◆ dropMimeData()

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

References data(), and parent().

◆ findChildSortedPosition()

int Digikam::TableViewModel::findChildSortedPosition ( TableViewModel::Item *const  parentItem,
TableViewModel::Item *const  childItem 
)

◆ firstDeepRowNotInList()

int Digikam::TableViewModel::firstDeepRowNotInList ( const QList< QModelIndex > &  needleList)

References hasChildren(), index(), and toCol0().

◆ flags()

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

References index().

◆ fromItemFilterModelIndex()

QModelIndex Digikam::TableViewModel::fromItemFilterModelIndex ( const QModelIndex &  imageFilterModelIndex)

◆ fromItemModelIndex()

QModelIndex Digikam::TableViewModel::fromItemModelIndex ( const QModelIndex &  imageModelIndex)

◆ getColumnObject()

◆ getColumnObjects()

QList< TableViewColumn * > Digikam::TableViewModel::getColumnObjects ( )

◆ getColumnProfile()

TableViewColumnProfile Digikam::TableViewModel::getColumnProfile ( ) const

◆ groupingMode()

TableViewModel::GroupingMode Digikam::TableViewModel::groupingMode ( ) const

◆ hasChildren()

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

◆ headerData()

QVariant Digikam::TableViewModel::headerData ( int  section,
Qt::Orientation  orientation,
int  role 
) const
override

◆ imageId()

qlonglong Digikam::TableViewModel::imageId ( const QModelIndex &  anIndex) const

◆ imageIds()

QList< qlonglong > Digikam::TableViewModel::imageIds ( const QModelIndexList &  indexList) const

◆ imageInfo()

ItemInfo Digikam::TableViewModel::imageInfo ( const QModelIndex &  index) const

◆ imageInfos()

QList< ItemInfo > Digikam::TableViewModel::imageInfos ( const QModelIndexList &  indexList) const

◆ index()

◆ indexFromImageId()

QModelIndex Digikam::TableViewModel::indexFromImageId ( const qlonglong  imageId,
const int  columnIndex 
) const

◆ indexToDeepRowNumber()

int Digikam::TableViewModel::indexToDeepRowNumber ( const QModelIndex &  index) const

References hasChildren(), index(), and toCol0().

◆ infoFromItem()

◆ infosFromItems()

ItemInfoList Digikam::TableViewModel::infosFromItems ( const QList< Item * > &  items) const

References infoFromItem().

Referenced by allItemInfo().

◆ itemDatabaseFieldRaw()

◆ itemDatabaseFieldsRaw()

◆ itemFromImageId()

TableViewModel::Item * Digikam::TableViewModel::itemFromImageId ( const qlonglong  imageId) const

References imageId().

Referenced by indexFromImageId().

◆ itemFromIndex()

◆ itemIndex()

QModelIndex Digikam::TableViewModel::itemIndex ( TableViewModel::Item *const  item) const

◆ lessThan()

◆ loadColumnProfile()

void Digikam::TableViewModel::loadColumnProfile ( const TableViewColumnProfile columnProfile)

◆ mimeData()

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

◆ mimeTypes()

◆ parent()

QModelIndex Digikam::TableViewModel::parent ( const QModelIndex &  childIndex) const
override

◆ removeColumnAt()

void Digikam::TableViewModel::removeColumnAt ( const int  columnIndex)

References columnCount(), index(), and rowCount().

Referenced by loadColumnProfile().

◆ rowCount()

int Digikam::TableViewModel::rowCount ( const QModelIndex &  parent) const
override

◆ scheduleResort()

void Digikam::TableViewModel::scheduleResort ( )

◆ setGroupingMode()

void Digikam::TableViewModel::setGroupingMode ( const GroupingMode  newGroupingMode)

◆ signalGroupingModeChanged

void Digikam::TableViewModel::signalGroupingModeChanged ( )
signal

Referenced by setGroupingMode().

◆ slotSetActive

void Digikam::TableViewModel::slotSetActive ( const bool  isActive)
slot

◆ sort()

void Digikam::TableViewModel::sort ( int  column,
Qt::SortOrder  order = Qt::AscendingOrder 
)
overrideprotected

◆ sortItems()

QList< TableViewModel::Item * > Digikam::TableViewModel::sortItems ( const QList< Item * > &  itemList)

References Digikam::SearchXml::LessThan.

Referenced by sort().

◆ supportedDropActions()

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

drag-and-drop related functions

References Digikam::CopyAction, and Digikam::MoveAction.

◆ toCol0()

QModelIndex Digikam::TableViewModel::toCol0 ( const QModelIndex &  anIndex) const

◆ toItemFilterModelIndex()

◆ toItemModelIndex()

QModelIndex Digikam::TableViewModel::toItemModelIndex ( const QModelIndex &  i) const

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