]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/Action.h
* fix spelling in comments to please John.
[lyx.git] / src / frontends / qt4 / Action.h
1 // -*- C++ -*-
2 /**
3  * \file Action.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Abdelrazak Younes
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef ACTION_H
13 #define ACTION_H
14
15 #include <QAction>
16
17 class QIcon;
18
19 namespace lyx {
20
21 class FuncRequest;
22
23 namespace frontend {
24
25 class GuiView;
26
27 /**
28  * Action - Qt interface with LyX' FuncRequest.
29  *
30  * Action can be used in LyX menubar and/or toolbars.
31  */
32 class Action : public QAction
33 {
34         Q_OBJECT
35
36 public:
37         Action(GuiView * lyxView, QIcon const & icon, QString const & text,
38                 FuncRequest const & func, QString const & tooltip, QObject * parent);
39
40         void update();
41
42 Q_SIGNALS:
43         /// the current action is triggered
44         void triggered(QAction *);
45
46 private Q_SLOTS:
47         void action();
48
49 private:
50         FuncRequest const & func_ ;
51         GuiView * lyxView_;
52 };
53
54
55 } // namespace frontend
56 } // namespace lyx
57
58 #endif // ACTION_H