• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeio/tdefile
 

tdeio/tdefile

Signals | Public Member Functions | Protected Slots | Protected Member Functions | List of all members
KFilePreview Class Reference

#include <tdefilepreview.h>

Inheritance diagram for KFilePreview:
KFileView

Signals

void showPreview (const KURL &)
 
void clearPreview ()
 

Public Member Functions

 KFilePreview (TQWidget *parent, const char *name)
 
 KFilePreview (KFileView *view, TQWidget *parent, const char *name)
 
virtual TQWidget * widget ()
 
virtual void clearView ()
 
void setFileView (KFileView *view)
 
KFileView * fileView () const
 
virtual void updateView (bool)
 
virtual void updateView (const KFileItem *)
 
virtual void removeItem (const KFileItem *)
 
virtual void listingCompleted ()
 
virtual void setSelectionMode (KFile::SelectionMode sm)
 
virtual void setSelected (const KFileItem *, bool)
 
virtual bool isSelected (const KFileItem *) const
 
virtual void clearSelection ()
 
virtual void selectAll ()
 
virtual void invertSelection ()
 
virtual void insertItem (KFileItem *)
 
virtual void clear ()
 
virtual void setCurrentItem (const KFileItem *)
 
virtual KFileItem * currentFileItem () const
 
virtual KFileItem * firstFileItem () const
 
virtual KFileItem * nextItem (const KFileItem *) const
 
virtual KFileItem * prevItem (const KFileItem *) const
 
virtual void setSorting (TQDir::SortSpec sort)
 
virtual void readConfig (TDEConfig *, const TQString &group=TQString::null)
 
virtual void writeConfig (TDEConfig *, const TQString &group=TQString::null)
 
virtual TDEActionCollection * actionCollection () const
 
void ensureItemVisible (const KFileItem *)
 
void setPreviewWidget (const TQWidget *w, const KURL &u)
 
- Public Member Functions inherited from KFileView
virtual ~KFileView ()
 
void addItemList (const KFileItemList &list)
 
virtual TQWidget * widget ()=0
 
TQWidget * widget () const
 
void setCurrentItem (const TQString &filename)
 
virtual void setCurrentItem (const KFileItem *item)=0
 
virtual KFileItem * currentFileItem () const =0
 
virtual void clear ()
 
virtual void updateView (bool f=true)
 
virtual void updateView (const KFileItem *)
 
virtual void removeItem (const KFileItem *item)
 
virtual void listingCompleted ()
 
TQDir::SortSpec sorting () const
 
virtual void setSorting (TQDir::SortSpec sort)
 
bool isReversed () const
 
void sortReversed ()
 
uint count () const
 
uint numFiles () const
 
uint numDirs () const
 
virtual void setSelectionMode (KFile::SelectionMode sm)
 
virtual KFile::SelectionMode selectionMode () const
 
virtual void setViewMode (ViewMode vm)
 
virtual ViewMode viewMode () const
 
TQString viewName () const
 
void setViewName (const TQString &name)
 
virtual void setParentView (KFileView *parent)
 
virtual void insertItem (KFileItem *i)
 
virtual void clearView ()=0
 
virtual void ensureItemVisible (const KFileItem *i)=0
 
virtual void clearSelection ()=0
 
virtual void selectAll ()
 
virtual void invertSelection ()
 
virtual void setSelected (const KFileItem *, bool enable)=0
 
virtual bool isSelected (const KFileItem *) const =0
 
const KFileItemList * selectedItems () const
 
const KFileItemList * items () const
 
virtual KFileItem * firstFileItem () const =0
 
virtual KFileItem * nextItem (const KFileItem *) const =0
 
virtual KFileItem * prevItem (const KFileItem *) const =0
 
void setOnlyDoubleClickSelectsFiles (bool enable)
 
bool onlyDoubleClickSelectsFiles () const
 
bool updateNumbers (const KFileItem *i)
 
virtual TDEActionCollection * actionCollection () const
 
KFileViewSignaler * signaler () const
 
virtual void readConfig (TDEConfig *, const TQString &group=TQString::null)
 
virtual void writeConfig (TDEConfig *, const TQString &group=TQString::null)
 
void setDropOptions (int options)
 
int dropOptions ()
 

Protected Slots

virtual void slotHighlighted (const KFileItem *)
 

Protected Member Functions

virtual void virtual_hook (int id, void *data)
 
- Protected Member Functions inherited from KFileView
virtual void virtual_hook (int id, void *data)
 
void setDropOptions_impl (int options)
 

Additional Inherited Members

- Public Types inherited from KFileView
enum  ViewMode { Files = 1 , Directories = 2 , All = Files | Directories }
 
enum  DropOptions { AutoOpenDirs = 1 }
 
- Static Public Member Functions inherited from KFileView
static TQString sortingKey (const TQString &value, bool isDir, int sortSpec)
 
static TQString sortingKey (TDEIO::filesize_t value, bool isDir, int sortSpec)
 
static int autoOpenDelay ()
 
- Protected Types inherited from KFileView
enum  { VIRTUAL_SET_DROP_OPTIONS = 1 }
 
- Protected Attributes inherited from KFileView
KFileViewSignaler * sig
 

Detailed Description

This KFileView is an empbedded preview for some file types.

Definition at line 39 of file tdefilepreview.h.

Constructor & Destructor Documentation

◆ KFilePreview() [1/2]

KFilePreview::KFilePreview ( TQWidget *  parent,
const char *  name 
)

Definition at line 41 of file tdefilepreview.cpp.

◆ KFilePreview() [2/2]

KFilePreview::KFilePreview ( KFileView *  view,
TQWidget *  parent,
const char *  name 
)

Definition at line 31 of file tdefilepreview.cpp.

◆ ~KFilePreview()

KFilePreview::~KFilePreview ( )
virtual

Definition at line 47 of file tdefilepreview.cpp.

Member Function Documentation

◆ actionCollection()

TDEActionCollection * KFilePreview::actionCollection ( ) const
virtual

This overrides KFileView::actionCollection() by returning the actionCollection() of the KFileView (member left) it contains.

This means that KFilePreview will never create a TDEActionCollection object of its own.

Reimplemented from KFileView.

Definition at line 257 of file tdefilepreview.cpp.

◆ clear()

void KFilePreview::clear ( )
virtual

Clears the view and all item lists.

Reimplemented from KFileView.

Definition at line 174 of file tdefilepreview.cpp.

◆ clearSelection()

void KFilePreview::clearSelection ( )
virtual

Clears any selection, unhighlights everything.

Must be implemented by the view.

Implements KFileView.

Definition at line 180 of file tdefilepreview.cpp.

◆ clearView()

void KFilePreview::clearView ( )
virtual

pure virtual function, that should be implemented to clear the view.

At this moment the list is already empty

Implements KFileView.

Definition at line 142 of file tdefilepreview.cpp.

◆ currentFileItem()

KFileItem * KFilePreview::currentFileItem ( ) const
virtual
Returns
the "current" KFileItem, e.g. where the cursor is. Returns 0L when there is no current item (e.g. in an empty view). Subclasses have to implement this.

Implements KFileView.

Definition at line 214 of file tdefilepreview.cpp.

◆ ensureItemVisible()

void KFilePreview::ensureItemVisible ( const KFileItem *  i)
virtual

pure virtual function, that should be implemented to make item i visible, i.e.

by scrolling the view appropriately.

Implements KFileView.

Definition at line 237 of file tdefilepreview.cpp.

◆ fileView()

KFileView * KFilePreview::fileView ( ) const
inline
Returns
the current fileview

Definition at line 60 of file tdefilepreview.h.

◆ firstFileItem()

KFileItem * KFilePreview::firstFileItem ( ) const
virtual

Implements KFileView.

Definition at line 242 of file tdefilepreview.cpp.

◆ insertItem()

void KFilePreview::insertItem ( KFileItem *  i)
virtual

The derived view must implement this function to add the file in the widget.

Make sure to call this implementation, i.e. KFileView::insertItem( i );

Reimplemented from KFileView.

Definition at line 130 of file tdefilepreview.cpp.

◆ invertSelection()

void KFilePreview::invertSelection ( )
virtual

Inverts the current selection, i.e.

selects all items, that were up to now not selected and deselects the other.

Reimplemented from KFileView.

Definition at line 191 of file tdefilepreview.cpp.

◆ isSelected()

bool KFilePreview::isSelected ( const KFileItem *  ) const
virtual
Returns
whether the given item is currently selected. Must be implemented by the view.

Implements KFileView.

Definition at line 196 of file tdefilepreview.cpp.

◆ listingCompleted()

void KFilePreview::listingCompleted ( )
virtual

This hook is called when all items of the currently listed directory are listed and inserted into the view, i.e.

there won't come any new items anymore.

Reimplemented from KFileView.

Definition at line 169 of file tdefilepreview.cpp.

◆ nextItem()

KFileItem * KFilePreview::nextItem ( const KFileItem *  item) const
virtual

Implements KFileView.

Definition at line 247 of file tdefilepreview.cpp.

◆ prevItem()

KFileItem * KFilePreview::prevItem ( const KFileItem *  item) const
virtual

Implements KFileView.

Definition at line 252 of file tdefilepreview.cpp.

◆ readConfig()

void KFilePreview::readConfig ( TDEConfig *  config,
const TQString &  group = TQString::null 
)
virtual

Reimplemented from KFileView.

Definition at line 267 of file tdefilepreview.cpp.

◆ removeItem()

void KFilePreview::removeItem ( const KFileItem *  item)
virtual

Removes an item from the list; has to be implemented by the view.

Call KFileView::removeItem( item ) after removing it.

Reimplemented from KFileView.

Definition at line 160 of file tdefilepreview.cpp.

◆ selectAll()

void KFilePreview::selectAll ( )
virtual

Selects all items.

You may want to override this, if you can implement it more efficiently than calling setSelected() with every item. This works only in Multiselection mode of course.

Reimplemented from KFileView.

Definition at line 186 of file tdefilepreview.cpp.

◆ setCurrentItem()

void KFilePreview::setCurrentItem ( const KFileItem *  item)
virtual

Reimplement this to set item the current item in the view, e.g.

the item having focus.

Implements KFileView.

Definition at line 209 of file tdefilepreview.cpp.

◆ setFileView()

void KFilePreview::setFileView ( KFileView *  view)

Delets the current view and sets the view to the given view.

The view is reparented to have this as parent, if necessary.

Definition at line 81 of file tdefilepreview.cpp.

◆ setPreviewWidget()

void KFilePreview::setPreviewWidget ( const TQWidget *  w,
const KURL &  u 
)

Definition at line 108 of file tdefilepreview.cpp.

◆ setSelected()

void KFilePreview::setSelected ( const KFileItem *  ,
bool  enable 
)
virtual

Tells the view that it should highlight the item.

This function must be implemented by the view.

Implements KFileView.

Definition at line 205 of file tdefilepreview.cpp.

◆ setSelectionMode()

void KFilePreview::setSelectionMode ( KFile::SelectionMode  sm)
virtual

Reimplemented from KFileView.

Definition at line 201 of file tdefilepreview.cpp.

◆ setSorting()

void KFilePreview::setSorting ( TQDir::SortSpec  sort)
virtual

Sets the sorting order of the view.

Default is TQDir::Name | TQDir::IgnoreCase | TQDir::DirsFirst Override this in your subclass and sort accordingly (usually by setting the sorting-key for every item and telling QIconView or TQListView to sort.

A view may choose to use a different sorting than TQDir::Name, Time or Size. E.g. to sort by mimetype or any possible string. Set the sorting to TQDir::Unsorted for that and do the rest internally.

See also
sortingKey

Reimplemented from KFileView.

Definition at line 136 of file tdefilepreview.cpp.

◆ slotHighlighted

void KFilePreview::slotHighlighted ( const KFileItem *  item)
protectedvirtualslot

Definition at line 219 of file tdefilepreview.cpp.

◆ updateView() [1/2]

void KFilePreview::updateView ( bool  f)
virtual

does a repaint of the view.

The default implementation calls

widget()->repaint(f)
KFilePreview::widget
virtual TQWidget * widget()
a pure virtual function to get a TQWidget, that can be added to other widgets.
Definition: tdefilepreview.h:48

Reimplemented from KFileView.

Definition at line 148 of file tdefilepreview.cpp.

◆ updateView() [2/2]

void KFilePreview::updateView ( const KFileItem *  i)
virtual

Reimplemented from KFileView.

Definition at line 155 of file tdefilepreview.cpp.

◆ virtual_hook()

void KFilePreview::virtual_hook ( int  id,
void *  data 
)
protectedvirtual

Reimplemented from KFileView.

Definition at line 277 of file tdefilepreview.cpp.

◆ widget()

virtual TQWidget * KFilePreview::widget ( )
inlinevirtual

a pure virtual function to get a TQWidget, that can be added to other widgets.

This function is needed to make it possible for derived classes to derive from other widgets.

Implements KFileView.

Definition at line 48 of file tdefilepreview.h.

◆ writeConfig()

void KFilePreview::writeConfig ( TDEConfig *  config,
const TQString &  group = TQString::null 
)
virtual

Reimplemented from KFileView.

Definition at line 272 of file tdefilepreview.cpp.


The documentation for this class was generated from the following files:
  • tdefilepreview.h
  • tdefilepreview.cpp

tdeio/tdefile

Skip menu "tdeio/tdefile"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

tdeio/tdefile

Skip menu "tdeio/tdefile"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeio/tdefile by doxygen 1.9.4
This website is maintained by Timothy Pearson.