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

KIO

  • sources
  • kde-4.14
  • kdelibs
  • 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 
21 bool 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 
28 bool KFile::isSortBySize( const QDir::SortFlags& sort )
29 {
30  return (sort & QDir::Size) == QDir::Size;
31 }
32 
33 bool KFile::isSortByDate( const QDir::SortFlags& sort )
34 {
35  return (sort & QDir::Time) == QDir::Time;
36 }
37 
38 bool KFile::isSortByType( const QDir::SortFlags& sort )
39 {
40  return (sort & QDir::Type) == QDir::Type;
41 }
42 
43 bool KFile::isSortDirsFirst( const QDir::SortFlags& sort )
44 {
45  return (sort & QDir::DirsFirst) == QDir::DirsFirst;
46 }
47 
48 bool KFile::isSortCaseInsensitive( const QDir::SortFlags& sort )
49 {
50  return (sort & QDir::IgnoreCase) == QDir::IgnoreCase;
51 }
52 
53 bool KFile::isDefaultView( const FileView& view )
54 {
55  return (view & Default) == Default;
56 }
57 
58 bool KFile::isSimpleView( const FileView& view )
59 {
60  return (view & Simple) == Simple;
61 }
62 
63 bool KFile::isDetailView( const FileView& view )
64 {
65  return (view & Detail) == Detail;
66 }
67 
68 bool KFile::isSeparateDirs( const FileView& view )
69 {
70  return (view & SeparateDirs) == SeparateDirs;
71 }
72 
73 bool KFile::isPreviewContents( const FileView& view )
74 {
75  return (view & PreviewContents) == PreviewContents;
76 }
77 
78 bool KFile::isPreviewInfo( const FileView& view )
79 {
80  return (view & PreviewInfo) == PreviewInfo;
81 }
82 
83 bool KFile::isTreeView( const FileView& view )
84 {
85  return (view & Tree) == Tree;
86 }
87 
88 bool KFile::isDetailTreeView( const FileView& view )
89 {
90  return (view & DetailTree) == DetailTree;
91 }
92 
93 #include "kfile.moc"
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
QDir::SortFlags
typedef SortFlags
KFile::isDetailTreeView
static bool isDetailTreeView(const FileView &view)
Definition: kfile.cpp:88
KFile::PreviewContents
Definition: kfile.h:59
KFile::isSeparateDirs
static bool isSeparateDirs(const FileView &view)
Definition: kfile.cpp:68
kfile.h
KFile::isSortBySize
static bool isSortBySize(const QDir::SortFlags &sort)
Definition: kfile.cpp:28
KFile::Tree
Definition: kfile.h:61
KFile::DetailTree
Definition: kfile.h:62
KFile::isPreviewInfo
static bool isPreviewInfo(const FileView &view)
Definition: kfile.cpp:78
KFile::isSimpleView
static bool isSimpleView(const FileView &view)
Definition: kfile.cpp:58
KFile::PreviewInfo
Definition: kfile.h:60
KFile::isSortDirsFirst
static bool isSortDirsFirst(const QDir::SortFlags &sort)
Definition: kfile.cpp:43
KFile::SeparateDirs
Definition: kfile.h:58
KFile::isPreviewContents
static bool isPreviewContents(const FileView &view)
Definition: kfile.cpp:73
KFile::isSortCaseInsensitive
static bool isSortCaseInsensitive(const QDir::SortFlags &sort)
Definition: kfile.cpp:48
KFile::Default
Definition: kfile.h:55
KFile::isSortByType
static bool isSortByType(const QDir::SortFlags &sort)
Definition: kfile.cpp:38
KFile::isDetailView
static bool isDetailView(const FileView &view)
Definition: kfile.cpp:63
KFile::FileView
FileView
Definition: kfile.h:54
KFile::Simple
Definition: kfile.h:56
KFile::isTreeView
static bool isTreeView(const FileView &view)
Definition: kfile.cpp:83
KFile::Detail
Definition: kfile.h:57
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:53 by doxygen 1.8.7 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 API Reference

Skip menu "kdelibs 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

Search



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