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

KIO

Public Member Functions | List of all members
KFileItemListProperties Class Reference

#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
itemsThe 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.

KFileItemListProperties::~KFileItemListProperties ( )
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:
  • kfileitemlistproperties.h
  • kfileitemlistproperties.cpp
This file is part of the KDE documentation.
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.

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
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • 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