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 };
00047
00048 enum FileView {
00049 Default = 0,
00050 Simple = 1,
00051 Detail = 2,
00052 SeparateDirs = 4,
00053 PreviewContents = 8,
00054 PreviewInfo = 16
00055 };
00056
00057 enum SelectionMode {
00058 Single = 1,
00059 Multi = 2,
00060 Extended = 4,
00061 NoSelection = 8
00062 };
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073 static bool isSortByName( const QDir::SortSpec& sort ) {
00074 return (sort & QDir::Time) != QDir::Time &&
00075 (sort & QDir::Size) != QDir::Size;
00076 }
00077
00078 static bool isSortBySize( const QDir::SortSpec& sort ) {
00079 return (sort & QDir::Size) == QDir::Size;
00080 }
00081
00082 static bool isSortByDate( const QDir::SortSpec& sort ) {
00083 return (sort & QDir::Time) == QDir::Time;
00084 }
00085
00086 static bool isSortDirsFirst( const QDir::SortSpec& sort ) {
00087 return (sort & QDir::DirsFirst) == QDir::DirsFirst;
00088 }
00089
00090 static bool isSortCaseInsensitive( const QDir::SortSpec& sort ) {
00091 return (sort & QDir::IgnoreCase) == QDir::IgnoreCase;
00092 }
00093
00094
00095
00096 static bool isDefaultView( const FileView& view ) {
00097 return (view & Default) == Default;
00098 }
00099
00100 static bool isSimpleView( const FileView& view ) {
00101 return (view & Simple) == Simple;
00102 }
00103
00104 static bool isDetailView( const FileView& view ) {
00105 return (view & Detail) == Detail;
00106 }
00107
00108 static bool isSeparateDirs( const FileView& view ) {
00109 return (view & SeparateDirs) == SeparateDirs;
00110 }
00111
00112 static bool isPreviewContents( const FileView& view ) {
00113 return (view & PreviewContents) == PreviewContents;
00114 }
00115
00119 static bool isPreviewInfo( const FileView& view ) {
00120 return (view & PreviewInfo) == PreviewInfo;
00121 }
00122
00123 };
00124
00125 #endif // KFILE_H
This file is part of the documentation for kdelibs Version 3.1.0.