]> cloud.milkyroute.net Git - dolphin.git/blob - src/dolphinpart.h
don't use the term "Bookmarks" anymore, use "Places" instead (includes devices etc.)
[dolphin.git] / src / dolphinpart.h
1 /* This file is part of the KDE project
2 Copyright (c) 2007 David Faure <faure@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 DOLPHINPART_H
21 #define DOLPHINPART_H
22
23 #include <kparts/part.h>
24 class KFileItem;
25 class DolphinPartBrowserExtension;
26 class DolphinSortFilterProxyModel;
27 class KDirModel;
28 class KDirLister;
29 class DolphinView;
30 class QLineEdit;
31 class KAboutData;
32 namespace KParts { class ReadOnlyPart; }
33
34 class DolphinPart : public KParts::ReadOnlyPart
35 {
36 Q_OBJECT
37
38 public:
39 explicit DolphinPart(QWidget* parentWidget, QObject* parent, const QStringList& args);
40 ~DolphinPart();
41
42 static KAboutData* createAboutData();
43
44 virtual bool openUrl(const KUrl& url);
45
46 protected:
47 virtual bool openFile() { return true; }
48
49 private Q_SLOTS:
50 void slotCompleted(const KUrl& url);
51 void slotCanceled(const KUrl& url);
52 void slotInfoMessage(const QString& msg);
53 void slotErrorMessage(const QString& msg);
54 void slotRequestItemInfo(const KFileItem& item);
55
56 private:
57 DolphinView* m_view;
58 KDirLister* m_dirLister;
59 KDirModel* m_dirModel;
60 DolphinSortFilterProxyModel* m_proxyModel;
61 DolphinPartBrowserExtension* m_extension;
62 Q_DISABLE_COPY(DolphinPart)
63 };
64
65
66 #endif /* DOLPHINPART_H */
67