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"
19 #include "qt_helpers.h"
21 #include "support/debug.h"
22 #include "support/lstrings.h"
28 Action::Action(GuiView * lyxView, QIcon const & icon,
29 QString const & text, FuncRequest const & func,
30 QString const & tooltip, QObject * parent)
31 : QAction(parent), func_(func), lyxView_(lyxView)
33 // only Qt/Mac handles that
38 setStatusTip(tooltip);
39 connect(this, SIGNAL(triggered()), this, SLOT(action()));
46 FuncStatus const status = getStatus(func_);
48 if (status.onoff(true)) {
51 } else if (status.onoff(false)) {
58 setEnabled(status.enabled());
64 //LYXERR(Debug::ACTION, "calling LyXFunc::dispatch: func_: ");
70 } // namespace frontend
73 #include "moc_Action.cpp"