]>
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
,
34 const KFileItem
& fileInfo
);
36 ~TreeViewContextMenu() override
;
38 /** Opens the context menu modal. */
39 void open(const QPoint
& pos
);
42 /** Cuts the item m_fileItem. */
45 /** Copies the item m_fileItem. */
48 /** Paste the clipboard to m_fileItem. */
51 /** Renames the item m_fileItem. */
54 /** Moves the item m_fileItem to the trash. */
57 /** Deletes the item m_fileItem. */
60 /** Shows the properties of the item m_fileItem. */
61 void showProperties();
64 * Sets the 'Show Hidden Files' setting for the
65 * folders panel to \a show.
67 void setShowHiddenFiles(bool show
);
70 * Sets the 'Limit folders panel to home' setting for the
71 * folders panel to \a enable.
73 void setLimitFoldersPanelToHome(bool enable
);
76 * Sets the 'Automatic Scrolling' setting for the
77 * folders panel to \a enable.
79 void setAutoScrolling(bool enable
);
82 void populateMimeData(QMimeData
* mimeData
, bool cut
);
85 FoldersPanel
* m_parent
;