Changeset View
Changeset View
Standalone View
Standalone View
src/panels/panel.h
Show All 18 Lines | |||||
19 | ***************************************************************************/ | 19 | ***************************************************************************/ | ||
20 | 20 | | |||
21 | #ifndef PANEL_H | 21 | #ifndef PANEL_H | ||
22 | #define PANEL_H | 22 | #define PANEL_H | ||
23 | 23 | | |||
24 | #include <QUrl> | 24 | #include <QUrl> | ||
25 | #include <QWidget> | 25 | #include <QWidget> | ||
26 | 26 | | |||
27 | class KFileItem; | ||||
28 | class KFileItemList; | ||||
29 | | ||||
27 | /** | 30 | /** | ||
28 | * @brief Base widget for all panels that can be docked on the window borders. | 31 | * @brief Base widget for all panels that can be docked on the window borders. | ||
29 | * | 32 | * | ||
30 | * Derived panels should provide a context menu that at least offers the | 33 | * Derived panels should provide a context menu that at least offers the | ||
31 | * actions from Panel::customContextMenuActions(). | 34 | * actions from Panel::customContextMenuActions(). | ||
32 | */ | 35 | */ | ||
33 | class Panel : public QWidget | 36 | class Panel : public QWidget | ||
34 | { | 37 | { | ||
Show All 11 Lines | 40 | public: | |||
46 | * context menu actions. Allows an application to apply custom actions to | 49 | * context menu actions. Allows an application to apply custom actions to | ||
47 | * the panel. | 50 | * the panel. | ||
48 | */ | 51 | */ | ||
49 | void setCustomContextMenuActions(const QList<QAction*>& actions); | 52 | void setCustomContextMenuActions(const QList<QAction*>& actions); | ||
50 | QList<QAction*> customContextMenuActions() const; | 53 | QList<QAction*> customContextMenuActions() const; | ||
51 | 54 | | |||
52 | QSize sizeHint() const override; | 55 | QSize sizeHint() const override; | ||
53 | 56 | | |||
57 | signals: | ||||
58 | | ||||
59 | /** | ||||
60 | * Use it to ask the main view to open a context menu | ||||
61 | */ | ||||
62 | void requestOpenContextMenu(const QPoint& pos, | ||||
63 | const KFileItem& item, | ||||
64 | const QUrl& url, | ||||
65 | const QList<QAction*>& customActions, | ||||
66 | const KFileItemList& selection); | ||||
67 | | ||||
54 | public slots: | 68 | public slots: | ||
55 | /** | 69 | /** | ||
56 | * This is invoked every time the folder being displayed in the | 70 | * This is invoked every time the folder being displayed in the | ||
57 | * active Dolphin view changes. | 71 | * active Dolphin view changes. | ||
58 | */ | 72 | */ | ||
59 | void setUrl(const QUrl &url); | 73 | void setUrl(const QUrl &url); | ||
60 | 74 | | |||
61 | /** | 75 | /** | ||
Show All 20 Lines |