KParts::FileInfoExtension Class

An extension for obtaining file information from the part. More...

Header: #include <KParts/FileInfoExtension>
CMake: find_package(KF6 REQUIRED COMPONENTS Parts)
target_link_libraries(mytarget PRIVATE KF6::Parts)
Since: KParts 4.6

Public Types

enum QueryMode { None, AllItems, SelectedItems }
flags QueryModes

Public Functions

virtual bool hasSelection() const
virtual KFileItemList queryFor(KParts::FileInfoExtension::QueryMode mode) const = 0
virtual KParts::FileInfoExtension::QueryModes supportedQueryModes() const

Static Public Members

KParts::FileInfoExtension *childObject(QObject *obj)

Detailed Description

This extension provides information about file and directory resources that are present in the part the implements it.

The main purpose of for this extension is to provide information about files and directories located on remote servers so that download managers such as kget can easily retrieve these resources.

Member Type Documentation

enum FileInfoExtension::QueryMode
flags FileInfoExtension::QueryModes

Supported file information retrieval modes.

ConstantValueDescription
KParts::FileInfoExtension::None0x00Querying for file information is NOT possible
KParts::FileInfoExtension::AllItems0x01Retrieve or can retrieve file information for all items
KParts::FileInfoExtension::SelectedItems0x02Retrieve or can retrieve file information for selected items

The QueryModes type is a typedef for QFlags<QueryMode>. It stores an OR combination of QueryMode values.

See also QueryModes.

Member Function Documentation

[static] KParts::FileInfoExtension *FileInfoExtension::childObject(QObject *obj)

Queries obj for a child object which inherits from this class.

[virtual] bool FileInfoExtension::hasSelection() const

Returns true if any of the items in the current view of the part that implements this extension are selected.

By default this function returns false.

[pure virtual] KFileItemList FileInfoExtension::queryFor(KParts::FileInfoExtension::QueryMode mode) const

Returns a information for files that match the specified query mode.

If the mode specified by mode is not supported or cannot be handled, then an empty list is returned.

[virtual] KParts::FileInfoExtension::QueryModes FileInfoExtension::supportedQueryModes() const

Returns the file information retrieve modes supported by the part that implements this extension.

By default this function returns None.