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

tdeio/tdefile

  • tdeio
  • tdefile
tdefilepreview.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  2000 Werner Trobin <wtrobin@carinthia.com>
6 
7  This library is free software; you can redistribute it and/or
8  modify it under the terms of the GNU Library General Public
9  License as published by the Free Software Foundation; either
10  version 2 of the License, or (at your option) any later version.
11 
12  This library is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  Library General Public License for more details.
16 
17  You should have received a copy of the GNU Library General Public License
18  along with this library; see the file COPYING.LIB. If not, write to
19  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20  Boston, MA 02110-1301, USA.
21 */
22 
23 #ifndef _TDEFILEPREVIEW_H
24 #define _TDEFILEPREVIEW_H
25 
26 #include <tqsplitter.h>
27 #include <tqwidget.h>
28 #include <tqstring.h>
29 
30 #include <kurl.h>
31 #include <tdefileitem.h>
32 #include <tdefileiconview.h>
33 #include <tdefiledetailview.h>
34 #include <tdefile.h>
35 
39 class TDEIO_EXPORT KFilePreview : public TQSplitter, public KFileView
40 {
41  TQ_OBJECT
42 
43 public:
44  KFilePreview(TQWidget *parent, const char *name);
45  KFilePreview(KFileView *view, TQWidget *parent, const char *name);
46  virtual ~KFilePreview();
47 
48  virtual TQWidget *widget() { return this; }
49  virtual void clearView();
50 
55  void setFileView(KFileView *view);
56 
60  KFileView* fileView() const { return left; }
61 
62  virtual void updateView( bool );
63  virtual void updateView(const KFileItem*);
64  virtual void removeItem(const KFileItem*);
65  virtual void listingCompleted();
66 
67  virtual void setSelectionMode( KFile::SelectionMode sm );
68 
69  virtual void setSelected(const KFileItem *, bool);
70  virtual bool isSelected( const KFileItem * ) const;
71  virtual void clearSelection();
72  virtual void selectAll();
73  virtual void invertSelection();
74 
75  virtual void insertItem(KFileItem *);
76  virtual void clear();
77 
78  virtual void setCurrentItem( const KFileItem * );
79  virtual KFileItem * currentFileItem() const;
80  virtual KFileItem * firstFileItem() const;
81  virtual KFileItem * nextItem( const KFileItem * ) const;
82  virtual KFileItem * prevItem( const KFileItem * ) const;
83 
84  virtual void setSorting( TQDir::SortSpec sort );
85 
86  virtual void readConfig( TDEConfig *, const TQString& group = TQString::null );
87  virtual void writeConfig( TDEConfig *, const TQString& group = TQString::null);
88 
95  virtual TDEActionCollection * actionCollection() const;
96 
97  void ensureItemVisible(const KFileItem *);
98 
99  void setPreviewWidget(const TQWidget *w, const KURL &u);
100 
101 protected slots:
102  virtual void slotHighlighted( const KFileItem * );
103 
104 signals:
105  void showPreview(const KURL &);
106  void clearPreview();
107 
108 private:
109  void init( KFileView *view );
110 
111  KFileView *left;
112  TQWidget *preview;
113  TQString viewname;
114 
115 protected:
117  virtual void virtual_hook( int id, void* data );
118 private:
119  class KFilePreviewPrivate;
120  KFilePreviewPrivate *d;
121 };
122 #endif
KFilePreview
Definition: tdefilepreview.h:40
KFilePreview::fileView
KFileView * fileView() const
Definition: tdefilepreview.h:60
KFilePreview::widget
virtual TQWidget * widget()
a pure virtual function to get a TQWidget, that can be added to other widgets.
Definition: tdefilepreview.h:48
KFileView
This class defines an interface to all file views.
Definition: tdefileview.h:97
KFileView::clearSelection
virtual void clearSelection()=0
Clears any selection, unhighlights everything.
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
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
KFileView::setCurrentItem
void setCurrentItem(const TQString &filename)
Sets filename the current item in the view, if available.
Definition: tdefileview.cpp:268
KFileView::updateView
virtual void updateView(bool f=true)
does a repaint of the view.
Definition: tdefileview.cpp:259
KFileView::currentFileItem
virtual KFileItem * currentFileItem() 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::ensureItemVisible
virtual void ensureItemVisible(const KFileItem *i)=0
pure virtual function, that should be implemented to make item i visible, i.e.
KFileView::setSorting
virtual void setSorting(TQDir::SortSpec sort)
Sets the sorting order of the view.
Definition: tdefileview.cpp:151
KFileView::actionCollection
virtual TDEActionCollection * actionCollection() const
Definition: tdefileview.cpp:365
KFileView::clear
virtual void clear()
Clears the view and all item lists.
Definition: tdefileview.cpp:156
KFileView::selectAll
virtual void selectAll()
Selects all items.
Definition: tdefileview.cpp:312
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::clearView
virtual void clearView()=0
pure virtual function, that should be implemented to clear the view.
KFileView::invertSelection
virtual void invertSelection()
Inverts the current selection, i.e.
Definition: tdefileview.cpp:323

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.1
This website is maintained by Timothy Pearson.