1
#ifndef HOTKEYS_CONTEXT_MENU_H
2
#define HOTKEYS_CONTEXT_MENU_H
4
* Copyright (C) 2009 Michael Jansen <kde@michael-jansen.biz>
6
* This library is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU Library General Public
8
* License as published by the Free Software Foundation; either
9
* version 2 of the License, or (at your option) any later version.
11
* This library is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
* Library General Public License for more details.
16
* You should have received a copy of the GNU Library General Public License
17
* along with this library; see the file COPYING.LIB. If not, write to
18
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19
* Boston, MA 02110-1301, USA.
22
#include "triggers/triggers.h"
23
#include "actions/actions.h"
25
#include "libkhotkeysfwd.h"
27
#include <QtGui/QMenu>
28
#include <QtCore/QModelIndex>
31
class HotkeysTreeView;
37
class HotkeysTreeViewContextMenu : public QMenu
43
HotkeysTreeViewContextMenu( const QModelIndex &index, HotkeysTreeView *parent = 0 );
44
HotkeysTreeViewContextMenu( HotkeysTreeView *parent = 0 );
46
virtual ~HotkeysTreeViewContextMenu();
48
//! Create a submenu per allowed trigger type
49
void createTriggerMenus(
50
KHotKeys::Trigger::TriggerTypes triggerTypes,
51
KHotKeys::Action::ActionTypes actionTypes);
53
//! Populate a trigger menu
54
void populateTriggerMenu(QMenu *menu, QSignalMapper *mapper, KHotKeys::Action::ActionTypes types);
58
void slotAboutToShow();
59
void slotAboutToShowForCurrent();
65
void newGlobalShortcutActionAction(int);
66
void newWindowTriggerActionAction(int);
67
void newMouseGestureTriggerActionAction(int);
68
void newGroupAction();
72
KHotKeys::Action* createActionFromType(
74
KHotKeys::SimpleActionData *data) const;
77
HotkeysTreeView *_view;
82
#endif /* HOTKEYS_CONTEXT_MENU_H */