• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • kio/kio
 

kio/kio

  • kio
  • kio
kfilefilter.h
1 /* This file is part of the KDE libraries
2 
3  Copyright (c) 2001,2002 Carsten Pfeiffer <pfeiffer@kde.org>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Library General Public
7  License (LGPL) as published by the Free Software Foundation; either
8  version 2 of the License, or (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Library General Public License for more details.
14 
15  You should have received a copy of the GNU Library General Public License
16  along with this library; see the file COPYING.LIB. If not, write to
17  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  Boston, MA 02110-1301, USA.
19 */
20 
21 #ifndef KFILEFILTER_H
22 #define KFILEFILTER_H
23 
24 #include <tqptrlist.h>
25 #include <tqstringlist.h>
26 
27 #include <sys/types.h>
28 #include <sys/stat.h>
29 #include <unistd.h>
30 
31 #include <kdelibs_export.h>
32 
33 class TQRegExp;
34 class KFileItem;
35 
41 class KIO_EXPORT KFileFilter
42 {
43 public:
49  virtual bool passesFilter( const KFileItem *item ) const = 0;
50 protected:
51  virtual void virtual_hook( int id, void* data );
52 };
53 
59 class KIO_EXPORT KSimpleFileFilter : public KFileFilter
60 {
61 public:
66  KSimpleFileFilter();
67  virtual ~KSimpleFileFilter();
68 
76  virtual void setFilterDotFiles( bool filter );
83  bool filterDotFiles() const { return m_filterDotFiles; }
84 
89  virtual void setFilterSpecials( bool filter );
94  bool filterSpecials() const { return m_filterSpecials; }
95 
96  // ### KDE4 make virtual and bool caseSensitive = false
108  void setNameFilters( const TQString& nameFilters, bool caseSensitive,
109  const TQChar& separator = ' ' );
117  virtual void setNameFilters( const TQString& nameFilters );
118 
125  virtual void setMimeFilters( const TQStringList& mimeFilters );
131  TQStringList mimeFilters() const { return m_mimeFilters; }
132 
141  virtual void setModeFilter( mode_t mode );
147  mode_t modeFilter() const { return m_modeFilter; }
148 
154  virtual bool passesFilter( const KFileItem *item ) const;
155 
156 protected:
157  TQPtrList<TQRegExp> m_nameFilters;
158 
159 private:
160  TQStringList m_mimeFilters;
161  bool m_filterDotFiles :1;
162  bool m_filterSpecials :1;
163  mode_t m_modeFilter;
164 protected:
165  virtual void virtual_hook( int id, void* data );
166 private:
167  class KSimpleFileFilterPrivate* d;
168 };
169 
170 #endif // KFILEFILTER_H
KSimpleFileFilter::modeFilter
mode_t modeFilter() const
Returns the mode filter, as set by setModeFilter().
Definition: kfilefilter.h:147
KFileFilter::passesFilter
virtual bool passesFilter(const KFileItem *item) const =0
Checks the given item.
KFileFilter
A KFileFilter is a simple base class for file filters.
Definition: kfilefilter.h:41
KSimpleFileFilter::mimeFilters
TQStringList mimeFilters() const
Returns the list of mime types.
Definition: kfilefilter.h:131
KSimpleFileFilter::filterSpecials
bool filterSpecials() const
Checks whether it filters "." and "..", default is true.
Definition: kfilefilter.h:94
KSimpleFileFilter
A simple file filter that can filter hidden dot files, by name, by mime type and by mode...
Definition: kfilefilter.h:59
KFileItem
A KFileItem is a generic class to handle a file, local or remote.
Definition: kfileitem.h:41
KSimpleFileFilter::filterDotFiles
bool filterDotFiles() const
Checks whether filtering dot files is enabled.
Definition: kfilefilter.h:83

kio/kio

Skip menu "kio/kio"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kio/kio

Skip menu "kio/kio"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for kio/kio by doxygen 1.8.11
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |