KParts::FileInfoExtension Class
class KParts::FileInfoExtensionAn 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: | 4.6 |
Inherits: | QObject |
Public Types
enum | QueryMode { None, AllItems, SelectedItems } |
flags | QueryModes |
Public Functions
FileInfoExtension(KParts::ReadOnlyPart *parent) | |
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.
Constant | Value | Description |
---|---|---|
KParts::FileInfoExtension::None | 0x00 | Querying for file information is NOT possible |
KParts::FileInfoExtension::AllItems | 0x01 | Retrieve or can retrieve file information for all items |
KParts::FileInfoExtension::SelectedItems | 0x02 | Retrieve 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.
Member Function Documentation
[explicit]
FileInfoExtension::FileInfoExtension(KParts::ReadOnlyPart *parent)
[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.