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>
32 class DolphinPartBrowserExtension
: public KParts::BrowserExtension
36 explicit DolphinPartBrowserExtension( DolphinPart
* part
);
37 void restoreState(QDataStream
&stream
) override
;
38 void saveState(QDataStream
&stream
) override
;
44 void pasteTo(const QUrl
&);
45 void reparseConfiguration();
51 class DolphinPartFileInfoExtension
: public KParts::FileInfoExtension
56 explicit DolphinPartFileInfoExtension(DolphinPart
* part
);
58 QueryModes
supportedQueryModes() const override
;
59 bool hasSelection() const override
;
61 KFileItemList
queryFor(QueryMode mode
) const override
;
67 class DolphinPartListingFilterExtension
: public KParts::ListingFilterExtension
72 explicit DolphinPartListingFilterExtension(DolphinPart
* part
);
73 FilterModes
supportedFilterModes() const override
;
74 bool supportsMultipleFilters(FilterMode mode
) const override
;
75 QVariant
filter(FilterMode mode
) const override
;
76 void setFilter(FilterMode mode
, const QVariant
& filter
) override
;
82 class DolphinPartListingNotificationExtension
: public KParts::ListingNotificationExtension
87 explicit DolphinPartListingNotificationExtension(DolphinPart
* part
);
88 NotificationEventTypes
supportedNotificationEventTypes() const override
;
91 void slotNewItems(const KFileItemList
&);
92 void slotItemsDeleted(const KFileItemList
&);