KIO
#include <kfileitemlistproperties.h>
Public Member Functions | |
KFileItemListProperties () | |
KFileItemListProperties (const KFileItemList &items) | |
KFileItemListProperties (const KFileItemListProperties &) | |
virtual | ~KFileItemListProperties () |
bool | isDirectory () const |
bool | isLocal () const |
KFileItemList | items () const |
QString | mimeGroup () const |
QString | mimeType () const |
KFileItemListProperties & | operator= (const KFileItemListProperties &other) |
void | setItems (const KFileItemList &items) |
bool | supportsDeleting () const |
bool | supportsMoving () const |
bool | supportsReading () const |
bool | supportsWriting () const |
KUrl::List | urlList () const |
Detailed Description
Provides information about the common properties of a group of KFileItem objects.
Given a list of KFileItems, this class can determine (and cache) the common mimetype for all items, whether all items are directories, whether all items are readable, writable, etc. As soon as one file item does not support a specific capability (read, write etc.), it is marked as unsupported for all items.
This class is implicitly shared, which means it can be used as a value and copied around at almost no cost.
- Since
- 4.3
Definition at line 49 of file kfileitemlistproperties.h.
Constructor & Destructor Documentation
KFileItemListProperties::KFileItemListProperties | ( | ) |
Default constructor.
Use setItems to specify the items.
Definition at line 58 of file kfileitemlistproperties.cpp.
KFileItemListProperties::KFileItemListProperties | ( | const KFileItemList & | items | ) |
Constructor that takes a KFileItemList and sets the capabilities supported by all the FileItems as true.
- Parameters
-
items The list of items that are to have their supported capabilities checked.
Definition at line 63 of file kfileitemlistproperties.cpp.
KFileItemListProperties::KFileItemListProperties | ( | const KFileItemListProperties & | other | ) |
Copy constructor.
Definition at line 115 of file kfileitemlistproperties.cpp.
|
virtual |
Destructor.
Definition at line 126 of file kfileitemlistproperties.cpp.
Member Function Documentation
bool KFileItemListProperties::isDirectory | ( | ) | const |
- Returns
- true if all items are directories
Definition at line 165 of file kfileitemlistproperties.cpp.
bool KFileItemListProperties::isLocal | ( | ) | const |
Check if files are local.
- Returns
- true if all the FileItems are local, otherwise there is one or more remote file, so false.
Definition at line 150 of file kfileitemlistproperties.cpp.
KFileItemList KFileItemListProperties::items | ( | ) | const |
List of fileitems passed to the constructor or to setItems().
Definition at line 155 of file kfileitemlistproperties.cpp.
QString KFileItemListProperties::mimeGroup | ( | ) | const |
- Returns
- the mimetype group (e.g. "text") of all items, if they all have the same, otherwise empty
Definition at line 177 of file kfileitemlistproperties.cpp.
QString KFileItemListProperties::mimeType | ( | ) | const |
- Returns
- the mimetype of all items, if they all have the same, otherwise empty
Definition at line 170 of file kfileitemlistproperties.cpp.
KFileItemListProperties & KFileItemListProperties::operator= | ( | const KFileItemListProperties & | other | ) |
Assignment operator.
Definition at line 120 of file kfileitemlistproperties.cpp.
void KFileItemListProperties::setItems | ( | const KFileItemList & | items | ) |
Sets the items that are to have their supported capabilities checked.
Definition at line 69 of file kfileitemlistproperties.cpp.
bool KFileItemListProperties::supportsDeleting | ( | ) | const |
Check if deleting capability is supported.
- Returns
- true if all the FileItems can be deleted, otherwise false.
Definition at line 135 of file kfileitemlistproperties.cpp.
bool KFileItemListProperties::supportsMoving | ( | ) | const |
Check if moving capability is supported.
- Returns
- true if all the FileItems can be moved, otherwise false.
Definition at line 145 of file kfileitemlistproperties.cpp.
bool KFileItemListProperties::supportsReading | ( | ) | const |
Check if reading capability is supported.
- Returns
- true if all the FileItems can be read, otherwise false.
Definition at line 130 of file kfileitemlistproperties.cpp.
bool KFileItemListProperties::supportsWriting | ( | ) | const |
Check if writing capability is supported (file managers use this mostly for directories)
- Returns
- true if all the FileItems can be written to, otherwise false.
Definition at line 140 of file kfileitemlistproperties.cpp.
KUrl::List KFileItemListProperties::urlList | ( | ) | const |
List of urls, gathered from the fileitems.
Definition at line 160 of file kfileitemlistproperties.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:50:04 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.