Model for Item-Views displaying a library resource's contents. More...
#include <klflibview.h>
Classes | |
struct | PersistentId |
Public Types | |
enum | FlavorFlag { LinearList = 0x0001, IconViewList = LinearList, CategoryTree = 0x0002, DisplayTypeMask = 0x000f, GroupSubCategories = 0x1000 } |
enum | ItemKind { EntryKind, CategoryLabelKind } |
enum | { ItemKindItemRole = Qt::UserRole+768, EntryContentsTypeItemRole, EntryIdItemRole, FullEntryItemRole, CategoryLabelItemRole, FullCategoryPathItemRole } |
enum | { DropWillAccept = 0x0001, DropWillCategorize = 0x0002, DropWillMove = 0x0004 } |
Public Slots | |
virtual QModelIndex | searchFind (const QString &queryString, const QModelIndex &fromIndex=QModelIndex(), bool forward=true) |
virtual QModelIndex | searchFindNext (bool forward) |
virtual void | searchAbort () |
virtual void | completeRefresh () |
virtual void | setFetchBatchCount (int count) |
Signals | |
void | operationStartReportingProgress (KLFProgressReporter *progressReporter, const QString &descriptiveText) |
Public Member Functions | |
KLFLibModel (KLFLibResourceEngine *resource, uint flavorFlags=LinearList|GroupSubCategories, QObject *parent=NULL) | |
virtual | ~KLFLibModel () |
virtual void | setResource (KLFLibResourceEngine *resource) |
virtual KLFLibResourceEngine * | resource () |
virtual QUrl | url () const |
virtual void | setFlavorFlags (uint flags, uint modify_mask=0xffffffff) |
virtual uint | flavorFlags () const |
uint | displayType () const |
virtual void | prefetch (const QModelIndexList &index) const |
virtual QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const |
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 bool | hasIndex (int row, int column, const QModelIndex &parent=QModelIndex()) const |
virtual QModelIndex | index (int row, int column, const QModelIndex &parent=QModelIndex()) const |
virtual QModelIndex | parent (const QModelIndex &index) const |
virtual int | rowCount (const QModelIndex &parent=QModelIndex()) const |
virtual int | columnCount (const QModelIndex &parent=QModelIndex()) const |
virtual bool | canFetchMore (const QModelIndex &parent) const |
virtual void | fetchMore (const QModelIndex &parent) |
virtual Qt::DropActions | supportedDropActions () const |
virtual QStringList | mimeTypes () const |
virtual QMimeData * | mimeData (const QModelIndexList &indexes) const |
virtual bool | dropMimeData (const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) |
virtual uint | dropFlags (QDragMoveEvent *event, QAbstractItemView *view) |
virtual QImage | dragImage (const QModelIndexList &indexes) |
virtual int | entryColumnContentsPropertyId (int column) const |
virtual int | columnForEntryPropertyId (int entryPropertyId) const |
virtual bool | isDesendantOf (const QModelIndex &child, const QModelIndex &ancestor) |
virtual QStringList | categoryList () const |
virtual void | updateData (const QList< KLFLib::entryId > &entryIdList, int modifyType) |
virtual QModelIndex | walkNextIndex (const QModelIndex &cur) |
Call repeatedly to walk all indexes (once each exactly, first column only) | |
virtual QModelIndex | walkPrevIndex (const QModelIndex &cur) |
Call repeatedly to walk all indexes in model in reverse order. | |
virtual KLFLib::entryId | entryIdForIndex (const QModelIndex &index) const |
virtual QModelIndex | findEntryId (KLFLib::entryId eid) const |
virtual QList< KLFLib::entryId > | entryIdForIndexList (const QModelIndexList &indexlist) const |
virtual QModelIndexList | findEntryIdList (const QList< KLFLib::entryId > &eidlist) const |
virtual int | fetchBatchCount () const |
virtual void | redoSort () |
notify the model that the entrySorter() settings were changed, and we need to re-sort. | |
virtual void | sort (int column, Qt::SortOrder order=Qt::AscendingOrder) |
change the entrySorter accordingly and re-sort the model. | |
virtual KLFLibEntrySorter * | entrySorter () |
The current KLFLibEntrySorter that sorts our items. | |
virtual void | setEntrySorter (KLFLibEntrySorter *entrySorter) |
Static Public Member Functions | |
static int | entryItemRole (int propertyId) |
static int | entryPropIdForItemRole (int role) |
Friends | |
QDebug & | operator<< (QDebug &, const PersistentId &) |
Model for Item-Views displaying a library resource's contents.
The Model can morph into different forms, for simulating various common & useful displays (chronological list (history), category/tags tree (archive), maybe icons in the future, ...).
Definition at line 459 of file klflibview.h.
anonymous enum |
ItemKindItemRole | |
EntryContentsTypeItemRole | |
EntryIdItemRole | |
FullEntryItemRole | |
CategoryLabelItemRole | |
FullCategoryPathItemRole |
Definition at line 477 of file klflibview.h.
anonymous enum |
Definition at line 541 of file klflibview.h.
Definition at line 463 of file klflibview.h.
Definition at line 476 of file klflibview.h.
KLFLibModel::KLFLibModel | ( | KLFLibResourceEngine * | resource, |
uint | flavorFlags = LinearList|GroupSubCategories , |
||
QObject * | parent = NULL |
||
) |
Definition at line 1521 of file klflibview.cpp.
References KLFLibEntry::DateTime, KLF_DEBUG_TIME_BLOCK, KLF_FUNC_NAME, KLFLibModelCache, setFetchBatchCount(), and setResource().
KLFLibModel::~KLFLibModel | ( | ) | [virtual] |
Definition at line 1547 of file klflibview.cpp.
References KLF_DEBUG_TIME_BLOCK, and KLF_FUNC_NAME.
bool KLFLibModel::canFetchMore | ( | const QModelIndex & | parent | ) | const [virtual] |
Definition at line 1875 of file klflibview.cpp.
References KLFLibModelCache::canFetchMore(), KLFLibModelCache::getNodeForIndex(), KLF_DEBUG_TIME_BLOCK, KLF_FUNC_NAME, KLFLibModelCache::NodeId::rootNode(), and KLFLibModelCache::NodeId::valid().
QStringList KLFLibModel::categoryList | ( | ) | const [virtual] |
Definition at line 2150 of file klflibview.cpp.
References KLFLibModelCache::categoryListCache().
Referenced by KLFLibDefaultView::getCategorySuggestions().
int KLFLibModel::columnCount | ( | const QModelIndex & | parent = QModelIndex() | ) | const [virtual] |
Definition at line 1833 of file klflibview.cpp.
Referenced by KLFLibDefaultView::sortBy().
int KLFLibModel::columnForEntryPropertyId | ( | int | entryPropertyId | ) | const [virtual] |
Definition at line 1855 of file klflibview.cpp.
References KLFLibEntry::Category, KLFLibEntry::DateTime, KLFLibEntry::Latex, KLFLibEntry::Preview, and KLFLibEntry::Tags.
Referenced by setFlavorFlags(), KLFLibDefaultView::showColumns(), and KLFLibDefaultView::sortBy().
void KLFLibModel::completeRefresh | ( | ) | [virtual, slot] |
Definition at line 2342 of file klflibview.cpp.
References KLF_DEBUG_TIME_BLOCK, and KLF_FUNC_NAME.
Referenced by KLFLibDefaultView::slotRefresh().
QVariant KLFLibModel::data | ( | const QModelIndex & | index, |
int | role = Qt::DisplayRole |
||
) | const [virtual] |
Definition at line 1622 of file klflibview.cpp.
References KLFLibEntry::category(), KLFLibEntry::Category, KLFLibModelCache::CategoryLabelNode::categoryLabel, CategoryLabelItemRole, CategoryLabelKind, QModelIndex::column(), QList::contains(), KLFLibEntry::dateTime(), KLFLibEntry::DateTime, KLFLibModelCache::ensureNotMinimalist(), KLFLibModelCache::EntryNode::entry, entryColumnContentsPropertyId(), EntryContentsTypeItemRole, KLFLibModelCache::EntryNode::entryid, EntryIdItemRole, entryItemRole(), EntryKind, entryPropIdForItemRole(), QVariant::fromValue(), KLFLibModelCache::CategoryLabelNode::fullCategoryPath, FullCategoryPathItemRole, FullEntryItemRole, KLFLibModelCache::getCategoryLabelNodeRef(), KLFLibModelCache::getEntryNodeRef(), KLFLibModelCache::getNode(), KLFLibModelCache::getNodeForIndex(), KLFLibModelCache::NodeId::isRoot(), ItemKindItemRole, KLFLibModelCache::NodeId::kind, KLF_DEBUG_TIME_BLOCK, KLF_FUNC_NAME, KLFLibEntry::latex(), KLFLibEntry::Latex, KLFLibModelCache::EntryNode::minimalist, KLFLibModelCache::minimalistEntryPropIds(), KLFLibModelCache::Node::parent, parent(), KLFLibEntry::preview(), KLFLibEntry::Preview, KLFLibEntry::previewSize(), KLFLibEntry::PreviewSize, propId, KLFLibEntry::style(), KLFLibEntry::Style, KLFLibEntry::tags(), KLFLibEntry::Tags, and KLFLibModelCache::NodeId::valid().
uint KLFLibModel::displayType | ( | ) | const [inline] |
Definition at line 513 of file klflibview.h.
Referenced by KLFLibModelCache::cacheFindCategoryLabel(), and KLFLibModelCache::treeInsertEntry().
QImage KLFLibModel::dragImage | ( | const QModelIndexList & | indexes | ) | [virtual] |
Definition at line 2083 of file klflibview.cpp.
References autocrop_image(), QList::contains(), QPainter::drawImage(), QPainter::drawPoint(), KLFLibModelCache::EntryNode::entry, EntryKind, QImage::fill(), KLFLibModelCache::getEntryNodeRef(), KLFLibModelCache::getNodeForIndex(), QList::isEmpty(), KLFLibModelCache::NodeId::kind, KLF_DEBUG_TIME_BLOCK, KLF_FUNC_NAME, pointToSizeF(), KLFLibEntry::preview(), QImage::scaled(), QPainter::setCompositionMode(), QPainter::setPen(), QImage::size(), QList::size(), sizeToPointF(), transparentify_image(), and KLFLibModelCache::NodeId::valid().
Referenced by KLFLibDefViewCommon::commonStartDrag().
uint KLFLibModel::dropFlags | ( | QDragMoveEvent * | event, |
QAbstractItemView * | view | ||
) | [virtual] |
Definition at line 2061 of file klflibview.cpp.
References KLFAbstractLibEntryMimeEncoder::canDecodeMimeData(), KLFLibResourceEngine::canModifyData(), CategoryTree, KLFLibResourceEngine::ChangeData, QModelIndex::column(), DropWillAccept, DropWillCategorize, DropWillMove, QAbstractItemView::indexAt(), KLFLibResourceEngine::InsertData, QModelIndex::isValid(), KLF_DEBUG_TIME_BLOCK, and KLF_FUNC_NAME.
Referenced by KLFLibDefViewCommon::evDragEnter(), and KLFLibDefViewCommon::evDragMove().
bool KLFLibModel::dropMimeData | ( | const QMimeData * | data, |
Qt::DropAction | action, | ||
int | row, | ||
int | column, | ||
const QModelIndex & | parent | ||
) | [virtual] |
Reimplemented from QAbstractItemModel.
Definition at line 1970 of file klflibview.cpp.
References KLFAbstractLibEntryMimeEncoder::canDecodeMimeData(), KLFLibResourceEngine::canModifyData(), KLFLibEntry::Category, CategoryLabelKind, CategoryTree, KLFLibResourceEngine::ChangeData, KLFLibResourceEngine::changeEntries(), QString::chop(), QList::contains(), QMimeData::data(), KLFAbstractLibEntryMimeEncoder::decodeMimeData(), QString::endsWith(), QMimeData::formats(), KLFLibModelCache::CategoryLabelNode::fullCategoryPath, KLFLibModelCache::getCategoryLabelNodeRef(), KLFLibModelCache::getNodeForIndex(), QMimeData::hasFormat(), KLFLibResourceEngine::InsertData, KLFLibResourceEngine::insertEntries(), QList::isEmpty(), KLFLibModelCache::NodeId::kind, KLF_DEBUG_TIME_BLOCK, KLF_FUNC_NAME, klfDbg, KLFLibModelCache::NodeId::rootNode(), QDataStream::setVersion(), QList::size(), KLFLibModelCache::NodeId::valid(), and QMessageBox::warning().
int KLFLibModel::entryColumnContentsPropertyId | ( | int | column | ) | const [virtual] |
Definition at line 1837 of file klflibview.cpp.
References KLFLibEntry::Category, KLFLibEntry::DateTime, KLFLibEntry::Latex, KLFLibEntry::Preview, and KLFLibEntry::Tags.
Referenced by data(), headerData(), and sort().
KLFLib::entryId KLFLibModel::entryIdForIndex | ( | const QModelIndex & | index | ) | const [virtual] |
Definition at line 2175 of file klflibview.cpp.
References entryIdForIndexList(), KLF_DEBUG_TIME_BLOCK, and KLF_FUNC_NAME.
QList< KLFLib::entryId > KLFLibModel::entryIdForIndexList | ( | const QModelIndexList & | indexlist | ) | const [virtual] |
Definition at line 2187 of file klflibview.cpp.
References KLFLibModelCache::entryIdForIndexList(), KLF_DEBUG_TIME_BLOCK, and KLF_FUNC_NAME.
Referenced by entryIdForIndex(), KLFLibDefaultView::selectedEntryIds(), and KLFLibDefaultView::slotResourceDataChanged().
static int KLFLibModel::entryItemRole | ( | int | propertyId | ) | [inline, static] |
For example use
model->data(index, KLFLibModel::entryItemRole(KLFLibEntry::Latex)).toString()
to get LaTeX string for model index index
.
Definition at line 492 of file klflibview.h.
Referenced by data(), KLFLibViewDelegate::paintEntry(), and KLFLibViewDelegate::sizeHint().
static int KLFLibModel::entryPropIdForItemRole | ( | int | role | ) | [inline, static] |
inverse operation of entryItemRole
Definition at line 494 of file klflibview.h.
Referenced by data().
virtual KLFLibEntrySorter* KLFLibModel::entrySorter | ( | ) | [inline, virtual] |
The current KLFLibEntrySorter that sorts our items.
Definition at line 577 of file klflibview.h.
Referenced by KLFLibModelCache::nodeValue(), and setEntrySorter().
virtual int KLFLibModel::fetchBatchCount | ( | ) | const [inline, virtual] |
Definition at line 567 of file klflibview.h.
void KLFLibModel::fetchMore | ( | const QModelIndex & | parent | ) | [virtual] |
Reimplemented from QAbstractItemModel.
Definition at line 1886 of file klflibview.cpp.
References KLFLibModelCache::fetchMore(), KLFLibModelCache::getNodeForIndex(), KLF_DEBUG_TIME_BLOCK, and KLF_FUNC_NAME.
QModelIndex KLFLibModel::findEntryId | ( | KLFLib::entryId | eid | ) | const [virtual] |
Definition at line 2181 of file klflibview.cpp.
References findEntryIdList(), KLF_DEBUG_TIME_BLOCK, and KLF_FUNC_NAME.
QModelIndexList KLFLibModel::findEntryIdList | ( | const QList< KLFLib::entryId > & | eidlist | ) | const [virtual] |
Definition at line 2192 of file klflibview.cpp.
References KLFLibModelCache::findEntryIdList(), KLF_DEBUG_TIME_BLOCK, and KLF_FUNC_NAME.
Referenced by findEntryId(), and KLFLibDefaultView::selectEntries().
Qt::ItemFlags KLFLibModel::flags | ( | const QModelIndex & | index | ) | const [virtual] |
Definition at line 1711 of file klflibview.cpp.
References KLFLibResourceEngine::canModifyData(), KLFLibModelCache::CategoryLabelKind, KLFLibResourceEngine::ChangeData, QModelIndex::column(), KLFLibModelCache::EntryKind, KLFLibModelCache::getNodeForIndex(), KLFLibResourceEngine::InsertData, QModelIndex::isValid(), KLFLibModelCache::NodeId::kind, KLF_DEBUG_TIME_BLOCK, KLF_FUNC_NAME, QModelIndex::row(), and KLFLibModelCache::NodeId::valid().
uint KLFLibModel::flavorFlags | ( | ) | const [virtual] |
Definition at line 1601 of file klflibview.cpp.
bool KLFLibModel::hasChildren | ( | const QModelIndex & | parent = QModelIndex() | ) | const [virtual] |
Definition at line 1736 of file klflibview.cpp.
References QModelIndex::column(), KLFLibModelCache::getNode(), KLFLibModelCache::getNodeForIndex(), KLFLibModelCache::NodeId::isRoot(), KLF_DEBUG_TIME_BLOCK, KLF_FUNC_NAME, KLFLibModelCache::NodeId::rootNode(), and KLFLibModelCache::NodeId::valid().
bool KLFLibModel::hasIndex | ( | int | row, |
int | column, | ||
const QModelIndex & | parent = QModelIndex() |
||
) | const [virtual] |
Definition at line 1777 of file klflibview.cpp.
References index(), QModelIndex::isValid(), KLF_DEBUG_TIME_BLOCK, and KLF_FUNC_NAME.
QVariant KLFLibModel::headerData | ( | int | section, |
Qt::Orientation | orientation, | ||
int | role = Qt::DisplayRole |
||
) | const [virtual] |
Definition at line 1750 of file klflibview.cpp.
References KLFLibEntry::Category, entryColumnContentsPropertyId(), KLF_DEBUG_TIME_BLOCK, KLF_FUNC_NAME, KLFLibEntry::Latex, KLFLibEntry::Preview, KLFPropertizedObject::propertyNameForId(), and KLFLibEntry::Tags.
QModelIndex KLFLibModel::index | ( | int | row, |
int | column, | ||
const QModelIndex & | parent = QModelIndex() |
||
) | const [virtual] |
Definition at line 1784 of file klflibview.cpp.
References KLFLibModelCache::CategoryLabelKind, KLFLibModelCache::Node::children, QAbstractItemModel::columnCount(), KLFLibModelCache::createIndexFromId(), KLFLibModelCache::getCategoryLabelNodeRef(), KLFLibModelCache::getNodeForIndex(), QModelIndex::isValid(), KLFLibModelCache::NodeId::kind, KLF_DEBUG_BLOCK, KLF_FUNC_NAME, klfDbgT, KLFLibModelCache::NodeId::rootNode(), QList::size(), and KLFLibModelCache::NodeId::valid().
Referenced by hasIndex().
bool KLFLibModel::isDesendantOf | ( | const QModelIndex & | child, |
const QModelIndex & | ancestor | ||
) | [virtual] |
Definition at line 2141 of file klflibview.cpp.
References QModelIndex::isValid(), KLF_DEBUG_TIME_BLOCK, KLF_FUNC_NAME, and QModelIndex::parent().
QMimeData * KLFLibModel::mimeData | ( | const QModelIndexList & | indexes | ) | const [virtual] |
Definition at line 1903 of file klflibview.cpp.
References QList::contains(), KLFAbstractLibEntryMimeEncoder::createMimeData(), KLFLibResourceEngine::entry(), KLFLibModelCache::EntryNode::entryid, KLFLibModelCache::EntryKind, KLFLibModelCache::getEntryNodeRef(), KLFLibModelCache::getNodeForIndex(), KLFLibModelCache::NodeId::isRoot(), KLFLibModelCache::NodeId::kind, KLF_DEBUG_TIME_BLOCK, KLF_FUNC_NAME, QMimeData::setData(), QDataStream::setVersion(), url(), and KLFLibModelCache::NodeId::valid().
Referenced by KLFLibDefViewCommon::commonStartDrag().
QStringList KLFLibModel::mimeTypes | ( | ) | const [virtual] |
Definition at line 1898 of file klflibview.cpp.
References KLFAbstractLibEntryMimeEncoder::allEncodingMimeTypes().
void KLFLibModel::operationStartReportingProgress | ( | KLFProgressReporter * | progressReporter, |
const QString & | descriptiveText | ||
) | [signal] |
Announces the beginning of a long operation (used for updates in updateData())
Referenced by KLFLibModelCache::rebuildCache(), and KLFLibModelCache::updateData().
QModelIndex KLFLibModel::parent | ( | const QModelIndex & | index | ) | const [virtual] |
Definition at line 1804 of file klflibview.cpp.
References KLFLibModelCache::createIndexFromId(), KLFLibModelCache::getNode(), KLFLibModelCache::getNodeForIndex(), KLF_DEBUG_BLOCK, KLF_DEBUG_TEE, KLF_FUNC_NAME, klfDbgT, KLFLibModelCache::Node::parent, and KLFLibModelCache::NodeId::valid().
Referenced by data().
void KLFLibModel::prefetch | ( | const QModelIndexList & | index | ) | const [virtual] |
ensures that the cache nodes of the given index list are not 'minimalist'
Definition at line 1606 of file klflibview.cpp.
References KLFLibModelCache::ensureNotMinimalist(), KLFLibModelCache::getNodeForIndex(), KLFLibModelCache::NodeId::isRoot(), KLF_DEBUG_TIME_BLOCK, KLF_FUNC_NAME, klfDbg, and KLFLibModelCache::NodeId::valid().
void KLFLibModel::redoSort | ( | ) | [virtual] |
notify the model that the entrySorter() settings were changed, and we need to re-sort.
Definition at line 2349 of file klflibview.cpp.
References KLF_DEBUG_TIME_BLOCK, and KLF_FUNC_NAME.
Referenced by sort().
virtual KLFLibResourceEngine* KLFLibModel::resource | ( | ) | [inline, virtual] |
Definition at line 498 of file klflibview.h.
Referenced by KLFLibViewDelegate::paint(), and setResource().
int KLFLibModel::rowCount | ( | const QModelIndex & | parent = QModelIndex() | ) | const [virtual] |
Definition at line 1816 of file klflibview.cpp.
References KLFLibModelCache::Node::children, QModelIndex::column(), KLFLibModelCache::getNode(), KLFLibModelCache::getNodeForIndex(), KLF_DEBUG_BLOCK, KLF_FUNC_NAME, klfDbg, KLFLibModelCache::NodeId::rootNode(), QList::size(), and KLFLibModelCache::NodeId::valid().
void KLFLibModel::searchAbort | ( | ) | [virtual, slot] |
Definition at line 2268 of file klflibview.cpp.
Referenced by KLFLibDefaultView::searchAbort().
QModelIndex KLFLibModel::searchFind | ( | const QString & | queryString, |
const QModelIndex & | fromIndex = QModelIndex() , |
||
bool | forward = true |
||
) | [virtual, slot] |
Definition at line 2214 of file klflibview.cpp.
References KLF_DEBUG_TIME_BLOCK, KLF_FUNC_NAME, klfDbg, and searchFindNext().
Referenced by KLFLibDefaultView::searchFind().
QModelIndex KLFLibModel::searchFindNext | ( | bool | forward | ) | [virtual, slot] |
Definition at line 2224 of file klflibview.cpp.
References QString::contains(), KLFLibModelCache::createIndexFromId(), QTime::elapsed(), KLFLibModelCache::getNodeForIndex(), QString::isEmpty(), KLF_DEBUG_TIME_BLOCK, KLF_FUNC_NAME, klfDbg, KLFLibModelCache::nextNode(), KLFLibModelCache::prevNode(), QTime::restart(), and KLFLibModelCache::searchNodeMatches().
Referenced by searchFind(), and KLFLibDefaultView::searchFindNext().
void KLFLibModel::setEntrySorter | ( | KLFLibEntrySorter * | entrySorter | ) | [virtual] |
Definition at line 2199 of file klflibview.cpp.
References entrySorter(), KLF_DEBUG_TIME_BLOCK, and KLF_FUNC_NAME.
virtual void KLFLibModel::setFetchBatchCount | ( | int | count | ) | [inline, virtual, slot] |
how many items to fetch at a time when fetching preview and style (non-minimalist)
Definition at line 600 of file klflibview.h.
Referenced by KLFLibModel(), and KLFLibDefaultView::showEvent().
void KLFLibModel::setFlavorFlags | ( | uint | flags, |
uint | modify_mask = 0xffffffff |
||
) | [virtual] |
sets the flavor flags given by flags
. Only flags masked by modify_mask
are affected. Examples:
// Display type set to LinearList. GroupSubCategories is unchanged. m->setFlavorFlags(KLFLibModel::LinearList, KLFLibModel::DisplayTypeMask); // Set, and respectively unset the group sub-categories flag (no change to other flags) m->setFlavorFlags(KLFLibModel::GroupSubCategories, KLFLibModel::GroupSubCategories); m->setFlavorFlags(0, KLFLibModel::GroupSubCategories);
Definition at line 1581 of file klflibview.cpp.
References columnForEntryPropertyId(), DisplayTypeMask, GroupSubCategories, KLF_DEBUG_TIME_BLOCK, KLF_FUNC_NAME, KLFLibEntrySorter::order(), KLFLibEntrySorter::propId(), and sort().
void KLFLibModel::setResource | ( | KLFLibResourceEngine * | resource | ) | [virtual] |
Definition at line 1555 of file klflibview.cpp.
References KLF_DEBUG_ASSIGN_SAME_REF_INSTANCE, KLF_DEBUG_TIME_BLOCK, KLF_FUNC_NAME, and resource().
Referenced by KLFLibModel().
void KLFLibModel::sort | ( | int | column, |
Qt::SortOrder | order = Qt::AscendingOrder |
||
) | [virtual] |
change the entrySorter accordingly and re-sort the model.
Reimplemented from QAbstractItemModel.
Definition at line 2369 of file klflibview.cpp.
References KLFLibEntry::DateTime, entryColumnContentsPropertyId(), KLF_DEBUG_TIME_BLOCK, KLF_FUNC_NAME, KLFLibEntry::Preview, propId, redoSort(), KLFLibEntrySorter::setOrder(), KLFLibEntrySorter::setPropId(), and KLFLibModelCache::setSortingBy().
Referenced by setFlavorFlags().
Qt::DropActions KLFLibModel::supportedDropActions | ( | ) | const [virtual] |
Definition at line 1893 of file klflibview.cpp.
void KLFLibModel::updateData | ( | const QList< KLFLib::entryId > & | entryIdList, |
int | modifyType | ||
) | [virtual] |
Definition at line 2155 of file klflibview.cpp.
References KLF_DEBUG_TIME_BLOCK, KLF_FUNC_NAME, and KLFLibModelCache::updateData().
Referenced by KLFLibDefaultView::updateResourceData().
QUrl KLFLibModel::url | ( | ) | const [virtual] |
Definition at line 1565 of file klflibview.cpp.
References KLFLibResourceEngine::FeatureSubResources, KLF_DEBUG_TIME_BLOCK, KLF_FUNC_NAME, KLFLibResourceEngine::supportedFeatureFlags(), KLFLibResourceEngine::url(), and KLFLibResourceEngine::WantUrlDefaultSubResource.
Referenced by KLFLibModelCache::fetchMore(), mimeData(), and KLFLibDefaultView::url().
QModelIndex KLFLibModel::walkNextIndex | ( | const QModelIndex & | cur | ) | [virtual] |
Call repeatedly to walk all indexes (once each exactly, first column only)
Definition at line 2161 of file klflibview.cpp.
References KLFLibModelCache::createIndexFromId(), KLFLibModelCache::getNodeForIndex(), KLF_DEBUG_TIME_BLOCK, KLF_FUNC_NAME, and KLFLibModelCache::nextNode().
Referenced by KLFLibDefViewCommon::curVisibleIndex().
QModelIndex KLFLibModel::walkPrevIndex | ( | const QModelIndex & | cur | ) | [virtual] |
Call repeatedly to walk all indexes in model in reverse order.
Definition at line 2168 of file klflibview.cpp.
References KLFLibModelCache::createIndexFromId(), KLFLibModelCache::getNodeForIndex(), KLF_DEBUG_TIME_BLOCK, KLF_FUNC_NAME, and KLFLibModelCache::prevNode().
Referenced by KLFLibDefaultView::searchFind().
QDebug& operator<< | ( | QDebug & | dbg, |
const PersistentId & | n | ||
) | [friend] |
Definition at line 369 of file klflibview.cpp.