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

tdeio/tdefile

  • tdeio
  • tdefile
tdefile.h
1 /* This file is part of the KDE libraries
2  Copyright (C) 2000 Carsten Pfeiffer <pfeiffer@kde.org>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  version 2, License as published by the Free Software Foundation.
7 
8  This library is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  Library General Public License for more details.
12 
13  You should have received a copy of the GNU Library General Public License
14  along with this library; see the file COPYING.LIB. If not, write to
15  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16  Boston, MA 02110-1301, USA.
17 */
18 #ifndef TDEFILE_H
19 #define TDEFILE_H
20 
21 #include <tqdir.h>
22 
23 #include "tdelibs_export.h"
24 
31 class TDEIO_EXPORT KFile
32 {
33 public:
42  enum Mode {
43  File = 1,
44  Directory = 2,
45  Files = 4,
46  ExistingOnly = 8,
47  LocalOnly = 16,
48  ModeMax = 65536
49  };
50 
51  enum FileView {
52  Default = 0,
53  Simple = 1,
54  Detail = 2,
55  SeparateDirs = 4,
56  PreviewContents = 8,
57  PreviewInfo = 16,
58  FileViewMax = 65536
59  };
60 
61  enum SelectionMode {
62  Single = 1,
63  Multi = 2,
64  Extended = 4,
65  NoSelection = 8
66  };
67 
68 
69  //
70  // some bittests
71  //
72 
73 
74  // sorting specific
75 
76  // grr, who had the idea to set TQDir::Name to 0x0?
77  static bool isSortByName( const TQDir::SortSpec& sort ) {
78  return (sort & TQDir::Time) != TQDir::Time &&
79  (sort & TQDir::Size) != TQDir::Size;
80  }
81 
82  static bool isSortBySize( const TQDir::SortSpec& sort ) {
83  return (sort & TQDir::Size) == TQDir::Size;
84  }
85 
86  static bool isSortByDate( const TQDir::SortSpec& sort ) {
87  return (sort & TQDir::Time) == TQDir::Time;
88  }
89 
90  static bool isSortDirsFirst( const TQDir::SortSpec& sort ) {
91  return (sort & TQDir::DirsFirst) == TQDir::DirsFirst;
92  }
93 
94  static bool isSortCaseInsensitive( const TQDir::SortSpec& sort ) {
95  return (sort & TQDir::IgnoreCase) == TQDir::IgnoreCase;
96  }
97 
98 
99  // view specific
100  static bool isDefaultView( const FileView& view ) {
101  return (view & Default) == Default;
102  }
103 
104  static bool isSimpleView( const FileView& view ) {
105  return (view & Simple) == Simple;
106  }
107 
108  static bool isDetailView( const FileView& view ) {
109  return (view & Detail) == Detail;
110  }
111 
112  static bool isSeparateDirs( const FileView& view ) {
113  return (view & SeparateDirs) == SeparateDirs;
114  }
115 
116  static bool isPreviewContents( const FileView& view ) {
117  return (view & PreviewContents) == PreviewContents;
118  }
119 
123  static bool isPreviewInfo( const FileView& view ) {
124  return (view & PreviewInfo) == PreviewInfo;
125  }
126 
127 };
128 
129 #endif // TDEFILE_H
KFile
KFile is a class which provides a namespace for some enumerated values associated with the tdefile li...
Definition: tdefile.h:31
KFile::Mode
Mode
Modes of operation for the dialog.
Definition: tdefile.h:42
KFile::isPreviewInfo
static bool isPreviewInfo(const FileView &view)
Definition: tdefile.h:123

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.