[KLF Application][KLF Tools][KLF Backend][KLF Home]
KLatexFormula Project

KLFLibDefaultView Class Reference

#include <klflibview.h>

Inheritance diagram for KLFLibDefaultView:

Inheritance graph
[legend]
Collaboration diagram for KLFLibDefaultView:

Collaboration graph
[legend]

List of all members.

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


Detailed Description

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.


Member Enumeration Documentation

Enumerator:
CategoryTreeView 
ListTreeView 
IconView 

Definition at line 764 of file klflibview.h.

Enumerator:
ExpandItems 
NoSignals 

Definition at line 850 of file klflibview.h.


Constructor & Destructor Documentation

KLFLibDefaultView::KLFLibDefaultView ( QWidget *  parent,
ViewType  viewtype = CategoryTreeView 
)

KLFLibDefaultView::~KLFLibDefaultView (  )  [virtual]

Definition at line 3061 of file klflibview.cpp.


Member Function Documentation

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().

uint KLFLibDefaultView::compareUrlTo ( const QUrl &  other,
uint  interestFlags = 0xFFFFFFFF 
) const [virtual]

QSize KLFLibDefaultView::previewSize (  )  const [inline]

Definition at line 771 of file klflibview.h.

Referenced by saveGuiState().

bool KLFLibDefaultView::groupSubCategories (  )  const [inline]

Definition at line 773 of file klflibview.h.

bool KLFLibDefaultView::event ( QEvent *  e  )  [virtual]

Reimplemented from QWidget.

Definition at line 3145 of file klflibview.cpp.

References QWidget::event().

bool KLFLibDefaultView::eventFilter ( QObject *  o,
QEvent *  e 
) [virtual]

KLFLibEntryList KLFLibDefaultView::selectedEntries (  )  const [virtual]

QList< KLFLib::entryId > KLFLibDefaultView::selectedEntryIds (  )  const [virtual]

ViewType KLFLibDefaultView::viewType (  )  const [inline]

Definition at line 781 of file klflibview.h.

QList< QAction * > KLFLibDefaultView::addContextMenuActions ( const QPoint &  pos  )  [virtual]

Reimplemented from KLFAbstractLibView.

Definition at line 3202 of file klflibview.cpp.

References CategoryTreeView, IconView, and ListTreeView.

QVariantMap KLFLibDefaultView::saveGuiState (  )  const [virtual]

bool KLFLibDefaultView::restoreGuiState ( const QVariantMap &  state  )  [virtual]

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.

Referenced by 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::autoBackgroundItems (  )  const [inline]

Definition at line 793 of file klflibview.h.

QColor KLFLibDefaultView::autoBackgroundColor (  )  const [inline]

Definition at line 794 of file klflibview.h.

QListView::Flow KLFLibDefaultView::iconViewFlow (  )  const

QStringList KLFLibDefaultView::getCategorySuggestions (  )  [virtual]

Implements KLFAbstractLibView.

Definition at line 3496 of file klflibview.cpp.

References KLFLibModel::categoryList().

virtual KLFSearchable* KLFLibDefaultView::searchable (  )  [inline, virtual]

Reimplemented from KLFAbstractLibView.

Definition at line 800 of file klflibview.h.

bool KLFLibDefaultView::selectEntries ( const QList< KLFLib::entryId > &  idList  )  [virtual, slot]

bool KLFLibDefaultView::searchFind ( const QString &  queryString,
bool  forward = true 
) [virtual, slot]

bool KLFLibDefaultView::searchFindNext ( bool  forward  )  [virtual, slot]

Implements KLFSearchable.

Definition at line 3749 of file klflibview.cpp.

References QModelIndex::isValid(), and KLFLibModel::searchFindNext().

void KLFLibDefaultView::searchAbort (  )  [virtual, slot]

void KLFLibDefaultView::restore ( uint  restoreflags = KLFLib::RestoreLatexAndStyle  )  [virtual, slot]

void KLFLibDefaultView::showColumns ( int  propIdColumn,
bool  show 
) [virtual, slot]

void KLFLibDefaultView::sortBy ( int  propIdColumn,
Qt::SortOrder  sortorder 
) [virtual, slot]

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::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::setPreviewSize ( const QSize &  size  )  [inline, slot]

Definition at line 824 of file klflibview.h.

Referenced by restoreGuiState().

void KLFLibDefaultView::setAutoBackgroundItems ( bool  on  )  [inline, slot]

Definition at line 826 of file klflibview.h.

void KLFLibDefaultView::setAutoBackgroundColor ( const QColor &  c  )  [inline, slot]

Definition at line 827 of file klflibview.h.

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::setGroupSubCategories ( bool  yesOrNo  )  [inline, slot]

Warning:
This function takes effect upon the next change of resource engine, ie the next call of KLFAbstractLibView::setResourceEngine()

Definition at line 836 of file klflibview.h.

Referenced by KLFLibBrowserViewContainer::openView(), and updateResourceEngine().

void KLFLibDefaultView::updateDisplay (  )  [slot]

void KLFLibDefaultView::updateResourceEngine (  )  [protected, virtual]

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().

void KLFLibDefaultView::expandRootNice (  )  [protected, virtual]

void KLFLibDefaultView::updateResourceData ( const QString &  subRes,
int  modifyType,
const QList< KLFLib::entryId > &  entryIdList 
) [protected, virtual]

void KLFLibDefaultView::updateResourceOwnData ( const QList< KLFLib::entryId > &  entryIdList  )  [protected, virtual]

Todo:
..................... OPTIMIZE THIS FUNCTION not to do a full refresh

Definition at line 3456 of file klflibview.cpp.

References IconView, KLF_FUNC_NAME, and klfDbg.

Referenced by updateResourceData(), and updateResourceEngine().

void KLFLibDefaultView::showEvent ( QShowEvent *  event  )  [protected, virtual]

Reimplemented from QWidget.

Definition at line 3473 of file klflibview.cpp.

References KLFLibModel::setFetchBatchCount(), and QWidget::showEvent().

void KLFLibDefaultView::slotViewSelectionChanged ( const QItemSelection &  selected,
const QItemSelection &  deselected 
) [protected, slot]

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::slotViewItemClicked ( const QModelIndex &  index  )  [protected, slot]

void KLFLibDefaultView::slotEntryDoubleClicked ( const QModelIndex &  index  )  [protected, slot]

void KLFLibDefaultView::slotShowColumnSenderAction ( bool  showCol  )  [protected, slot]

Definition at line 3903 of file klflibview.cpp.

References QObject::property().

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::slotResourceDataChanged ( const QModelIndex &  topLeft,
const QModelIndex &  botRight 
) [protected, slot]

void KLFLibDefaultView::slotPreviewSizeFromActionSender (  )  [protected, slot]

void KLFLibDefaultView::slotPreviewSizeActionsRefreshChecked (  )  [protected, slot]

KLFLibDefaultView::KLF_DEBUG_DECLARE_REF_INSTANCE (  )  [protected]


Property Documentation

bool KLFLibDefaultView::autoBackgroundItems [read, write]

Definition at line 756 of file klflibview.h.

QColor KLFLibDefaultView::autoBackgroundColor [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.


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

Generated by doxygen 1.5.6