Fixes: - API doc for ActionManager and remove some deprecated things
[qt-creator-color-themes.git] / src / plugins / coreplugin / actionmanager / actionmanager.h
blobdde731c8436532e738519e03d572417ab3e9b6d9
1 /***************************************************************************
2 **
3 ** This file is part of Qt Creator
4 **
5 ** Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
6 **
7 ** Contact: Qt Software Information (qt-info@nokia.com)
8 **
9 **
10 ** Non-Open Source Usage
12 ** Licensees may use this file in accordance with the Qt Beta Version
13 ** License Agreement, Agreement version 2.2 provided with the Software or,
14 ** alternatively, in accordance with the terms contained in a written
15 ** agreement between you and Nokia.
17 ** GNU General Public License Usage
19 ** Alternatively, this file may be used under the terms of the GNU General
20 ** Public License versions 2.0 or 3.0 as published by the Free Software
21 ** Foundation and appearing in the file LICENSE.GPL included in the packaging
22 ** of this file. Please review the following information to ensure GNU
23 ** General Public Licensing requirements will be met:
25 ** http://www.fsf.org/licensing/licenses/info/GPLv2.html and
26 ** http://www.gnu.org/copyleft/gpl.html.
28 ** In addition, as a special exception, Nokia gives you certain additional
29 ** rights. These rights are described in the Nokia Qt GPL Exception
30 ** version 1.3, included in the file GPL_EXCEPTION.txt in this package.
32 ***************************************************************************/
34 #ifndef ACTIONMANAGER_H
35 #define ACTIONMANAGER_H
37 #include "coreplugin/core_global.h"
39 #include <coreplugin/actionmanager/iactioncontainer.h>
40 #include <coreplugin/actionmanager/icommand.h>
42 #include <QtCore/QObject>
43 #include <QtCore/QList>
45 QT_BEGIN_NAMESPACE
46 class QAction;
47 class QShortcut;
48 class QString;
49 QT_END_NAMESPACE
51 namespace Core {
53 class CORE_EXPORT ActionManager : public QObject
55 Q_OBJECT
56 public:
57 ActionManager(QObject *parent = 0) : QObject(parent) {}
58 virtual ~ActionManager() {}
60 virtual IActionContainer *createMenu(const QString &id) = 0;
61 virtual IActionContainer *createMenuBar(const QString &id) = 0;
63 virtual ICommand *registerAction(QAction *action, const QString &id, const QList<int> &context) = 0;
64 virtual ICommand *registerShortcut(QShortcut *shortcut, const QString &id, const QList<int> &context) = 0;
66 virtual ICommand *command(const QString &id) const = 0;
67 virtual IActionContainer *actionContainer(const QString &id) const = 0;
70 } // namespace Core
72 #endif // ACTIONMANAGER_H