]>
cloud.milkyroute.net Git - dolphin.git/blob - src/panels/folders/treeviewcontextmenu.h
2 * SPDX-FileCopyrightText: 2006 Peter Penz <peter.penz19@gmail.com>
4 * SPDX-License-Identifier: GPL-2.0-or-later
7 #ifndef TREEVIEWCONTEXTMENU_H
8 #define TREEVIEWCONTEXTMENU_H
18 * @brief Represents the context menu which appears when doing a right
19 * click on an item of the treeview.
21 class TreeViewContextMenu
: public QObject
27 * @parent Pointer to the folders panel the context menu
29 * @fileInfo Pointer to the file item the context menu
30 * is applied. If 0 is passed, the context menu
31 * is above the viewport.
33 TreeViewContextMenu(FoldersPanel
*parent
, const KFileItem
&fileInfo
);
35 ~TreeViewContextMenu() override
;
37 /** Opens the context menu modal. */
38 void open(const QPoint
&pos
);
41 /** Cuts the item m_fileItem. */
44 /** Copies the item m_fileItem. */
47 /** Paste the clipboard to m_fileItem. */
50 /** Renames the item m_fileItem. */
53 /** Moves the item m_fileItem to the trash. */
56 /** Deletes the item m_fileItem. */
59 /** Shows the properties of the item m_fileItem. */
60 void showProperties();
63 * Sets the 'Show Hidden Files' setting for the
64 * folders panel to \a show.
66 void setShowHiddenFiles(bool show
);
69 * Sets the 'Limit folders panel to home' setting for the
70 * folders panel to \a enable.
72 void setLimitFoldersPanelToHome(bool enable
);
75 * Sets the 'Automatic Scrolling' setting for the
76 * folders panel to \a enable.
78 void setAutoScrolling(bool enable
);
81 void populateMimeData(QMimeData
*mimeData
, bool cut
);
84 FoldersPanel
*m_parent
;