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

tdeio/tdefile

  • tdeio
  • tdefile
kcombiview.h
1 /*
2  This file is part of the KDE libraries
3  Copyright (C) 1998 Stephan Kulow <coolo@kde.org>
4  1998 Daniel Grana <grana@ie.iwi.unibe.ch>
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Library General Public
8  License as published by the Free Software Foundation; either
9  version 2 of the License, or (at your option) any later version.
10 
11  This library is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  Library General Public License for more details.
15 
16  You should have received a copy of the GNU Library General Public License
17  along with this library; see the file COPYING.LIB. If not, write to
18  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  Boston, MA 02110-1301, USA.
20 */
21 
22 #ifndef _KCOMBIVIEW_H
23 #define _KCOMBIVIEW_H
24 
25 #include <tqsplitter.h>
26 #include <tdelocale.h>
27 
28 #include <tdefile.h>
29 #include <tdefileview.h>
30 
31 class KFileIconView;
32 class TQEvent;
33 class TQIconViewItem;
34 
54 class TDEIO_EXPORT KCombiView : public TQSplitter,
55  public KFileView
56 {
57  Q_OBJECT
58 
59 public:
60  KCombiView( TQWidget *parent, const char *name);
61  virtual ~KCombiView();
62 
63  virtual TQWidget *widget() { return this; }
64  virtual void clearView();
65 
66  virtual void updateView( bool );
67  virtual void updateView(const KFileItem*);
68  virtual void removeItem( const KFileItem * );
69  virtual void listingCompleted();
70 
75  void setRight(KFileView *view);
76 
77  virtual void setSelectionMode( KFile::SelectionMode sm );
78 
79  virtual void setSelected(const KFileItem *, bool);
80  virtual bool isSelected( const KFileItem * ) const;
81  virtual void clearSelection();
82  virtual void selectAll();
83  virtual void invertSelection();
84 
85  virtual void setCurrentItem( const KFileItem * );
86  virtual KFileItem * currentFileItem() const;
87  virtual KFileItem * firstFileItem() const;
88  virtual KFileItem * nextItem( const KFileItem * ) const;
89  virtual KFileItem * prevItem( const KFileItem * ) const;
90 
91  virtual void insertItem( KFileItem *i );
92  virtual void clear();
93 
94  virtual void setSorting( TQDir::SortSpec sort );
95 
96  virtual void readConfig( TDEConfig *, const TQString& group = TQString::null );
97  virtual void writeConfig( TDEConfig *, const TQString& group = TQString::null);
98 
99  void ensureItemVisible( const KFileItem * );
100 
101  virtual TDEActionCollection * actionCollection() const;
102 
103  virtual void setAcceptDrops(bool b);
104 
105 protected:
106  KFileIconView *left;
107  KFileView *right;
108 
109 protected slots:
110  void slotSortingChanged( TQDir::SortSpec );
111 
112 private:
113  KFileView *focusView( KFileView *preferred ) const;
114 
115  // in nextItem() and prevItem(), we have to switch views, when the first
116  // view returns 0L. So we need to remember which view was used in the
117  // previous call to next/prevItem(). Yes, it's a hack, but it works for
118  // some cases at least.
119  mutable KFileView *m_lastViewForNextItem;
120  mutable KFileView *m_lastViewForPrevItem;
121 
122 protected:
123  virtual bool eventFilter( TQObject *o, TQEvent *e );
124  void setDropOptions_impl(int options);
125 
126  virtual void virtual_hook( int id, void* data );
127 private:
128  class KCombiViewPrivate;
129  KCombiViewPrivate *d;
130 
131 };
132 
133 #endif
KFileView::setCurrentItem
void setCurrentItem(const TQString &filename)
Sets filename the current item in the view, if available.
Definition: tdefileview.cpp:268
KFileView::actionCollection
virtual TDEActionCollection * actionCollection() const
Definition: tdefileview.cpp:365
KFileView::insertItem
virtual void insertItem(KFileItem *i)
The derived view must implement this function to add the file in the widget.
Definition: tdefileview.cpp:147
KCombiView
This view is designed to combine two KFileViews into one widget, to show directories on the left side...
Definition: kcombiview.h:54
KCombiView::widget
virtual TQWidget * widget()
a pure virtual function to get a TQWidget, that can be added to other widgets.
Definition: kcombiview.h:63
KFileView
This class defines an interface to all file views.
Definition: tdefileview.h:97
KFileView::clear
virtual void clear()
Clears the view and all item lists.
Definition: tdefileview.cpp:156
KFileView::clearSelection
virtual void clearSelection()=0
Clears any selection, unhighlights everything.
KFileView::selectAll
virtual void selectAll()
Selects all items.
Definition: tdefileview.cpp:312
KFileView::currentFileItem
virtual KFileItem * currentFileItem() const =0
KFileView::setSelected
virtual void setSelected(const KFileItem *, bool enable)=0
Tells the view that it should highlight the item.
KFileView::isSelected
virtual bool isSelected(const KFileItem *) const =0
KFileView::removeItem
virtual void removeItem(const KFileItem *item)
Removes an item from the list; has to be implemented by the view.
Definition: tdefileview.cpp:346
KFileView::invertSelection
virtual void invertSelection()
Inverts the current selection, i.e.
Definition: tdefileview.cpp:323
KFileView::setSorting
virtual void setSorting(TQDir::SortSpec sort)
Sets the sorting order of the view.
Definition: tdefileview.cpp:151
KFileView::updateView
virtual void updateView(bool f=true)
does a repaint of the view.
Definition: tdefileview.cpp:259
KFileView::ensureItemVisible
virtual void ensureItemVisible(const KFileItem *i)=0
pure virtual function, that should be implemented to make item i visible, i.e.
KFileView::clearView
virtual void clearView()=0
pure virtual function, that should be implemented to clear the view.
KFileIconView
An icon-view capable of showing KFileItem's.
Definition: tdefileiconview.h:82
KFileView::listingCompleted
virtual void listingCompleted()
This hook is called when all items of the currently listed directory are listed and inserted into the...
Definition: tdefileview.cpp:360

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
  •     tdecore
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  • tdeioslave
  •   http
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeio/tdefile by doxygen 1.8.8
This website is maintained by Timothy Pearson.