4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Abdelrazak Younes
9 * Full author contact details are available in file CREDITS.
27 * Action - Qt interface with LyX' FuncRequest.
29 * Action can be used in LyX menubar and/or toolbars.
31 class Action : public QAction
36 // Makes a copy of func
37 Action(FuncRequest func, QIcon const & icon, QString const & text,
38 QString const & tooltip, QObject * parent);
40 // Takes shared ownership of func.
41 // Use for perf-sensitive code such as populating menus.
42 Action(std::shared_ptr<FuncRequest const> func,
43 QIcon const & icon, QString const & text,
44 QString const & tooltip, QObject * parent);
49 /// the current action is triggered
50 void triggered(QAction *);
56 void init(QIcon const & icon, QString const & text, QString const & tooltip);
57 std::shared_ptr<FuncRequest const> func_;
61 } // namespace frontend