KIO

kfile.cpp
1/*
2 This file is part of the KDE libraries
3 SPDX-FileCopyrightText: 2006 David Faure <faure@kde.org>
4
5 SPDX-License-Identifier: LGPL-2.0-only
6*/
7
8#include "kfile.h"
9
10bool KFile::isSortByName(const QDir::SortFlags &sort)
11{
12 return (sort & QDir::Time) != QDir::Time && (sort & QDir::Size) != QDir::Size && (sort & QDir::Type) != QDir::Type;
13}
14
15bool KFile::isSortBySize(const QDir::SortFlags &sort)
16{
17 return (sort & QDir::Size) == QDir::Size;
18}
19
20bool KFile::isSortByDate(const QDir::SortFlags &sort)
21{
22 return (sort & QDir::Time) == QDir::Time;
23}
24
25bool KFile::isSortByType(const QDir::SortFlags &sort)
26{
27 return (sort & QDir::Type) == QDir::Type;
28}
29
30bool KFile::isSortDirsFirst(const QDir::SortFlags &sort)
31{
32 return (sort & QDir::DirsFirst) == QDir::DirsFirst;
33}
34
35bool KFile::isSortCaseInsensitive(const QDir::SortFlags &sort)
36{
37 return (sort & QDir::IgnoreCase) == QDir::IgnoreCase;
38}
39
40bool KFile::isDefaultView(const FileView &view)
41{
42 return (view & Default) == Default;
43}
44
45bool KFile::isSimpleView(const FileView &view)
46{
47 return (view & Simple) == Simple;
48}
49
50bool KFile::isDetailView(const FileView &view)
51{
52 return (view & Detail) == Detail;
53}
54
55bool KFile::isSeparateDirs(const FileView &view)
56{
57 return (view & SeparateDirs) == SeparateDirs;
58}
59
60bool KFile::isPreviewContents(const FileView &view)
61{
62 return (view & PreviewContents) == PreviewContents;
63}
64
65bool KFile::isPreviewInfo(const FileView &view)
66{
67 return (view & PreviewInfo) == PreviewInfo;
68}
69
70bool KFile::isTreeView(const FileView &view)
71{
72 return (view & Tree) == Tree;
73}
74
75bool KFile::isDetailTreeView(const FileView &view)
76{
77 return (view & DetailTree) == DetailTree;
78}
79
80#include "moc_kfile.cpp"
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:16:28 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.