#include <klflibview.h>


Public Types | |
| enum | ViewType { CategoryTreeView, ListTreeView, IconView } |
Public Slots | |
| virtual bool | selectEntries (const QList< KLFLib::entryId > &idList) |
| virtual bool | searchFind (const QString &queryString, bool forward=true) |
| virtual bool | searchFindNext (bool forward) |
| virtual void | searchAbort () |
| virtual void | restore (uint restoreflags=KLFLib::RestoreLatexAndStyle) |
| virtual void | showColumns (int propIdColumn, bool show) |
| virtual void | sortBy (int propIdColumn, Qt::SortOrder sortorder) |
| virtual void | slotSelectAll (bool expandItems=false) |
| virtual void | slotRefresh () |
| virtual void | slotRelayoutIcons () |
| void | setPreviewSize (const QSize &size) |
| void | setAutoBackgroundItems (bool on) |
| void | setAutoBackgroundColor (const QColor &c) |
| void | setIconViewFlow (QListView::Flow flow) |
| Sets the icon view flow, see QListView::Flow. | |
| void | setGroupSubCategories (bool yesOrNo) |
| void | updateDisplay () |
Public Member Functions | |
| KLFLibDefaultView (QWidget *parent, ViewType viewtype=CategoryTreeView) | |
| virtual | ~KLFLibDefaultView () |
| virtual QUrl | url () const |
| virtual uint | compareUrlTo (const QUrl &other, uint interestFlags=0xFFFFFFFF) const |
| QSize | previewSize () const |
| bool | groupSubCategories () const |
| virtual bool | event (QEvent *e) |
| virtual bool | eventFilter (QObject *o, QEvent *e) |
| virtual KLFLibEntryList | selectedEntries () const |
| virtual QList< KLFLib::entryId > | selectedEntryIds () const |
| ViewType | viewType () const |
| virtual QList< QAction * > | addContextMenuActions (const QPoint &pos) |
| virtual QVariantMap | saveGuiState () const |
| virtual bool | restoreGuiState (const QVariantMap &state) |
| virtual QModelIndex | currentVisibleIndex () const |
| The first index that is currently visible in the current scrolling position. | |
| virtual QModelIndex | currentVisibleIndex (bool forward) const |
| The first (forward=TRUE) or last (forward=FALSE) currently visible index in scroll area. | |
| bool | autoBackgroundItems () const |
| QColor | autoBackgroundColor () const |
| QListView::Flow | iconViewFlow () const |
| virtual QStringList | getCategorySuggestions () |
| virtual KLFSearchable * | searchable () |
Protected Types | |
| enum | SelectAllFlags { ExpandItems = 0x01, NoSignals = 0x02 } |
Protected Slots | |
| void | slotViewSelectionChanged (const QItemSelection &selected, const QItemSelection &deselected) |
| virtual void | slotSelectAll (const QModelIndex &parent, uint selectFlags) |
| void | slotViewItemClicked (const QModelIndex &index) |
| void | slotEntryDoubleClicked (const QModelIndex &index) |
| void | slotShowColumnSenderAction (bool showCol) |
| void | slotResourceModelReset () |
| void | slotResourceDataChanged (const QModelIndex &topLeft, const QModelIndex &botRight) |
| void | slotPreviewSizeFromActionSender () |
| void | slotPreviewSizeActionsRefreshChecked () |
Protected Member Functions | |
| virtual void | updateResourceEngine () |
| virtual void | updateResourceProp (int propId) |
| virtual void | expandRootNice () |
| virtual void | updateResourceData (const QString &subRes, int modifyType, const QList< KLFLib::entryId > &entryIdList) |
| virtual void | updateResourceOwnData (const QList< KLFLib::entryId > &entryIdList) |
| virtual void | showEvent (QShowEvent *event) |
| KLF_DEBUG_DECLARE_REF_INSTANCE (QFileInfo(url().path()).fileName()+":"+(resourceEngine()?resourceEngine()->defaultSubResource():"[NULL]")+"|viewtype="+QString::number(pViewType)) | |
Properties | |
| bool | autoBackgroundItems |
| QColor | autoBackgroundColor |
| QListView::Flow | iconViewFlow |
| QSize | previewSize |
An implementation of the KLFAbstractLibView viwer to view library resource contents in so-called Category, List or Icon view modes.
Definition at line 753 of file klflibview.h.
enum KLFLibDefaultView::SelectAllFlags [protected] |
Definition at line 850 of file klflibview.h.
Definition at line 764 of file klflibview.h.
Definition at line 2981 of file klflibview.cpp.
References CategoryTreeView, KLFConfig::iconPreviewSizePercent, IconView, KLF_DEBUG_TIME_BLOCK, KLF_FUNC_NAME, klfconfig, klfDbg, KLFConfig::labelOutputFixedSize, KLFConfig::LibraryBrowser, KLFConfig::listPreviewSizePercent, ListTreeView, QAbstractItemView::setItemDelegate(), KLFLibViewDelegate::setPreviewSize(), KLFLibViewDelegate::setTheTreeView(), slotEntryDoubleClicked(), slotViewItemClicked(), KLFConfig::treePreviewSizePercent, and KLFConfig::UI.
| KLFLibDefaultView::~KLFLibDefaultView | ( | ) | [virtual] |
Definition at line 3061 of file klflibview.cpp.
Reimplemented from KLFAbstractLibView.
Definition at line 3202 of file klflibview.cpp.
References CategoryTreeView, IconView, and ListTreeView.
| QColor KLFLibDefaultView::autoBackgroundColor | ( | ) | const [inline] |
Definition at line 794 of file klflibview.h.
| bool KLFLibDefaultView::autoBackgroundItems | ( | ) | const [inline] |
Definition at line 793 of file klflibview.h.
| uint KLFLibDefaultView::compareUrlTo | ( | const QUrl & | other, |
| uint | interestFlags = 0xFFFFFFFF |
||
| ) | const [virtual] |
Implements KLFAbstractLibView.
Definition at line 3073 of file klflibview.cpp.
References KLFLibResourceEngine::compareDefaultSubResourceEquals(), KLFLibResourceEngine::compareUrlTo(), KLFLibResourceEngine::FeatureSubResources, QUrl::hasQueryItem(), klfDbg, klfFmtCC, KlfUrlCompareBaseEqual, KlfUrlCompareEqual, KlfUrlCompareLessSpecific, KlfUrlCompareMoreSpecific, QUrl::queryItemValue(), KLFAbstractLibView::resourceEngine(), and KLFLibResourceEngine::supportedFeatureFlags().
| virtual QModelIndex KLFLibDefaultView::currentVisibleIndex | ( | ) | const [inline, virtual] |
The first index that is currently visible in the current scrolling position.
Definition at line 789 of file klflibview.h.
References currentVisibleIndex().
Referenced by currentVisibleIndex(), and searchFind().
| QModelIndex KLFLibDefaultView::currentVisibleIndex | ( | bool | forward | ) | const [virtual] |
The first (forward=TRUE) or last (forward=FALSE) currently visible index in scroll area.
Definition at line 3246 of file klflibview.cpp.
References CategoryTreeView, KLFLibDefViewCommon::curVisibleIndex(), IconView, KLF_ASSERT_NOT_NULL, and ListTreeView.
| bool KLFLibDefaultView::event | ( | QEvent * | e | ) | [virtual] |
Reimplemented from QWidget.
Definition at line 3145 of file klflibview.cpp.
Definition at line 3149 of file klflibview.cpp.
References QKeyEvent::key(), klfDbg, QList::size(), QAction::trigger(), and QEvent::type().
| void KLFLibDefaultView::expandRootNice | ( | ) | [protected, virtual] |
Definition at line 3420 of file klflibview.cpp.
References CategoryTreeView, QTreeView::expand(), KLFLibModel::index(), KLF_DEBUG_TIME_BLOCK, KLF_FUNC_NAME, klfDbg, and KLFLibModel::rowCount().
Referenced by slotResourceModelReset(), and updateResourceEngine().
| QStringList KLFLibDefaultView::getCategorySuggestions | ( | ) | [virtual] |
Implements KLFAbstractLibView.
Definition at line 3496 of file klflibview.cpp.
References KLFLibModel::categoryList().
| bool KLFLibDefaultView::groupSubCategories | ( | ) | const [inline] |
Definition at line 773 of file klflibview.h.
| QListView::Flow KLFLibDefaultView::iconViewFlow | ( | ) | const |
| KLFLibDefaultView::KLF_DEBUG_DECLARE_REF_INSTANCE | ( | ) | [protected] |
| QSize KLFLibDefaultView::previewSize | ( | ) | const [inline] |
Definition at line 771 of file klflibview.h.
Referenced by saveGuiState().
| void KLFLibDefaultView::restore | ( | uint | restoreflags = KLFLib::RestoreLatexAndStyle | ) | [virtual, slot] |
Implements KLFAbstractLibView.
Definition at line 3546 of file klflibview.cpp.
References KLFLibModel::FullEntryItemRole, and KLFAbstractLibView::requestRestore().
| bool KLFLibDefaultView::restoreGuiState | ( | const QVariantMap & | state | ) | [virtual] |
Implements KLFAbstractLibView.
Definition at line 3230 of file klflibview.cpp.
References CategoryTreeView, QTreeView::header(), IconView, KLF_ASSERT_NOT_NULL, ListTreeView, and setPreviewSize().
| QVariantMap KLFLibDefaultView::saveGuiState | ( | ) | const [virtual] |
Implements KLFAbstractLibView.
Definition at line 3215 of file klflibview.cpp.
References CategoryTreeView, QTreeView::header(), IconView, KLF_ASSERT_NOT_NULL, ListTreeView, and previewSize().
| virtual KLFSearchable* KLFLibDefaultView::searchable | ( | ) | [inline, virtual] |
Reimplemented from KLFAbstractLibView.
Definition at line 800 of file klflibview.h.
| void KLFLibDefaultView::searchAbort | ( | ) | [virtual, slot] |
Implements KLFSearchable.
Definition at line 3756 of file klflibview.cpp.
References KLFLibModel::searchAbort(), KLFLibViewDelegate::setSearchIndex(), KLFLibViewDelegate::setSearchString(), and updateDisplay().
| bool KLFLibDefaultView::searchFind | ( | const QString & | queryString, |
| bool | forward = true |
||
| ) | [virtual, slot] |
Implements KLFSearchable.
Definition at line 3736 of file klflibview.cpp.
References currentVisibleIndex(), QModelIndex::isValid(), KLFLibModel::searchFind(), KLFLibViewDelegate::setSearchString(), and KLFLibModel::walkPrevIndex().
| bool KLFLibDefaultView::searchFindNext | ( | bool | forward | ) | [virtual, slot] |
Implements KLFSearchable.
Definition at line 3749 of file klflibview.cpp.
References QModelIndex::isValid(), and KLFLibModel::searchFindNext().
| KLFLibEntryList KLFLibDefaultView::selectedEntries | ( | ) | const [virtual] |
Implements KLFAbstractLibView.
Definition at line 3186 of file klflibview.cpp.
References KLFLibModel::EntryKind, KLFLibModel::FullEntryItemRole, KLFLibModel::ItemKindItemRole, klfDbg, KLFLibEntry::latex(), and KLFLibEntry::tags().
Referenced by slotSelectAll(), and slotViewSelectionChanged().
| QList< KLFLib::entryId > KLFLibDefaultView::selectedEntryIds | ( | ) | const [virtual] |
Implements KLFAbstractLibView.
Definition at line 3173 of file klflibview.cpp.
References QList::contains(), KLFLibModel::entryIdForIndexList(), QAbstractItemView::selectionModel(), and QList::size().
| bool KLFLibDefaultView::selectEntries | ( | const QList< KLFLib::entryId > & | idList | ) | [virtual, slot] |
Implements KLFAbstractLibView.
Definition at line 3525 of file klflibview.cpp.
References CategoryTreeView, KLFLibDefTreeView::ensureExpandedTo(), KLFLibModel::findEntryIdList(), klfDbg, and QAbstractItemView::selectionModel().
| void KLFLibDefaultView::setAutoBackgroundColor | ( | const QColor & | c | ) | [inline, slot] |
Definition at line 827 of file klflibview.h.
| void KLFLibDefaultView::setAutoBackgroundItems | ( | bool | on | ) | [inline, slot] |
Definition at line 826 of file klflibview.h.
| void KLFLibDefaultView::setGroupSubCategories | ( | bool | yesOrNo | ) | [inline, slot] |
Definition at line 836 of file klflibview.h.
Referenced by KLFLibBrowserViewContainer::openView(), and updateResourceEngine().
| void KLFLibDefaultView::setIconViewFlow | ( | QListView::Flow | flow | ) | [slot] |
Sets the icon view flow, see QListView::Flow.
Has no effect if our view type is not icon view.
Definition at line 3718 of file klflibview.cpp.
References IconView, and KLF_ASSERT_NOT_NULL.
| void KLFLibDefaultView::setPreviewSize | ( | const QSize & | size | ) | [inline, slot] |
Definition at line 824 of file klflibview.h.
Referenced by restoreGuiState().
| void KLFLibDefaultView::showColumns | ( | int | propIdColumn, |
| bool | show | ||
| ) | [virtual, slot] |
Definition at line 3559 of file klflibview.cpp.
References KLFLibModel::columnForEntryPropertyId(), KLFAbstractLibView::resourceEngine(), and url().
| void KLFLibDefaultView::showEvent | ( | QShowEvent * | event | ) | [protected, virtual] |
Reimplemented from QWidget.
Definition at line 3473 of file klflibview.cpp.
References KLFLibModel::setFetchBatchCount().
| void KLFLibDefaultView::slotEntryDoubleClicked | ( | const QModelIndex & | index | ) | [protected, slot] |
Definition at line 3886 of file klflibview.cpp.
References QModelIndex::data(), KLFLibModel::EntryKind, KLFLibModel::FullEntryItemRole, KLFLibModel::ItemKindItemRole, KLFAbstractLibView::requestRestore(), KLFLib::RestoreLatex, and KLFLib::RestoreStyle.
Referenced by KLFLibDefaultView().
| void KLFLibDefaultView::slotPreviewSizeActionsRefreshChecked | ( | ) | [protected, slot] |
Definition at line 3681 of file klflibview.cpp.
References QList::begin(), QAction::data(), QList::end(), KLF_ASSERT_NOT_NULL, KLF_DEBUG_BLOCK, KLF_FUNC_NAME, klfconfig, klfDbg, KLFConfig::labelOutputFixedSize, KLFLibViewDelegate::previewSize, QList::size(), KLFConfig::UI, and QSize::width().
Referenced by slotPreviewSizeFromActionSender(), and updateResourceEngine().
| void KLFLibDefaultView::slotPreviewSizeFromActionSender | ( | ) | [protected, slot] |
Definition at line 3669 of file klflibview.cpp.
References QAction::data(), KLF_ASSERT_NOT_NULL, KLF_DEBUG_BLOCK, KLF_FUNC_NAME, klfconfig, KLFConfig::labelOutputFixedSize, QAbstractItemView::reset(), KLFLibViewDelegate::setPreviewSize(), slotPreviewSizeActionsRefreshChecked(), and KLFConfig::UI.
Referenced by updateResourceEngine().
| void KLFLibDefaultView::slotRefresh | ( | ) | [virtual, slot] |
Definition at line 3663 of file klflibview.cpp.
References KLFLibModel::completeRefresh(), KLF_DEBUG_BLOCK, and KLF_FUNC_NAME.
Referenced by updateResourceEngine().
| void KLFLibDefaultView::slotRelayoutIcons | ( | ) | [virtual, slot] |
Definition at line 3708 of file klflibview.cpp.
References KLFLibDefListView::forceRelayout(), and IconView.
Referenced by updateResourceEngine().
| void KLFLibDefaultView::slotResourceDataChanged | ( | const QModelIndex & | topLeft, |
| const QModelIndex & | botRight | ||
| ) | [protected, slot] |
Definition at line 3810 of file klflibview.cpp.
References KLFLibModel::entryIdForIndexList(), QItemSelectionRange::indexes(), and KLFAbstractLibView::resourceDataChanged().
Referenced by updateResourceEngine().
| void KLFLibDefaultView::slotResourceModelReset | ( | ) | [protected, slot] |
Definition at line 3803 of file klflibview.cpp.
References CategoryTreeView, and expandRootNice().
Referenced by updateResourceEngine().
| void KLFLibDefaultView::slotSelectAll | ( | const QModelIndex & | parent, |
| uint | selectFlags | ||
| ) | [protected, virtual, slot] |
Selects all children of parent (by default a QModelIndex(), so this function selects all items).
selectFlags is an OR'ed combination of SelectAllFlags. If ExpandItems is set then all items in the view are expanded (no effect if the view is not a tree view).
Definition at line 3594 of file klflibview.cpp.
References KLFAbstractLibView::entriesSelected(), NoSignals, selectedEntries(), QAbstractItemView::selectionModel(), KLFDelayedPleaseWaitPopup::setDelay(), KLFPleaseWaitPopup::setDisableUi(), QTime::start(), and updateDisplay().
| void KLFLibDefaultView::slotSelectAll | ( | bool | expandItems = false | ) | [virtual, slot] |
Selects all items in the view, fetching all necessary items (this can be slow). If expandItems is TRUE, then all items in this view (category labels) are expanded (no effect if this view is not a tree view).
Definition at line 3589 of file klflibview.cpp.
References ExpandItems, NoSignals, and updateDisplay().
Referenced by KLFLibDefTreeView::selectAll(), slotViewItemClicked(), and updateResourceEngine().
| void KLFLibDefaultView::slotShowColumnSenderAction | ( | bool | showCol | ) | [protected, slot] |
Definition at line 3903 of file klflibview.cpp.
References QObject::property().
Referenced by updateResourceEngine().
| void KLFLibDefaultView::slotViewItemClicked | ( | const QModelIndex & | index | ) | [protected, slot] |
Definition at line 3868 of file klflibview.cpp.
References QModelIndex::column(), KLF_DEBUG_TIME_BLOCK, KLF_FUNC_NAME, and slotSelectAll().
Referenced by KLFLibDefaultView().
| void KLFLibDefaultView::slotViewSelectionChanged | ( | const QItemSelection & | selected, |
| const QItemSelection & | deselected | ||
| ) | [protected, slot] |
Definition at line 3791 of file klflibview.cpp.
References KLFAbstractLibView::entriesSelected(), selectedEntries(), and updateDisplay().
Referenced by updateResourceEngine().
| void KLFLibDefaultView::sortBy | ( | int | propIdColumn, |
| Qt::SortOrder | sortorder | ||
| ) | [virtual, slot] |
Definition at line 3570 of file klflibview.cpp.
References KLFLibModel::columnCount(), KLFLibModel::columnForEntryPropertyId(), KLFAbstractLibView::resourceEngine(), QTreeView::sortByColumn(), and url().
| void KLFLibDefaultView::updateDisplay | ( | ) | [slot] |
Definition at line 3730 of file klflibview.cpp.
References KLF_ASSERT_NOT_NULL, and QAbstractItemView::update().
Referenced by searchAbort(), slotSelectAll(), and slotViewSelectionChanged().
| void KLFLibDefaultView::updateResourceData | ( | const QString & | subRes, |
| int | modifyType, | ||
| const QList< KLFLib::entryId > & | entryIdList | ||
| ) | [protected, virtual] |
Implements KLFAbstractLibView.
Definition at line 3444 of file klflibview.cpp.
References KLF_ASSERT_NOT_NULL, klfDbg, KLFAbstractLibView::resourceEngine(), KLFLibModel::updateData(), and updateResourceOwnData().
| void KLFLibDefaultView::updateResourceEngine | ( | ) | [protected, virtual] |
Implements KLFAbstractLibView.
Definition at line 3272 of file klflibview.cpp.
References QMenu::addAction(), KLFLibEntry::Category, KLFLibModel::CategoryTree, CategoryTreeView, QList::clear(), QTreeView::columnWidth(), KLFLibEntry::DateTime, expandRootNice(), KLFLibModel::GroupSubCategories, KLFConfig::groupSubCategories, IconView, QTreeView::isColumnHidden(), KLF_DEBUG_ASSIGN_SAME_REF_INSTANCE, KLF_DEBUG_TIME_BLOCK, KLF_FUNC_NAME, klfconfig, klfDbg, klfFmtCC, KLFLibEntry::Latex, KLFConfig::LibraryBrowser, KLFLibModel::LinearList, ListTreeView, KLFAbstractLibView::operationStartReportingProgress(), KLFLibEntry::Preview, QTreeView::resizeColumnToContents(), KLFAbstractLibView::resourceEngine(), QAbstractItemView::selectionModel(), QTreeView::setColumnHidden(), QTreeView::setColumnWidth(), QAction::setData(), setGroupSubCategories(), QAction::setMenu(), QAbstractItemView::setModel(), KLFLibViewDelegate::setSelectionModel(), QList::size(), slotPreviewSizeActionsRefreshChecked(), slotPreviewSizeFromActionSender(), slotRefresh(), slotRelayoutIcons(), slotResourceDataChanged(), slotResourceModelReset(), slotSelectAll(), slotShowColumnSenderAction(), slotViewSelectionChanged(), KLFLibEntry::Tags, updateResourceOwnData(), updateResourceProp(), and KLFAbstractLibView::wantMoreCategorySuggestions().
| void KLFLibDefaultView::updateResourceOwnData | ( | const QList< KLFLib::entryId > & | entryIdList | ) | [protected, virtual] |
Definition at line 3456 of file klflibview.cpp.
References IconView, KLF_FUNC_NAME, and klfDbg.
Referenced by updateResourceData(), and updateResourceEngine().
| void KLFLibDefaultView::updateResourceProp | ( | int | propId | ) | [protected, virtual] |
Implements KLFAbstractLibView.
Definition at line 3464 of file klflibview.cpp.
References KLF_ASSERT_NOT_NULL, klfDbg, and KLFAbstractLibView::resourceEngine().
Referenced by updateResourceEngine().
| QUrl KLFLibDefaultView::url | ( | ) | const [virtual] |
Implements KLFAbstractLibView.
Definition at line 3065 of file klflibview.cpp.
References KLF_DEBUG_BLOCK, KLF_FUNC_NAME, and KLFLibModel::url().
Referenced by showColumns(), and sortBy().
| ViewType KLFLibDefaultView::viewType | ( | ) | const [inline] |
Definition at line 781 of file klflibview.h.
QColor KLFLibDefaultView::autoBackgroundColor [read, write] |
Definition at line 756 of file klflibview.h.
bool KLFLibDefaultView::autoBackgroundItems [read, write] |
Definition at line 756 of file klflibview.h.
QListView::Flow KLFLibDefaultView::iconViewFlow [read, write] |
Definition at line 757 of file klflibview.h.
QSize KLFLibDefaultView::previewSize [read, write] |
Definition at line 759 of file klflibview.h.