kfile.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef KFILE_H
00019 #define KFILE_H
00020
00021 #include <qdir.h>
00022
00029 class KFile
00030 {
00031 public:
00040 enum Mode {
00041 File = 1,
00042 Directory = 2,
00043 Files = 4,
00044 ExistingOnly = 8,
00045 LocalOnly = 16,
00046 ModeMax = 65536
00047 };
00048
00049 enum FileView {
00050 Default = 0,
00051 Simple = 1,
00052 Detail = 2,
00053 SeparateDirs = 4,
00054 PreviewContents = 8,
00055 PreviewInfo = 16,
00056 FileViewMax = 65536
00057 };
00058
00059 enum SelectionMode {
00060 Single = 1,
00061 Multi = 2,
00062 Extended = 4,
00063 NoSelection = 8
00064 };
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075 static bool isSortByName( const QDir::SortSpec& sort ) {
00076 return (sort & QDir::Time) != QDir::Time &&
00077 (sort & QDir::Size) != QDir::Size;
00078 }
00079
00080 static bool isSortBySize( const QDir::SortSpec& sort ) {
00081 return (sort & QDir::Size) == QDir::Size;
00082 }
00083
00084 static bool isSortByDate( const QDir::SortSpec& sort ) {
00085 return (sort & QDir::Time) == QDir::Time;
00086 }
00087
00088 static bool isSortDirsFirst( const QDir::SortSpec& sort ) {
00089 return (sort & QDir::DirsFirst) == QDir::DirsFirst;
00090 }
00091
00092 static bool isSortCaseInsensitive( const QDir::SortSpec& sort ) {
00093 return (sort & QDir::IgnoreCase) == QDir::IgnoreCase;
00094 }
00095
00096
00097
00098 static bool isDefaultView( const FileView& view ) {
00099 return (view & Default) == Default;
00100 }
00101
00102 static bool isSimpleView( const FileView& view ) {
00103 return (view & Simple) == Simple;
00104 }
00105
00106 static bool isDetailView( const FileView& view ) {
00107 return (view & Detail) == Detail;
00108 }
00109
00110 static bool isSeparateDirs( const FileView& view ) {
00111 return (view & SeparateDirs) == SeparateDirs;
00112 }
00113
00114 static bool isPreviewContents( const FileView& view ) {
00115 return (view & PreviewContents) == PreviewContents;
00116 }
00117
00121 static bool isPreviewInfo( const FileView& view ) {
00122 return (view & PreviewInfo) == PreviewInfo;
00123 }
00124
00125 };
00126
00127 #endif // KFILE_H
This file is part of the documentation for kio Library Version 3.3.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu Sep 23 17:12:21 2004 by
doxygen 1.3.8-20040913 written by
Dimitri van Heesch, © 1997-2003