KParts::ListingNotificationExtension Class

Header: #include <ListingNotificationExtension>
CMake: find_package(KF6 REQUIRED COMPONENTS Parts)
target_link_libraries(mytarget PRIVATE KF6::Parts)

Public Types

enum NotificationEventType { None, ItemsAdded, ItemsDeleted }
flags NotificationEventTypes

Public Functions

ListingNotificationExtension(KParts::ReadOnlyPart *parent)
virtual ~ListingNotificationExtension() override
virtual KParts::ListingNotificationExtension::NotificationEventTypes supportedNotificationEventTypes() const

Signals

void listingEvent(KParts::ListingNotificationExtension::NotificationEventType, const KFileItemList &)

Static Public Members

KParts::ListingNotificationExtension *childObject(QObject *obj)

Detailed Description

@class ListingNotificationExtension listingnotificationextension.h <KParts/ListingNotificationExtension>

@short An extension for receiving listing change notification.

This extension is intended for implementation by parts that provide listing services, e.g. file management and is intended to notify about changes to a given listing. For example, if file management part implemented this extension it would emit @ref itemsDeleted and @ref itemsAdded signal whenever new files or folders are deleted and added to a directory respectively.

@since 4.9.2

Member Type Documentation

enum ListingNotificationExtension::NotificationEventType
flags ListingNotificationExtension::NotificationEventTypes

Supported notification event types. @see NotificationEventTypes

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

Member Function Documentation

ListingNotificationExtension::ListingNotificationExtension(KParts::ReadOnlyPart *parent)

Constructor

[override virtual noexcept] ListingNotificationExtension::~ListingNotificationExtension()

Destructor

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

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

[signal] void ListingNotificationExtension::listingEvent(KParts::ListingNotificationExtension::NotificationEventType, const KFileItemList &)

This signal is emitted when one of the notification events listed in @ref NotificationEventType occur.

[virtual] KParts::ListingNotificationExtension::NotificationEventTypes ListingNotificationExtension::supportedNotificationEventTypes() const

Returns the OR'ed value of the notification types supported by the part that implements this extension.

By default this function returns None.