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

KParts

  • kparts
listingextension.h
Go to the documentation of this file.
1/* This file is part of the KDE project
2 Copyright (C) 2012 Dawit Alemayehu <adawit@kde.org>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
18 */
19
20#ifndef KPARTS_LISTINGEXTENSION_H
21#define KPARTS_LISTINGEXTENSION_H
22
23#include <QtCore/QObject>
24
25#include <kparts/kparts_export.h>
26
27
28class KFileItemList;
29
30namespace KParts
31{
32
33class ReadOnlyPart;
34
84class KPARTS_EXPORT ListingFilterExtension : public QObject
85{
86 Q_OBJECT
87
88public:
92 enum FilterMode {
93 None = 0x00,
94 MimeType = 0x01,
95 SubString = 0x02,
96 WildCard = 0x04
97 };
98
99 Q_DECLARE_FLAGS(FilterModes, FilterMode)
100
101
102 ListingFilterExtension(KParts::ReadOnlyPart* parent);
103
105 virtual ~ListingFilterExtension();
106
110 static ListingFilterExtension *childObject(QObject* obj);
111
118 virtual FilterModes supportedFilterModes() const;
119
126 virtual bool supportsMultipleFilters(FilterMode mode) const;
127
133 virtual QVariant filter(FilterMode mode) const = 0;
134
147 virtual void setFilter(FilterMode mode, const QVariant& filter) = 0;
148
149private:
150 class ListingFilterExtensionPrivate;
151 ListingFilterExtension* const d;
152};
153
165class KPARTS_EXPORT ListingNotificationExtension : public QObject
166{
167 Q_OBJECT
168
169public:
173 enum NotificationEventType {
174 None = 0x00,
175 ItemsAdded = 0x01,
176 ItemsDeleted = 0x02
177 };
178
179 Q_DECLARE_FLAGS(NotificationEventTypes, NotificationEventType)
180
181
182 ListingNotificationExtension(KParts::ReadOnlyPart* parent);
183
185 virtual ~ListingNotificationExtension();
186
193 virtual NotificationEventTypes supportedNotificationEventTypes() const;
194
198 static ListingNotificationExtension *childObject(QObject* obj);
199
200Q_SIGNALS:
205 void listingEvent(KParts::ListingNotificationExtension::NotificationEventType, const KFileItemList&);
206
207private:
208 class ListingNotificationExtensionPrivate;
209 ListingNotificationExtension* const d;
210};
211
212}
213
214Q_DECLARE_OPERATORS_FOR_FLAGS(KParts::ListingFilterExtension::FilterModes)
215Q_DECLARE_OPERATORS_FOR_FLAGS(KParts::ListingNotificationExtension::NotificationEventTypes)
216
217#endif /* KPARTS_LISTINGEXTENSION_H */
KFileItemList
KParts::ListingFilterExtension
an extension for filtering listings.
Definition: listingextension.h:85
KParts::ListingFilterExtension::FilterMode
FilterMode
Supported file filtering modes modes.
Definition: listingextension.h:92
KParts::ListingFilterExtension::filter
virtual QVariant filter(FilterMode mode) const =0
Returns the currently set filters for the given mode.
KParts::ListingFilterExtension::setFilter
virtual void setFilter(FilterMode mode, const QVariant &filter)=0
Sets the file filter that should be applied by the part that implements this extension for the given ...
KParts::ListingNotificationExtension
an extension for receiving listing change notification.
Definition: listingextension.h:166
KParts::ListingNotificationExtension::listingEvent
void listingEvent(KParts::ListingNotificationExtension::NotificationEventType, const KFileItemList &)
This signal is emitted when one of the notification events listed in NotificationEventType occur.
KParts::ListingNotificationExtension::NotificationEventType
NotificationEventType
Supported notification event types.
Definition: listingextension.h:173
KParts::ReadOnlyPart
Base class for any "viewer" part.
Definition: part.h:489
QObject
kparts_export.h
KParts
None
None
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KParts

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

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 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
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
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