1 /* This file is part of the KDE project
2 * Copyright (c) 2012 Dawit Alemayehu <adawit@kde.org>
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.
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.
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.
20 #ifndef DOLPHINPART_EXT_H
21 #define DOLPHINPART_EXT_H
23 #include <kparts/browserextension.h>
24 #include <kparts/fileinfoextension.h>
25 #include <kparts/listingfilterextension.h>
26 #include <kparts/listingnotificationextension.h>
31 class DolphinPartBrowserExtension
: public KParts::BrowserExtension
35 DolphinPartBrowserExtension( DolphinPart
* part
);
36 void restoreState(QDataStream
&stream
) override
;
37 void saveState(QDataStream
&stream
) override
;
43 void pasteTo(const QUrl
&);
44 void reparseConfiguration();
50 class DolphinPartFileInfoExtension
: public KParts::FileInfoExtension
55 DolphinPartFileInfoExtension(DolphinPart
* part
);
57 QueryModes
supportedQueryModes() const override
;
58 bool hasSelection() const override
;
60 KFileItemList
queryFor(QueryMode mode
) const override
;
66 class DolphinPartListingFilterExtension
: public KParts::ListingFilterExtension
71 DolphinPartListingFilterExtension(DolphinPart
* part
);
72 FilterModes
supportedFilterModes() const override
;
73 bool supportsMultipleFilters(FilterMode mode
) const override
;
74 QVariant
filter(FilterMode mode
) const override
;
75 void setFilter(FilterMode mode
, const QVariant
& filter
) override
;
81 class DolphinPartListingNotificationExtension
: public KParts::ListingNotificationExtension
86 DolphinPartListingNotificationExtension(DolphinPart
* part
);
87 NotificationEventTypes
supportedNotificationEventTypes() const override
;
90 void slotNewItems(const KFileItemList
&);
91 void slotItemsDeleted(const KFileItemList
&);