• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KIO

  • kio
  • kfile
kfile.cpp
Go to the documentation of this file.
1/* This file is part of the KDE libraries
2 Copyright (C) 2006 David Faure <faure@kde.org>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License version 2 as published by the Free Software Foundation.
7
8 This library is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
12
13 You should have received a copy of the GNU Library General Public License
14 along with this library; see the file COPYING.LIB. If not, write to
15 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16 Boston, MA 02110-1301, USA.
17*/
18
19#include "kfile.h"
20
21bool KFile::isSortByName( const QDir::SortFlags& sort )
22{
23 return (sort & QDir::Time) != QDir::Time &&
24 (sort & QDir::Size) != QDir::Size &&
25 (sort & QDir::Type) != QDir::Type;
26}
27
28bool KFile::isSortBySize( const QDir::SortFlags& sort )
29{
30 return (sort & QDir::Size) == QDir::Size;
31}
32
33bool KFile::isSortByDate( const QDir::SortFlags& sort )
34{
35 return (sort & QDir::Time) == QDir::Time;
36}
37
38bool KFile::isSortByType( const QDir::SortFlags& sort )
39{
40 return (sort & QDir::Type) == QDir::Type;
41}
42
43bool KFile::isSortDirsFirst( const QDir::SortFlags& sort )
44{
45 return (sort & QDir::DirsFirst) == QDir::DirsFirst;
46}
47
48bool KFile::isSortCaseInsensitive( const QDir::SortFlags& sort )
49{
50 return (sort & QDir::IgnoreCase) == QDir::IgnoreCase;
51}
52
53bool KFile::isDefaultView( const FileView& view )
54{
55 return (view & Default) == Default;
56}
57
58bool KFile::isSimpleView( const FileView& view )
59{
60 return (view & Simple) == Simple;
61}
62
63bool KFile::isDetailView( const FileView& view )
64{
65 return (view & Detail) == Detail;
66}
67
68bool KFile::isSeparateDirs( const FileView& view )
69{
70 return (view & SeparateDirs) == SeparateDirs;
71}
72
73bool KFile::isPreviewContents( const FileView& view )
74{
75 return (view & PreviewContents) == PreviewContents;
76}
77
78bool KFile::isPreviewInfo( const FileView& view )
79{
80 return (view & PreviewInfo) == PreviewInfo;
81}
82
83bool KFile::isTreeView( const FileView& view )
84{
85 return (view & Tree) == Tree;
86}
87
88bool KFile::isDetailTreeView( const FileView& view )
89{
90 return (view & DetailTree) == DetailTree;
91}
92
93#include "kfile.moc"
KFile::isSeparateDirs
static bool isSeparateDirs(const FileView &view)
Definition: kfile.cpp:68
KFile::isSortDirsFirst
static bool isSortDirsFirst(const QDir::SortFlags &sort)
Definition: kfile.cpp:43
KFile::isPreviewContents
static bool isPreviewContents(const FileView &view)
Definition: kfile.cpp:73
KFile::isDetailView
static bool isDetailView(const FileView &view)
Definition: kfile.cpp:63
KFile::isSimpleView
static bool isSimpleView(const FileView &view)
Definition: kfile.cpp:58
KFile::FileView
FileView
Definition: kfile.h:54
KFile::Simple
@ Simple
Definition: kfile.h:56
KFile::SeparateDirs
@ SeparateDirs
Definition: kfile.h:58
KFile::DetailTree
@ DetailTree
Definition: kfile.h:62
KFile::PreviewContents
@ PreviewContents
Definition: kfile.h:59
KFile::PreviewInfo
@ PreviewInfo
Definition: kfile.h:60
KFile::Detail
@ Detail
Definition: kfile.h:57
KFile::Default
@ Default
Definition: kfile.h:55
KFile::Tree
@ Tree
Definition: kfile.h:61
KFile::isTreeView
static bool isTreeView(const FileView &view)
Definition: kfile.cpp:83
KFile::isDetailTreeView
static bool isDetailTreeView(const FileView &view)
Definition: kfile.cpp:88
KFile::isSortByType
static bool isSortByType(const QDir::SortFlags &sort)
Definition: kfile.cpp:38
KFile::isPreviewInfo
static bool isPreviewInfo(const FileView &view)
Definition: kfile.cpp:78
KFile::isDefaultView
static bool isDefaultView(const FileView &view)
Definition: kfile.cpp:53
KFile::isSortByName
static bool isSortByName(const QDir::SortFlags &sort)
Definition: kfile.cpp:21
KFile::isSortByDate
static bool isSortByDate(const QDir::SortFlags &sort)
Definition: kfile.cpp:33
KFile::isSortBySize
static bool isSortBySize(const QDir::SortFlags &sort)
Definition: kfile.cpp:28
KFile::isSortCaseInsensitive
static bool isSortCaseInsensitive(const QDir::SortFlags &sort)
Definition: kfile.cpp:48
kfile.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KIO

Skip menu "KIO"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal