kwave  18.07.70
MenuManager.h
Go to the documentation of this file.
1 /***************************************************************************
2  MenuManager.h - manager class for Kwave's menu structure
3  -------------------
4  begin : Sun Jun 4 2000
5  copyright : (C) 2000 by Thomas Eschenbacher
6  email : Thomas.Eschenbacher@gmx.de
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef MENU_MANAGER_H
19 #define MENU_MANAGER_H
20 
21 #include "config.h"
22 
23 #include <QtGlobal>
24 #include <QMap>
25 #include <QObject>
26 
27 class QString;
28 class QWidget;
29 class QMenuBar;
30 
31 namespace Kwave
32 {
33 
34  class MenuRoot;
35 
46  class Q_DECL_EXPORT MenuManager: public QObject
47  {
48  Q_OBJECT
49  public:
55  MenuManager(QWidget *parent, QMenuBar &bar);
56 
58  virtual ~MenuManager();
59 
66  int executeCommand(const QString &command);
67 
72  void clearNumberedMenu(const QString &uid);
73 
82  void addNumberedMenuEntry(const QString &uid, const QString &entry,
83  const QString &param);
84 
92  void selectItem(const QString &group, const QString &uid);
93 
99  void setItemText(const QString &uid, const QString &text);
100 
107  void setItemVisible(const QString &uid, bool show);
108 
109  public slots:
110 
116  void setItemChecked(const QString &uid, bool check);
117 
123  void setItemEnabled(const QString &uid, bool enable);
124 
125  signals:
126 
132  void sigMenuCommand(const QString &command);
133 
134  private:
135 
138 
140  static QMap<QString, QKeySequence> m_standard_keys;
141 
142  };
143 }
144 
145 #endif // _MENU_MANAGER_H_
146 
147 //***************************************************************************
148 //***************************************************************************
Definition: App.h:33
Manager class for access to Kwave&#39;s menu subsystem.
Definition: MenuManager.h:46
static QMap< QString, QKeySequence > m_standard_keys
Definition: MenuManager.h:140
Kwave::MenuRoot * m_menu_root
Definition: MenuManager.h:137