]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/Action.h
* fix spelling in comments to please John.
[lyx.git] / src / frontends / qt4 / Action.h
index ba00167e0e709551b23b9a91e18ce84373a40b47..11a862b7887f278149638a74d16dac6c5e7bf0fd 100644 (file)
 #ifndef ACTION_H
 #define ACTION_H
 
-// Must be here because of moc.
-#include <config.h>
-
-#include "frontends/LyXView.h"
-#include "funcrequest.h"
-
 #include <QAction>
 
-//class FuncRequest;
-
-//class string;
+class QIcon;
 
 namespace lyx {
+
+class FuncRequest;
+
 namespace frontend {
 
+class GuiView;
+
 /**
  * Action - Qt interface with LyX' FuncRequest.
  *
  * Action can be used in LyX menubar and/or toolbars.
  */
-class Action: public QAction {
+class Action : public QAction
+{
        Q_OBJECT
-public:
 
-       Action(LyXView & lyxView, std::string const & text,
-               FuncRequest const & func, std::string const & tooltip="");
-
-       Action(LyXView & lyxView, std::string const & icon, std::string const & text,
-               FuncRequest const & func, std::string const & tooltip="");
+public:
+       Action(GuiView * lyxView, QIcon const & icon, QString const & text,
+               FuncRequest const & func, QString const & tooltip, QObject * parent);
 
        void update();
 
-//     void setAction(FuncRequest const & func);
+Q_SIGNALS:
+       /// the current action is triggered
+       void triggered(QAction *);
 
 private Q_SLOTS:
        void action();
 
 private:
        FuncRequest const & func_ ;
-       //FuncRequest func_ ;
-       LyXView & lyxView_;
+       GuiView * lyxView_;
 };