KIO
kfile.cpp
Go to the documentation of this file.00001 /* This file is part of the KDE libraries 00002 Copyright (C) 2006 David Faure <faure@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 License version 2 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., 51 Franklin Street, Fifth Floor, 00016 Boston, MA 02110-1301, USA. 00017 */ 00018 00019 #include "kfile.h" 00020 00021 bool KFile::isSortByName( const QDir::SortFlags& sort ) 00022 { 00023 return (sort & QDir::Time) != QDir::Time && 00024 (sort & QDir::Size) != QDir::Size && 00025 (sort & QDir::Type) != QDir::Type; 00026 } 00027 00028 bool KFile::isSortBySize( const QDir::SortFlags& sort ) 00029 { 00030 return (sort & QDir::Size) == QDir::Size; 00031 } 00032 00033 bool KFile::isSortByDate( const QDir::SortFlags& sort ) 00034 { 00035 return (sort & QDir::Time) == QDir::Time; 00036 } 00037 00038 bool KFile::isSortByType( const QDir::SortFlags& sort ) 00039 { 00040 return (sort & QDir::Type) == QDir::Type; 00041 } 00042 00043 bool KFile::isSortDirsFirst( const QDir::SortFlags& sort ) 00044 { 00045 return (sort & QDir::DirsFirst) == QDir::DirsFirst; 00046 } 00047 00048 bool KFile::isSortCaseInsensitive( const QDir::SortFlags& sort ) 00049 { 00050 return (sort & QDir::IgnoreCase) == QDir::IgnoreCase; 00051 } 00052 00053 bool KFile::isDefaultView( const FileView& view ) 00054 { 00055 return (view & Default) == Default; 00056 } 00057 00058 bool KFile::isSimpleView( const FileView& view ) 00059 { 00060 return (view & Simple) == Simple; 00061 } 00062 00063 bool KFile::isDetailView( const FileView& view ) 00064 { 00065 return (view & Detail) == Detail; 00066 } 00067 00068 bool KFile::isSeparateDirs( const FileView& view ) 00069 { 00070 return (view & SeparateDirs) == SeparateDirs; 00071 } 00072 00073 bool KFile::isPreviewContents( const FileView& view ) 00074 { 00075 return (view & PreviewContents) == PreviewContents; 00076 } 00077 00078 bool KFile::isPreviewInfo( const FileView& view ) 00079 { 00080 return (view & PreviewInfo) == PreviewInfo; 00081 } 00082 00083 bool KFile::isTreeView( const FileView& view ) 00084 { 00085 return (view & Tree) == Tree; 00086 } 00087 00088 bool KFile::isDetailTreeView( const FileView& view ) 00089 { 00090 return (view & DetailTree) == DetailTree; 00091 } 00092 00093 #include "kfile.moc"