digiKam
|
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< ItemInfo > | allItemInfo () 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) |
TableViewColumn * | getColumnObject (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< ItemInfo > | imageInfos (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) |
Item * | itemFromImageId (const qlonglong imageId) const |
Item * | itemFromIndex (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 |
typedef DatabaseFields::Hash<QVariant> Digikam::TableViewModel::DatabaseFieldsHashRaw |
|
explicit |
|
override |
void Digikam::TableViewModel::addColumnAt | ( | const TableViewColumnConfiguration & | cpp, |
const int | targetColumn = -1 |
||
) |
void Digikam::TableViewModel::addColumnAt | ( | const TableViewColumnDescription & | description, |
const int | targetColumn = -1 |
||
) |
References Digikam::TableViewColumnDescription::toConfiguration().
Referenced by loadColumnProfile().
References infosFromItems().
|
override |
|
override |
References Digikam::TableViewColumn::data(), and itemFromIndex().
Referenced by dropMimeData().
int Digikam::TableViewModel::deepRowCount | ( | ) | const |
References hasChildren(), and index().
Referenced by deepRowIndex().
QModelIndex Digikam::TableViewModel::deepRowIndex | ( | const int | rowNumber | ) | const |
References deepRowCount(), hasChildren(), and index().
|
override |
int Digikam::TableViewModel::findChildSortedPosition | ( | TableViewModel::Item *const | parentItem, |
TableViewModel::Item *const | childItem | ||
) |
References Digikam::TableViewModel::Item::children, and lessThan().
int Digikam::TableViewModel::firstDeepRowNotInList | ( | const QList< QModelIndex > & | needleList | ) |
References hasChildren(), index(), and toCol0().
|
override |
References index().
QModelIndex Digikam::TableViewModel::fromItemFilterModelIndex | ( | const QModelIndex & | imageFilterModelIndex | ) |
QModelIndex Digikam::TableViewModel::fromItemModelIndex | ( | const QModelIndex & | imageModelIndex | ) |
TableViewColumn * Digikam::TableViewModel::getColumnObject | ( | const int | columnIndex | ) |
QList< TableViewColumn * > Digikam::TableViewModel::getColumnObjects | ( | ) |
TableViewColumnProfile Digikam::TableViewModel::getColumnProfile | ( | ) | const |
TableViewModel::GroupingMode Digikam::TableViewModel::groupingMode | ( | ) | const |
Referenced by Digikam::TableViewTreeView::hasHiddenGroupedImages().
|
override |
References Digikam::TableViewModel::Item::children, itemFromIndex(), and parent().
Referenced by deepRowCount(), deepRowIndex(), firstDeepRowNotInList(), and indexToDeepRowNumber().
|
override |
References Digikam::TableViewColumn::getTitle().
qlonglong Digikam::TableViewModel::imageId | ( | const QModelIndex & | anIndex | ) | const |
QList< qlonglong > Digikam::TableViewModel::imageIds | ( | const QModelIndexList & | indexList | ) | const |
References ASSERT_MODEL, Digikam::TableViewModel::Item::imageId, index(), and itemFromIndex().
ItemInfo Digikam::TableViewModel::imageInfo | ( | const QModelIndex & | index | ) | const |
References ASSERT_MODEL, index(), infoFromItem(), and itemFromIndex().
Referenced by Digikam::TableViewTreeView::pixmapForDrag().
References ASSERT_MODEL, index(), infoFromItem(), and itemFromIndex().
|
override |
References Digikam::TableViewModel::Item::children, itemFromIndex(), and parent().
Referenced by addColumnAt(), deepRowCount(), deepRowIndex(), firstDeepRowNotInList(), flags(), imageIds(), imageInfo(), imageInfos(), indexToDeepRowNumber(), Digikam::TableViewSelectionModelSyncer::itemSelectionToSource(), Digikam::TableViewSelectionModelSyncer::itemSelectionToTarget(), removeColumnAt(), and Digikam::TableViewSelectionModelSyncer::targetIndexToRowItemSelection().
QModelIndex Digikam::TableViewModel::indexFromImageId | ( | const qlonglong | imageId, |
const int | columnIndex | ||
) | const |
int Digikam::TableViewModel::indexToDeepRowNumber | ( | const QModelIndex & | index | ) | const |
References hasChildren(), index(), and toCol0().
ItemInfo Digikam::TableViewModel::infoFromItem | ( | TableViewModel::Item *const | item | ) | const |
References Digikam::TableViewModel::Item::imageId, Digikam::ItemModel::imageInfo(), Digikam::TableViewShared::imageModel, and Digikam::ItemModel::indexForImageId().
Referenced by Digikam::TableViewColumns::ColumnDigikamProperties::compare(), Digikam::TableViewColumns::ColumnFileProperties::compare(), Digikam::TableViewColumns::ColumnGeoProperties::compare(), Digikam::TableViewColumns::ColumnItemProperties::compare(), Digikam::TableViewColumns::ColumnPhotoProperties::compare(), Digikam::TableViewColumns::ColumnDigikamProperties::data(), Digikam::TableViewColumns::ColumnFileProperties::data(), Digikam::TableViewColumns::ColumnGeoProperties::data(), Digikam::TableViewColumns::ColumnItemProperties::data(), imageInfo(), imageInfos(), infosFromItems(), and itemDatabaseFieldsRaw().
ItemInfoList Digikam::TableViewModel::infosFromItems | ( | const QList< Item * > & | items | ) | const |
References infoFromItem().
Referenced by allItemInfo().
QVariant Digikam::TableViewModel::itemDatabaseFieldRaw | ( | TableViewModel::Item *const | item, |
const DatabaseFields::Set & | requestedField | ||
) |
References itemDatabaseFieldsRaw(), and value.
Referenced by Digikam::TableViewColumns::ColumnAudioVideoProperties::compare(), Digikam::TableViewColumns::ColumnPhotoProperties::compare(), Digikam::TableViewColumns::ColumnAudioVideoProperties::data(), and Digikam::TableViewColumns::ColumnPhotoProperties::data().
TableViewModel::DatabaseFieldsHashRaw Digikam::TableViewModel::itemDatabaseFieldsRaw | ( | TableViewModel::Item *const | item, |
const DatabaseFields::Set & | requestedSet | ||
) |
References Digikam::ItemInfo::getDatabaseFieldsRaw(), and infoFromItem().
Referenced by Digikam::TableViewColumns::ColumnPhotoProperties::data(), and itemDatabaseFieldRaw().
TableViewModel::Item * Digikam::TableViewModel::itemFromImageId | ( | const qlonglong | imageId | ) | const |
References imageId().
Referenced by indexFromImageId().
TableViewModel::Item * Digikam::TableViewModel::itemFromIndex | ( | const QModelIndex & | i | ) | const |
QModelIndex Digikam::TableViewModel::itemIndex | ( | TableViewModel::Item *const | item | ) | const |
bool Digikam::TableViewModel::lessThan | ( | TableViewModel::Item *const | itemA, |
TableViewModel::Item *const | itemB | ||
) |
References Digikam::TableViewColumn::CmpALessB, Digikam::TableViewColumn::CmpEqual, Digikam::TableViewColumn::ColumnCustomSorting, Digikam::TableViewColumn::compare(), Digikam::TableViewColumn::data(), Digikam::TableViewColumn::getColumnFlags(), getColumnObject(), Digikam::TableViewModel::Item::imageId, and Digikam::TableViewShared::tableViewModel.
Referenced by findChildSortedPosition().
void Digikam::TableViewModel::loadColumnProfile | ( | const TableViewColumnProfile & | columnProfile | ) |
|
override |
|
override |
|
override |
References Digikam::TableViewModel::Item::children, itemFromIndex(), and Digikam::TableViewModel::Item::parent.
Referenced by dropMimeData(), hasChildren(), index(), and rowCount().
void Digikam::TableViewModel::removeColumnAt | ( | const int | columnIndex | ) |
References columnCount(), index(), and rowCount().
Referenced by loadColumnProfile().
|
override |
References Digikam::TableViewModel::Item::children, itemFromIndex(), and parent().
Referenced by addColumnAt(), and removeColumnAt().
void Digikam::TableViewModel::scheduleResort | ( | ) |
void Digikam::TableViewModel::setGroupingMode | ( | const GroupingMode | newGroupingMode | ) |
References signalGroupingModeChanged().
|
signal |
Referenced by setGroupingMode().
|
slot |
|
overrideprotected |
References Digikam::TableViewModel::Item::children, and sortItems().
QList< TableViewModel::Item * > Digikam::TableViewModel::sortItems | ( | const QList< Item * > & | itemList | ) |
References Digikam::SearchXml::LessThan.
Referenced by sort().
|
override |
drag-and-drop related functions
References Digikam::CopyAction, and Digikam::MoveAction.
QModelIndex Digikam::TableViewModel::toCol0 | ( | const QModelIndex & | anIndex | ) | const |
Referenced by firstDeepRowNotInList(), and indexToDeepRowNumber().
QModelIndex Digikam::TableViewModel::toItemFilterModelIndex | ( | const QModelIndex & | i | ) | const |
References Digikam::TableViewShared::imageFilterModel, Digikam::TableViewModel::Item::imageId, Digikam::ImageSortFilterModel::indexForImageId(), and itemFromIndex().
Referenced by Digikam::TableViewSelectionModelSyncer::itemSelectionToSource(), and Digikam::TableViewSelectionModelSyncer::toSource().
QModelIndex Digikam::TableViewModel::toItemModelIndex | ( | const QModelIndex & | i | ) | const |