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

KParts

listingextension.h
Go to the documentation of this file.
00001 /* This file is part of the KDE project
00002    Copyright (C) 2012 Dawit Alemayehu <adawit@kde.org>
00003 
00004    This library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Library General Public
00006    License as published by the Free Software Foundation; either
00007    version 2 of the License, or (at your option) any later version.
00008 
00009    This library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Library General Public License for more details.
00013 
00014    You should have received a copy of the GNU Library General Public License
00015    along with this library; see the file COPYING.LIB.  If not, write to
00016    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017    Boston, MA 02110-1301, USA.
00018  */
00019 
00020 #ifndef KPARTS_LISTINGEXTENSION_H
00021 #define KPARTS_LISTINGEXTENSION_H
00022 
00023 #include <QtCore/QObject>
00024 
00025 #include <kparts/kparts_export.h>
00026 
00027 
00028 class KFileItemList;
00029 
00030 namespace KParts
00031 {
00032 
00033 class ReadOnlyPart;
00034 
00084 class KPARTS_EXPORT ListingFilterExtension : public QObject
00085 {
00086     Q_OBJECT
00087 
00088 public:
00092     enum FilterMode  {
00093         None = 0x00,
00094         MimeType = 0x01,        
00095         SubString = 0x02,       
00096         WildCard = 0x04         
00097     };
00098 
00099     Q_DECLARE_FLAGS(FilterModes, FilterMode)
00100 
00101     
00102     ListingFilterExtension(KParts::ReadOnlyPart* parent);
00103 
00105     virtual ~ListingFilterExtension();
00106 
00110     static ListingFilterExtension *childObject(QObject* obj);
00111 
00118     virtual FilterModes supportedFilterModes() const;
00119 
00126     virtual bool supportsMultipleFilters(FilterMode mode) const;
00127 
00133     virtual QVariant filter(FilterMode mode) const = 0;
00134 
00147     virtual void setFilter(FilterMode mode, const QVariant& filter) = 0;
00148 
00149 private:
00150     class ListingFilterExtensionPrivate;
00151     ListingFilterExtension* const d;
00152 };
00153 
00165 class KPARTS_EXPORT ListingNotificationExtension : public QObject
00166 {
00167     Q_OBJECT
00168 
00169 public:
00173     enum NotificationEventType {
00174         None = 0x00,
00175         ItemsAdded = 0x01,      
00176         ItemsDeleted = 0x02     
00177     };
00178 
00179     Q_DECLARE_FLAGS(NotificationEventTypes, NotificationEventType)
00180 
00181     
00182     ListingNotificationExtension(KParts::ReadOnlyPart* parent);
00183 
00185     virtual ~ListingNotificationExtension();
00186 
00193     virtual NotificationEventTypes supportedNotificationEventTypes() const;
00194 
00198     static ListingNotificationExtension *childObject(QObject* obj);
00199 
00200 Q_SIGNALS:
00205     void listingEvent(KParts::ListingNotificationExtension::NotificationEventType, const KFileItemList&);
00206 
00207 private:
00208     class ListingNotificationExtensionPrivate;
00209     ListingNotificationExtension* const d;
00210 };
00211 
00212 }
00213 
00214 Q_DECLARE_OPERATORS_FOR_FLAGS(KParts::ListingFilterExtension::FilterModes)
00215 Q_DECLARE_OPERATORS_FOR_FLAGS(KParts::ListingNotificationExtension::NotificationEventTypes)
00216 
00217 #endif /* KPARTS_LISTINGEXTENSION_H */
This file is part of the KDE documentation.
Documentation copyright © 1996-2019 The KDE developers.
Generated on Mon Jan 21 2019 12:36:35 by doxygen 1.7.5.1 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.9.5 API Reference

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