libkonq Library API Documentation

KonqDirPart Class Reference

List of all members.

Public Slots

bool openURL (const KURL &)
void slotFindClosed ()
void slotStartAnimationSearching ()
void slotStopAnimationSearching ()
void slotBackgroundSettings ()
void slotClipboardDataChanged ()
void slotIncIconSize ()
void slotDecIconSize ()
void slotIconSizeToggled (bool)
virtual void slotStarted ()=0
virtual void slotCanceled ()=0
virtual void slotCompleted ()=0
virtual void slotNewItems (const KFileItemList &)=0
virtual void slotDeleteItem (KFileItem *)=0
virtual void slotRefreshItems (const KFileItemList &)=0
virtual void slotClear ()=0
virtual void slotRedirection (const KURL &)=0

Signals

void aboutToOpenURL ()
void findOpen (KonqDirPart *)
void findOpened (KonqDirPart *)
void findClosed (KonqDirPart *)
void itemsAdded (const KFileItemList &)
void itemRemoved (const KFileItem *)
void itemsFilteredByMime (const KFileItemList &)

Public Member Functions

 KonqDirPart (QObject *parent, const char *name)
virtual ~KonqDirPart ()
void setBrowserExtension (KonqDirPartBrowserExtension *extension)
KonqDirPartBrowserExtensionextension ()
void setDirLister (KDirLister *lister)
QScrollViewscrollWidget ()
virtual void saveState (QDataStream &stream)
virtual void restoreState (QDataStream &stream)
void lmbClicked (KFileItem *fileItem)
void mmbClicked (KFileItem *fileItem)
void setNameFilter (const QString &nameFilter)
QString nameFilter () const
void setFilesToSelect (const QStringList &filesToSelect)
void setMimeFilter (const QStringList &filters)
QStringList mimeFilter () const
KonqPropsViewprops () const
virtual void disableIcons (const KURL::List &lst)=0
void resetCount ()
void newItems (const KFileItemList &entries)
void deleteItem (KFileItem *fileItem)
void emitTotalCount ()
void emitCounts (const KFileItemList &lst, bool selectionChanged)
void emitCounts (const KFileItemList &lst)
void emitMouseOver (const KFileItem *item)
void updatePasteAction ()
virtual void newIconSize (int size)
void setIconSize (int size)
void setFindPart (KParts::ReadOnlyPart *part)
KParts::ReadOnlyPart * findPart () const
virtual const KFileItem * currentItem ()=0
virtual KFileItemList selectedFileItems ()
bool closeURL ()

Protected Member Functions

virtual bool doOpenURL (const KURL &)=0
virtual bool doCloseURL ()=0

Protected Attributes

QString m_nameFilter
QStringList m_filesToSelect
KonqPropsViewm_pProps
KAction * m_paIncIconSize
KAction * m_paDecIconSize
KToggleAction * m_paDefaultIcons
KToggleAction * m_paHugeIcons
KToggleAction * m_paLargeIcons
KToggleAction * m_paMediumIcons
KToggleAction * m_paSmallIcons
KParts::ReadOnlyPart * m_findPart
KonqDirPartBrowserExtensionm_extension
int m_iIconSize [5]
KIO::filesize_t m_lDirSize
uint m_lFileCount
uint m_lDirCount

Friends

class KonqDirPartBrowserExtension

Detailed Description

Definition at line 39 of file konq_dirpart.h.


Member Function Documentation

void KonqDirPart::setBrowserExtension KonqDirPartBrowserExtension extension  )  [inline]
 

The derived part should call this in its constructor.

Definition at line 53 of file konq_dirpart.h.

void KonqDirPart::setDirLister KDirLister *  lister  ) 
 

The derived part should call this in its constructor.

Definition at line 738 of file konq_dirpart.cc.

void KonqDirPart::lmbClicked KFileItem *  fileItem  ) 
 

Called when LMB'ing an item in a directory view.

Parameters:
fileItem must be set
widget is only set as parent pointer for dialog boxes

Definition at line 299 of file konq_dirpart.cc.

References QFile::exists(), m_extension, and KonqFMSettings::settings().

void KonqDirPart::mmbClicked KFileItem *  fileItem  ) 
 

Called when MMB'ing an item in a directory view.

Parameters:
fileItem if 0 it means we MMB'ed the background.

Definition at line 347 of file konq_dirpart.cc.

References m_extension.

void KonqDirPart::setMimeFilter const QStringList filters  ) 
 

Sets per directory mime-type based filtering.

This method causes only the items matching the mime-type given by filters to be displayed. You can supply multiple mime-types by separating them with a space, eg. "text/plain image/x-png". To clear all the filters set for the current url simply call this function with a null or empty argument.

NOTE: the filter(s) specified here only apply to the current directory as returned by url().

Parameters:
filter mime-type(s) to filter directory by.

Definition at line 254 of file konq_dirpart.cc.

References QString::isEmpty().

QStringList KonqDirPart::mimeFilter  )  const
 

Completely clears the internally stored list of mime filters set by call to setMimeFilter.

Definition at line 267 of file konq_dirpart.cc.

virtual void KonqDirPart::disableIcons const KURL::List &  lst  )  [pure virtual]
 

"Cut" icons : disable those whose URL is in lst, enable the others

Referenced by slotClipboardDataChanged().

void KonqDirPart::resetCount  ) 
 

This class takes care of the counting of items, size etc.

in the current directory. Call this in slotClear.

Definition at line 730 of file konq_dirpart.cc.

References m_lDirCount, m_lDirSize, and m_lFileCount.

Referenced by KonqDirPart().

void KonqDirPart::newItems const KFileItemList entries  ) 
 

Update the counts for those new items.

Definition at line 437 of file konq_dirpart.cc.

References emitTotalCount(), itemsAdded(), and m_findPart.

Referenced by setFindPart().

void KonqDirPart::deleteItem KFileItem *  fileItem  ) 
 

Update the counts with this item being deleted.

Definition at line 446 of file konq_dirpart.cc.

References itemRemoved().

void KonqDirPart::emitTotalCount  ) 
 

Show the counts for the directory in the status bar.

Definition at line 452 of file konq_dirpart.cc.

References QVariant::isValid(), m_findPart, m_lDirCount, m_lDirSize, m_lFileCount, and QVariant::toBool().

Referenced by emitCounts(), and newItems().

void KonqDirPart::emitCounts const KFileItemList lst,
bool  selectionChanged
 

Show the counts for the list of items in the status bar.

If none are provided emitTotalCount() is called to display the counts for the whole directory. However, that does not work for a treeview.

Deprecated:

Definition at line 519 of file konq_dirpart.cc.

References QPtrList::count(), emitTotalCount(), and m_extension.

void KonqDirPart::emitCounts const KFileItemList lst  ) 
 

Show the counts for the list of items in the status bar.

The list can be empty.

Parameters:
lst the list of fileitems for which to display the counts
Since:
3.4

Definition at line 491 of file konq_dirpart.cc.

References QPtrList::count().

void KonqDirPart::updatePasteAction  ) 
 

Enables or disables the paste action.

This depends both on the data in the clipboard and the number of files selected (pasting is only possible if not more than one file is selected).

Definition at line 429 of file konq_dirpart.cc.

References QApplication::clipboard(), QMimeSource::format(), and m_extension.

Referenced by slotClipboardDataChanged().

void KonqDirPart::newIconSize int  size  )  [virtual]
 

Change the icon size of the view.

The view should call it initially. The view should also reimplement it, to update the icons.

Definition at line 601 of file konq_dirpart.cc.

References m_paDecIconSize, m_paDefaultIcons, m_paHugeIcons, m_paIncIconSize, m_paLargeIcons, m_paMediumIcons, and m_paSmallIcons.

Referenced by setIconSize().

void KonqDirPart::setIconSize int  size  ) 
 

This is called by the actions that change the icon size.

It stores the new size and calls newIconSize.

Definition at line 617 of file konq_dirpart.cc.

References m_pProps, newIconSize(), and KonqPropsView::setIconSize().

Referenced by slotDecIconSize(), slotIconSizeToggled(), and slotIncIconSize().

void KonqDirPart::setFindPart KParts::ReadOnlyPart *  part  ) 
 

This is called by konqueror itself, when the "find" functionality is activated.

Definition at line 646 of file konq_dirpart.cc.

References findClosed(), findOpened(), m_findPart, newItems(), slotFindClosed(), slotStartAnimationSearching(), and slotStopAnimationSearching().

bool KonqDirPart::closeURL  ) 
 

Re-implemented for internal reasons.

API is unaffected. All inheriting classes should re-implement doCloseURL() instead instead of this one.

Definition at line 624 of file konq_dirpart.cc.

void KonqDirPart::aboutToOpenURL  )  [signal]
 

Emitted whenever the current URL is about to be changed.

Referenced by openURL().

void KonqDirPart::findOpen KonqDirPart  )  [signal]
 

We emit this if we want a find part to be created for us.

This happens when restoring from history

void KonqDirPart::findOpened KonqDirPart  )  [signal]
 

We emit this _after_ a find part has been created for us.

This also happens initially.

Referenced by setFindPart().

void KonqDirPart::findClosed KonqDirPart  )  [signal]
 

We emit this to ask konq to close the find part.

Referenced by openURL(), setFindPart(), and slotFindClosed().

void KonqDirPart::itemsAdded const KFileItemList  )  [signal]
 

Emitted as the part is updated with new items.

Useful for informing plugins of changes in view.

Referenced by newItems().

void KonqDirPart::itemRemoved const KFileItem *   )  [signal]
 

Emitted as the part is updated with these items.

Useful for informing plugins of changes in view.

Referenced by deleteItem().

void KonqDirPart::itemsFilteredByMime const KFileItemList  )  [signal]
 

Emitted with the list of filtered-out items whenever a mime-based filter(s) is set.

bool KonqDirPart::openURL const KURL &   )  [slot]
 

Re-implemented for internal reasons.

API is unaffected. All inheriting classes should re-implement doOpenURL() instead instead of this one.

Definition at line 630 of file konq_dirpart.cc.

References aboutToOpenURL(), doOpenURL(), findClosed(), and m_findPart.

Referenced by slotFindClosed().

void KonqDirPart::slotFindClosed  )  [slot]
 

This is called either by the part's close button, or by the dir part itself, if entering a directory.

It deletes the find part.

Definition at line 676 of file konq_dirpart.cc.

References findClosed(), m_findPart, and openURL().

Referenced by setFindPart().

void KonqDirPart::slotStartAnimationSearching  )  [slot]
 

Start the animated "K" during kfindpart's file search.

Definition at line 692 of file konq_dirpart.cc.

Referenced by setFindPart().

void KonqDirPart::slotStopAnimationSearching  )  [slot]
 

Start the animated "K" during kfindpart's file search.

Definition at line 697 of file konq_dirpart.cc.

Referenced by setFindPart().

void KonqDirPart::slotClipboardDataChanged  )  [slot]
 

Called when the clipboard's data changes, to update the 'cut' icons Call this when the directory's listing is finished, to draw icons as cut.

Definition at line 414 of file konq_dirpart.cc.

References QApplication::clipboard(), KonqDrag::decodeIsCutSelection(), disableIcons(), QMimeSource::provides(), and updatePasteAction().

Referenced by KonqDirPart().

virtual bool KonqDirPart::doOpenURL const KURL &   )  [protected, pure virtual]
 

Invoked from openURL to enable childern classes to handle open URL requests.

Referenced by openURL().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for libkonq Library Version 3.4.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Jun 13 19:27:50 2006 by doxygen 1.4.3 written by Dimitri van Heesch, © 1997-2003