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

KParts

  • sources
  • kde-4.14
  • kdelibs
  • 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 
28 class KFileItemList;
29 
30 namespace KParts
31 {
32 
33 class ReadOnlyPart;
34 
84 class KPARTS_EXPORT ListingFilterExtension : public QObject
85 {
86  Q_OBJECT
87 
88 public:
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 
149 private:
150  class ListingFilterExtensionPrivate;
151  ListingFilterExtension* const d;
152 };
153 
165 class KPARTS_EXPORT ListingNotificationExtension : public QObject
166 {
167  Q_OBJECT
168 
169 public:
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 
200 Q_SIGNALS:
205  void listingEvent(KParts::ListingNotificationExtension::NotificationEventType, const KFileItemList&);
206 
207 private:
208  class ListingNotificationExtensionPrivate;
209  ListingNotificationExtension* const d;
210 };
211 
212 }
213 
214 Q_DECLARE_OPERATORS_FOR_FLAGS(KParts::ListingFilterExtension::FilterModes)
215 Q_DECLARE_OPERATORS_FOR_FLAGS(KParts::ListingNotificationExtension::NotificationEventTypes)
216 
217 #endif /* KPARTS_LISTINGEXTENSION_H */
KParts::ListingNotificationExtension::NotificationEventType
NotificationEventType
Supported notification event types.
Definition: listingextension.h:173
KParts::ListingNotificationExtension
an extension for receiving listing change notification.
Definition: listingextension.h:165
None
QObject
KFileItemList
KParts::ListingFilterExtension::FilterMode
FilterMode
Supported file filtering modes modes.
Definition: listingextension.h:92
KParts::ListingFilterExtension
an extension for filtering listings.
Definition: listingextension.h:84
KParts::ReadOnlyPart
Base class for any "viewer" part.
Definition: part.h:488
QVariant
kparts_export.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:25:36 by doxygen 1.8.7 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 API Reference

Skip menu "kdelibs 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

Search



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