3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * \author Abdelrazak Younes
8 * Full author contact details are available in file CREDITS.
15 #include "FuncRequest.h"
16 #include "FuncStatus.h"
18 #include "qt_helpers.h"
20 #include "support/debug.h"
21 #include "support/lstrings.h"
27 Action::Action(QIcon const & icon,
28 QString const & text, FuncRequest const & func,
29 QString const & tooltip, QObject * parent)
30 : QAction(parent), func_(func)
32 // only Qt/Mac handles that
37 setStatusTip(tooltip);
38 connect(this, SIGNAL(triggered()), this, SLOT(action()));
45 FuncStatus const status = getStatus(func_);
47 if (status.onOff(true)) {
50 } else if (status.onOff(false)) {
57 setEnabled(status.enabled());
63 //LYXERR(Debug::ACTION, "calling lyx::dispatch: func_: ");
69 } // namespace frontend
72 #include "moc_Action.cpp"