]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/Action.h
move our stuff off the Q* namespace
[lyx.git] / src / frontends / qt4 / Action.h
index b5c501d82051458bf9610d4bc4d484d26bfb8172..79bf2b5ff07676e9d11f8952a6a1a6f29795d369 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>
+#include "FuncRequest.h"
 
-//class FuncRequest;
+#include "support/docstring.h"
 
-//class string;
+#include <QAction>
 
 namespace lyx {
 namespace frontend {
 
+class GuiViewBase;
+
 /**
  * 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(GuiViewBase & lyxView, docstring const & text,
+               FuncRequest const & func, docstring const & tooltip = docstring());
 
-       Action(LyXView & lyxView, std::string const & icon, std::string const & text,
-               FuncRequest const & func, std::string const & tooltip="");
+       Action(GuiViewBase & lyxView, std::string const & icon, docstring const & text,
+               FuncRequest const & func, docstring const & tooltip = docstring());
 
        void update();
 
 //     void setAction(FuncRequest const & func);
 
-private slots:
+Q_SIGNALS:
+       /// the current action is triggered
+       void triggered(QAction *);
+
+private Q_SLOTS:
        void action();
 
 private:
        FuncRequest const & func_ ;
-       //FuncRequest func_ ;
-       LyXView & lyxView_;
+       GuiViewBase & lyxView_;
 };