]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/Action.h
ba00167e0e709551b23b9a91e18ce84373a40b47
[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 // Must be here because of moc.
16 #include <config.h>
17
18 #include "frontends/LyXView.h"
19 #include "funcrequest.h"
20
21 #include <QAction>
22
23 //class FuncRequest;
24
25 //class string;
26
27 namespace lyx {
28 namespace frontend {
29
30 /**
31  * Action - Qt interface with LyX' FuncRequest.
32  *
33  * Action can be used in LyX menubar and/or toolbars.
34  */
35 class Action: public QAction {
36         Q_OBJECT
37 public:
38
39         Action(LyXView & lyxView, std::string const & text,
40                 FuncRequest const & func, std::string const & tooltip="");
41
42         Action(LyXView & lyxView, std::string const & icon, std::string const & text,
43                 FuncRequest const & func, std::string const & tooltip="");
44
45         void update();
46
47 //      void setAction(FuncRequest const & func);
48
49 private Q_SLOTS:
50         void action();
51
52 private:
53         FuncRequest const & func_ ;
54         //FuncRequest func_ ;
55         LyXView & lyxView_;
56 };
57
58
59 } // namespace frontend
60 } // namespace lyx
61
62 #endif // ACTION_H