]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/Action.h
On Linux show in crash message box the backtrace
[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 /**
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(QIcon const & icon, QString const & text,
36                 FuncRequest const & func, QString const & tooltip, QObject * parent);
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 };
50
51
52 } // namespace frontend
53 } // namespace lyx
54
55 #endif // ACTION_H