1 /***************************************************************************
2 * Copyright (C) 2006 by Peter Penz <peter.penz@gmx.at> *
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
23 #include <QtCore/QObject>
29 * @brief Represents the context menu which appears when doing a right
30 * click on an item of the treeview.
32 class TreeViewContextMenu
: public QObject
38 * @parent Pointer to the folders panel the context menu
40 * @fileInfo Pointer to the file item the context menu
41 * is applied. If 0 is passed, the context menu
42 * is above the viewport.
44 TreeViewContextMenu(FoldersPanel
* parent
,
45 const KFileItem
& fileInfo
);
47 virtual ~TreeViewContextMenu();
49 /** Opens the context menu modal. */
53 /** Cuts the item m_fileInfo. */
56 /** Copies the item m_fileInfo. */
59 /** Paste the clipboard to m_fileInfo. */
62 /** Renames the item m_fileInfo. */
65 /** Moves the item m_fileInfo to the trash. */
68 /** Deletes the item m_fileInfo. */
71 /** Shows the properties of the item m_fileInfo. */
72 void showProperties();
75 * Sets the 'Show Hidden Files' setting for the
76 * folders panel to \a show.
78 void setShowHiddenFiles(bool show
);
81 void populateMimeData(QMimeData
* mimeData
, bool cut
);
84 FoldersPanel
* m_parent
;