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

KIO

KFileItemListProperties Class Reference

Provides information about the common properties of a group of KFileItem objects. More...

#include <kfileitemlistproperties.h>

List of all members.

Public Member Functions

bool isDirectory () const
bool isLocal () const
KFileItemList items () const
 KFileItemListProperties (const KFileItemListProperties &)
 KFileItemListProperties (const KFileItemList &items)
 KFileItemListProperties ()
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
virtual ~KFileItemListProperties ()

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 114 of file kfileitemlistproperties.cpp.

KFileItemListProperties::~KFileItemListProperties (  )  [virtual]

Destructor.

Definition at line 125 of file kfileitemlistproperties.cpp.


Member Function Documentation

bool KFileItemListProperties::isDirectory (  )  const
Returns:
true if all items are directories

Definition at line 164 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 149 of file kfileitemlistproperties.cpp.

KFileItemList KFileItemListProperties::items (  )  const

List of fileitems passed to the constructor or to setItems().

Definition at line 154 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 176 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 169 of file kfileitemlistproperties.cpp.

KFileItemListProperties & KFileItemListProperties::operator= ( const KFileItemListProperties &  other  ) 

Assignment operator.

Definition at line 119 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 134 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 144 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 129 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 139 of file kfileitemlistproperties.cpp.

KUrl::List KFileItemListProperties::urlList (  )  const

List of urls, gathered from the fileitems.

Definition at line 159 of file kfileitemlistproperties.cpp.


The documentation for this class was generated from the following files:
  • kfileitemlistproperties.h
  • kfileitemlistproperties.cpp

KIO

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.6.1
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal