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