]>
cloud.milkyroute.net Git - dolphin.git/blob - src/panels/folders/treeviewcontextmenu.h
1 /***************************************************************************
2 * Copyright (C) 2006 by Peter Penz <peter.penz19@gmail.com> *
4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation; either version 2 of the License, or *
7 * (at your option) any later version. *
9 * This program 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 *
12 * GNU General Public License for more details. *
14 * You should have received a copy of the GNU General Public License *
15 * along with this program; if not, write to the *
16 * Free Software Foundation, Inc., *
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
18 ***************************************************************************/
20 #ifndef TREEVIEWCONTEXTMENU_H
21 #define TREEVIEWCONTEXTMENU_H
30 * @brief Represents the context menu which appears when doing a right
31 * click on an item of the treeview.
33 class TreeViewContextMenu
: public QObject
39 * @parent Pointer to the folders panel the context menu
41 * @fileInfo Pointer to the file item the context menu
42 * is applied. If 0 is passed, the context menu
43 * is above the viewport.
45 TreeViewContextMenu(FoldersPanel
* parent
,
46 const KFileItem
& fileInfo
);
48 ~TreeViewContextMenu() override
;
50 /** Opens the context menu modal. */
54 /** Cuts the item m_fileItem. */
57 /** Copies the item m_fileItem. */
60 /** Paste the clipboard to m_fileItem. */
63 /** Renames the item m_fileItem. */
66 /** Moves the item m_fileItem to the trash. */
69 /** Deletes the item m_fileItem. */
72 /** Shows the properties of the item m_fileItem. */
73 void showProperties();
76 * Sets the 'Show Hidden Files' setting for the
77 * folders panel to \a show.
79 void setShowHiddenFiles(bool show
);
82 * Sets the 'Limit folders panel to home' setting for the
83 * folders panel to \a enable.
85 void setLimitFoldersPanelToHome(bool enable
);
88 * Sets the 'Automatic Scrolling' setting for the
89 * folders panel to \a enable.
91 void setAutoScrolling(bool enable
);
94 void populateMimeData(QMimeData
* mimeData
, bool cut
);
97 FoldersPanel
* m_parent
;