Changeset View
Changeset View
Standalone View
Standalone View
src/dolphincontextmenu.h
Show All 14 Lines | |||||
15 | * along with this program; if not, write to the * | 15 | * along with this program; if not, write to the * | ||
16 | * Free Software Foundation, Inc., * | 16 | * Free Software Foundation, Inc., * | ||
17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * | 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * | ||
18 | ***************************************************************************/ | 18 | ***************************************************************************/ | ||
19 | 19 | | |||
20 | #ifndef DOLPHINCONTEXTMENU_H | 20 | #ifndef DOLPHINCONTEXTMENU_H | ||
21 | #define DOLPHINCONTEXTMENU_H | 21 | #define DOLPHINCONTEXTMENU_H | ||
22 | 22 | | |||
23 | #include "config-kactivities-stats.h" | ||||
24 | | ||||
23 | #include <KFileCopyToMenu> | 25 | #include <KFileCopyToMenu> | ||
24 | #include <KFileItem> | 26 | #include <KFileItem> | ||
25 | 27 | | |||
26 | #include <QMenu> | 28 | #include <QMenu> | ||
27 | #include <QUrl> | 29 | #include <QUrl> | ||
28 | 30 | | |||
29 | class QAction; | 31 | class QAction; | ||
30 | class DolphinMainWindow; | 32 | class DolphinMainWindow; | ||
▲ Show 20 Lines • Show All 113 Lines • ▼ Show 20 Line(s) | 136 | private: | |||
144 | 146 | | |||
145 | enum ContextType | 147 | enum ContextType | ||
146 | { | 148 | { | ||
147 | NoContext = 0, | 149 | NoContext = 0, | ||
148 | ItemContext = 1, | 150 | ItemContext = 1, | ||
149 | TrashContext = 2, | 151 | TrashContext = 2, | ||
150 | TimelineContext = 4, | 152 | TimelineContext = 4, | ||
151 | SearchContext = 8, | 153 | SearchContext = 8, | ||
154 | RecenlyUsedContext = 16 | ||||
152 | }; | 155 | }; | ||
153 | 156 | | |||
154 | QPoint m_pos; | 157 | QPoint m_pos; | ||
155 | DolphinMainWindow* m_mainWindow; | 158 | DolphinMainWindow* m_mainWindow; | ||
156 | 159 | | |||
157 | KFileItem m_fileInfo; | 160 | KFileItem m_fileInfo; | ||
158 | 161 | | |||
159 | QUrl m_baseUrl; | 162 | QUrl m_baseUrl; | ||
160 | KFileItem* m_baseFileItem; /// File item for m_baseUrl | 163 | KFileItem* m_baseFileItem; /// File item for m_baseUrl | ||
161 | 164 | | |||
162 | KFileItemList m_selectedItems; | 165 | KFileItemList m_selectedItems; | ||
163 | mutable KFileItemListProperties* m_selectedItemsProperties; | 166 | mutable KFileItemListProperties* m_selectedItemsProperties; | ||
164 | 167 | | |||
165 | int m_context; | 168 | int m_context; | ||
166 | KFileCopyToMenu m_copyToMenu; | 169 | KFileCopyToMenu m_copyToMenu; | ||
167 | QList<QAction*> m_customActions; | 170 | QList<QAction*> m_customActions; | ||
168 | 171 | | |||
169 | Command m_command; | 172 | Command m_command; | ||
170 | 173 | | |||
171 | DolphinRemoveAction* m_removeAction; // Action that represents either 'Move To Trash' or 'Delete' | 174 | DolphinRemoveAction* m_removeAction; // Action that represents either 'Move To Trash' or 'Delete' | ||
172 | void addDirectoryItemContextMenu(KFileItemActions &fileItemActions); | 175 | void addDirectoryItemContextMenu(KFileItemActions &fileItemActions); | ||
173 | 176 | void addOpenParentFolderActionsContextMenu(); | |||
177 | void addRecentlyUsedActions(const KFileItem &item); | ||||
174 | }; | 178 | }; | ||
175 | 179 | | |||
176 | #endif | 180 | #endif |