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);
46 void setRtlIcon(QIcon const & icon) { rtlIcon_ = icon; }
51 /// the current action is triggered
52 void triggered(QAction *);
58 void init(QString const & text, QString const & tooltip);
59 std::shared_ptr<FuncRequest const> func_;
65 } // namespace frontend