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

tdeio/tdefile

Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes | List of all members
KCombiView Class Reference

#include <kcombiview.h>

Inheritance diagram for KCombiView:
KFileView

Public Member Functions

 KCombiView (TQWidget *parent, const char *name)
 
virtual TQWidget * widget ()
 
virtual void clearView ()
 
virtual void updateView (bool)
 
virtual void updateView (const KFileItem *)
 
virtual void removeItem (const KFileItem *)
 
virtual void listingCompleted ()
 
void setRight (KFileView *view)
 
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 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 insertItem (KFileItem *i)
 
virtual void clear ()
 
virtual void setSorting (TQDir::SortSpec sort)
 
virtual void readConfig (TDEConfig *, const TQString &group=TQString::null)
 
virtual void writeConfig (TDEConfig *, const TQString &group=TQString::null)
 
void ensureItemVisible (const KFileItem *)
 
virtual TDEActionCollection * actionCollection () const
 
virtual void setAcceptDrops (bool b)
 
- 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

void slotSortingChanged (TQDir::SortSpec)
 

Protected Member Functions

virtual bool eventFilter (TQObject *o, TQEvent *e)
 
void setDropOptions_impl (int options)
 
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)
 

Protected Attributes

KFileIconView * left
 
KFileView * right
 
- Protected Attributes inherited from KFileView
KFileViewSignaler * sig
 

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 }
 

Detailed Description

This view is designed to combine two KFileViews into one widget, to show directories on the left side and files on the right side.

Methods like selectedItems() to query status only work on the right side, i.e. on the files.

After creating the KCombiView, you need to supply the view shown in the right, (see setRight()). Available KFileView implementations are KFileIconView and KFileDetailView.

Most of the below methods are just implementations of the baseclass KFileView, so look there for documentation.

See also
KFileView
KFileIconView
KFileDetailView
KDirOperator

Definition at line 54 of file kcombiview.h.

Constructor & Destructor Documentation

◆ KCombiView()

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

Definition at line 42 of file kcombiview.cpp.

◆ ~KCombiView()

KCombiView::~KCombiView ( )
virtual

Definition at line 63 of file kcombiview.cpp.

Member Function Documentation

◆ actionCollection()

TDEActionCollection * KCombiView::actionCollection ( ) const
virtual
Returns
the view-specific action-collection. Every view should add its actions here (if it has any) to make them available to e.g. the KDirOperator's popup-menu.

Reimplemented from KFileView.

Definition at line 322 of file kcombiview.cpp.

◆ clear()

void KCombiView::clear ( )
virtual

Clears the view and all item lists.

Reimplemented from KFileView.

Definition at line 147 of file kcombiview.cpp.

◆ clearSelection()

void KCombiView::clearSelection ( )
virtual

Clears any selection, unhighlights everything.

Must be implemented by the view.

Implements KFileView.

Definition at line 155 of file kcombiview.cpp.

◆ clearView()

void KCombiView::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 111 of file kcombiview.cpp.

◆ currentFileItem()

KFileItem * KCombiView::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 206 of file kcombiview.cpp.

◆ ensureItemVisible()

void KCombiView::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 222 of file kcombiview.cpp.

◆ eventFilter()

bool KCombiView::eventFilter ( TQObject *  o,
TQEvent *  e 
)
protectedvirtual

Definition at line 354 of file kcombiview.cpp.

◆ firstFileItem()

KFileItem * KCombiView::firstFileItem ( ) const
virtual

Implements KFileView.

Definition at line 229 of file kcombiview.cpp.

◆ insertItem()

void KCombiView::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 87 of file kcombiview.cpp.

◆ invertSelection()

void KCombiView::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 169 of file kcombiview.cpp.

◆ isSelected()

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

Implements KFileView.

Definition at line 176 of file kcombiview.cpp.

◆ listingCompleted()

void KCombiView::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 140 of file kcombiview.cpp.

◆ nextItem()

KFileItem * KCombiView::nextItem ( const KFileItem *  fileItem) const
virtual

Implements KFileView.

Definition at line 243 of file kcombiview.cpp.

◆ prevItem()

KFileItem * KCombiView::prevItem ( const KFileItem *  fileItem) const
virtual

Implements KFileView.

Definition at line 269 of file kcombiview.cpp.

◆ readConfig()

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

Reimplemented from KFileView.

Definition at line 308 of file kcombiview.cpp.

◆ removeItem()

void KCombiView::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 132 of file kcombiview.cpp.

◆ selectAll()

void KCombiView::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 162 of file kcombiview.cpp.

◆ setAcceptDrops()

void KCombiView::setAcceptDrops ( bool  b)
virtual

Definition at line 327 of file kcombiview.cpp.

◆ setCurrentItem()

void KCombiView::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 199 of file kcombiview.cpp.

◆ setDropOptions_impl()

void KCombiView::setDropOptions_impl ( int  options)
protected

Definition at line 335 of file kcombiview.cpp.

◆ setRight()

void KCombiView::setRight ( KFileView *  view)

Sets the view to be shown in the right.

You need to call this before doing anything else with this widget.

Definition at line 68 of file kcombiview.cpp.

◆ setSelected()

void KCombiView::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 192 of file kcombiview.cpp.

◆ setSelectionMode()

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

Reimplemented from KFileView.

Definition at line 182 of file kcombiview.cpp.

◆ setSorting()

void KCombiView::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 101 of file kcombiview.cpp.

◆ slotSortingChanged

void KCombiView::slotSortingChanged ( TQDir::SortSpec  sorting)
protectedslot

Definition at line 296 of file kcombiview.cpp.

◆ updateView() [1/2]

void KCombiView::updateView ( bool  f)
virtual

does a repaint of the view.

The default implementation calls

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

Reimplemented from KFileView.

Definition at line 118 of file kcombiview.cpp.

◆ updateView() [2/2]

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

Reimplemented from KFileView.

Definition at line 125 of file kcombiview.cpp.

◆ virtual_hook()

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

Reimplemented from KFileView.

Definition at line 343 of file kcombiview.cpp.

◆ widget()

virtual TQWidget * KCombiView::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 63 of file kcombiview.h.

◆ writeConfig()

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

Reimplemented from KFileView.

Definition at line 315 of file kcombiview.cpp.

Member Data Documentation

◆ left

KFileIconView* KCombiView::left
protected

Definition at line 106 of file kcombiview.h.

◆ right

KFileView* KCombiView::right
protected

Definition at line 107 of file kcombiview.h.


The documentation for this class was generated from the following files:
  • kcombiview.h
  • kcombiview.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.