File indexing completed on 2024-12-01 09:53:38
0001 /* 0002 This file is part of the KDE libraries 0003 SPDX-FileCopyrightText: 2006 David Faure <faure@kde.org> 0004 0005 SPDX-License-Identifier: LGPL-2.0-only 0006 */ 0007 0008 #include "kfile.h" 0009 0010 bool KFile::isSortByName(const QDir::SortFlags &sort) 0011 { 0012 return (sort & QDir::Time) != QDir::Time && (sort & QDir::Size) != QDir::Size && (sort & QDir::Type) != QDir::Type; 0013 } 0014 0015 bool KFile::isSortBySize(const QDir::SortFlags &sort) 0016 { 0017 return (sort & QDir::Size) == QDir::Size; 0018 } 0019 0020 bool KFile::isSortByDate(const QDir::SortFlags &sort) 0021 { 0022 return (sort & QDir::Time) == QDir::Time; 0023 } 0024 0025 bool KFile::isSortByType(const QDir::SortFlags &sort) 0026 { 0027 return (sort & QDir::Type) == QDir::Type; 0028 } 0029 0030 bool KFile::isSortDirsFirst(const QDir::SortFlags &sort) 0031 { 0032 return (sort & QDir::DirsFirst) == QDir::DirsFirst; 0033 } 0034 0035 bool KFile::isSortCaseInsensitive(const QDir::SortFlags &sort) 0036 { 0037 return (sort & QDir::IgnoreCase) == QDir::IgnoreCase; 0038 } 0039 0040 bool KFile::isDefaultView(const FileView &view) 0041 { 0042 return (view & Default) == Default; 0043 } 0044 0045 bool KFile::isSimpleView(const FileView &view) 0046 { 0047 return (view & Simple) == Simple; 0048 } 0049 0050 bool KFile::isDetailView(const FileView &view) 0051 { 0052 return (view & Detail) == Detail; 0053 } 0054 0055 bool KFile::isSeparateDirs(const FileView &view) 0056 { 0057 return (view & SeparateDirs) == SeparateDirs; 0058 } 0059 0060 bool KFile::isPreviewContents(const FileView &view) 0061 { 0062 return (view & PreviewContents) == PreviewContents; 0063 } 0064 0065 bool KFile::isPreviewInfo(const FileView &view) 0066 { 0067 return (view & PreviewInfo) == PreviewInfo; 0068 } 0069 0070 bool KFile::isTreeView(const FileView &view) 0071 { 0072 return (view & Tree) == Tree; 0073 } 0074 0075 bool KFile::isDetailTreeView(const FileView &view) 0076 { 0077 return (view & DetailTree) == DetailTree; 0078 } 0079 0080 #include "moc_kfile.cpp"