| # kio Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# kfile.h

    00001 /* This file is part of the KDE libraries
    00002     Copyright (C) 2000 Carsten Pfeiffer <pfeiffer@kde.org>
    00003
    00004     This library is free software; you can redistribute it and/or
    00005     modify it under the terms of the GNU Library General Public
    00006     version 2, License as published by the Free Software Foundation.
    00007
    00008     This library is distributed in the hope that it will be useful,
    00009     but WITHOUT ANY WARRANTY; without even the implied warranty of
    00010     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00011     Library General Public License for more details.
    00012
    00013     You should have received a copy of the GNU Library General Public License
    00014     along with this library; see the file COPYING.LIB.  If not, write to
    00015     the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    00016     Boston, MA 02111-1307, USA.
    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 // not implemented yet!
    00055     };
    00056
    00057     enum SelectionMode {
    00058         Single      = 1,
    00059         Multi       = 2,
    00060         Extended    = 4,
    00061         NoSelection = 8
    00062     };
    00063
    00064
    00065     //
    00066     // some bittests
    00067     //
    00068
    00069
    00070     // sorting specific
    00071
    00072     // grr, who had the idea to set QDir::Name to 0x0?
    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     // view specific
    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.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 13:13:26 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001