]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/Action.h
cosmetics
[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 namespace lyx {
18
19 class FuncRequest;
20
21 namespace frontend {
22
23 class GuiViewBase;
24
25 /**
26  * Action - Qt interface with LyX' FuncRequest.
27  *
28  * Action can be used in LyX menubar and/or toolbars.
29  */
30 class Action : public QAction
31 {
32         Q_OBJECT
33
34 public:
35         Action(GuiViewBase & lyxView, QString const & icon, QString const & text,
36                 FuncRequest const & func, QString const & tooltip);
37
38         void update();
39
40 Q_SIGNALS:
41         /// the current action is triggered
42         void triggered(QAction *);
43
44 private Q_SLOTS:
45         void action();
46
47 private:
48         FuncRequest const & func_ ;
49         GuiViewBase & lyxView_;
50 };
51
52
53 } // namespace frontend
54 } // namespace lyx
55
56 #endif // ACTION_H