[KLF Application][KLF Tools][KLF Backend][KLF Home]
KLatexFormula Project
Public Types | Public Slots | Public Member Functions | Protected Types | Protected Slots | Protected Member Functions | Properties

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::entryIdselectedEntryIds () 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.
bool autoBackgroundItems () const
QColor autoBackgroundColor () const
QListView::Flow iconViewFlow () const
virtual QStringList getCategorySuggestions ()
virtual KLFSearchablesearchable ()

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 slotResourceDataChanged (const QModelIndex &topLeft, const QModelIndex &botRight)
void slotPreviewSizeFromActionSender ()
void slotPreviewSizeActionsRefreshChecked ()

Protected Member Functions

virtual void updateResourceEngine ()
virtual void updateResourceProp (int propId)
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:
ExpandItems 
NoSignals 

Definition at line 847 of file klflibview.h.

Enumerator:
CategoryTreeView 
ListTreeView 
IconView 

Definition at line 764 of file klflibview.h.


Constructor & Destructor Documentation

KLFLibDefaultView::KLFLibDefaultView ( QWidget parent,
ViewType  viewtype = CategoryTreeView 
)
KLFLibDefaultView::~KLFLibDefaultView ( ) [virtual]

Definition at line 3062 of file klflibview.cpp.


Member Function Documentation

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

Reimplemented from KLFAbstractLibView.

Definition at line 3203 of file klflibview.cpp.

References CategoryTreeView, IconView, and ListTreeView.

QColor KLFLibDefaultView::autoBackgroundColor ( ) const [inline]

Definition at line 792 of file klflibview.h.

bool KLFLibDefaultView::autoBackgroundItems ( ) const [inline]

Definition at line 791 of file klflibview.h.

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

The first index that is currently visible in the current scrolling position.

Definition at line 3247 of file klflibview.cpp.

References CategoryTreeView, KLFLibDefViewCommon::curVisibleIndex(), IconView, KLF_ASSERT_NOT_NULL, and ListTreeView.

Referenced by searchFind().

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

Reimplemented from QWidget.

Definition at line 3146 of file klflibview.cpp.

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

Implements KLFAbstractLibView.

Definition at line 3477 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]
bool KLFLibDefaultView::restoreGuiState ( const QVariantMap &  state) [virtual]
QVariantMap KLFLibDefaultView::saveGuiState ( ) const [virtual]
virtual KLFSearchable* KLFLibDefaultView::searchable ( ) [inline, virtual]

Reimplemented from KLFAbstractLibView.

Definition at line 798 of file klflibview.h.

void KLFLibDefaultView::searchAbort ( ) [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 3730 of file klflibview.cpp.

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

KLFLibEntryList KLFLibDefaultView::selectedEntries ( ) const [virtual]
QList< KLFLib::entryId > KLFLibDefaultView::selectedEntryIds ( ) const [virtual]
bool KLFLibDefaultView::selectEntries ( const QList< KLFLib::entryId > &  idList) [virtual, slot]
void KLFLibDefaultView::setAutoBackgroundColor ( const QColor c) [inline, slot]

Definition at line 825 of file klflibview.h.

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

Definition at line 824 of file klflibview.h.

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 834 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 3699 of file klflibview.cpp.

References IconView, and KLF_ASSERT_NOT_NULL.

void KLFLibDefaultView::setPreviewSize ( const QSize size) [inline, slot]

Definition at line 822 of file klflibview.h.

Referenced by restoreGuiState().

void KLFLibDefaultView::showColumns ( int  propIdColumn,
bool  show 
) [virtual, slot]
void KLFLibDefaultView::showEvent ( QShowEvent event) [protected, virtual]

Reimplemented from QWidget.

Definition at line 3455 of file klflibview.cpp.

References KLFLibModel::setFetchBatchCount().

void KLFLibDefaultView::slotEntryDoubleClicked ( const QModelIndex index) [protected, slot]
void KLFLibDefaultView::slotPreviewSizeActionsRefreshChecked ( ) [protected, slot]
void KLFLibDefaultView::slotPreviewSizeFromActionSender ( ) [protected, slot]
void KLFLibDefaultView::slotRefresh ( ) [virtual, slot]

Definition at line 3644 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 3689 of file klflibview.cpp.

References KLFLibDefListView::forceRelayout(), and IconView.

Referenced by updateResourceEngine().

void KLFLibDefaultView::slotResourceDataChanged ( const QModelIndex topLeft,
const QModelIndex botRight 
) [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 3575 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 3570 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 3877 of file klflibview.cpp.

References QObject::property().

Referenced by updateResourceEngine().

void KLFLibDefaultView::slotViewItemClicked ( const QModelIndex index) [protected, slot]
void KLFLibDefaultView::slotViewSelectionChanged ( const QItemSelection selected,
const QItemSelection deselected 
) [protected, slot]
void KLFLibDefaultView::sortBy ( int  propIdColumn,
Qt::SortOrder  sortorder 
) [virtual, slot]
void KLFLibDefaultView::updateDisplay ( ) [slot]
void KLFLibDefaultView::updateResourceData ( const QString subRes,
int  modifyType,
const QList< KLFLib::entryId > &  entryIdList 
) [protected, virtual]
void KLFLibDefaultView::updateResourceEngine ( ) [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 3438 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 3446 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 3066 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.


Property Documentation

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.


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

Generated by doxygen 1.7.3