Modified:
lyx-devel/trunk/src/frontends/qt4/Action.C
lyx-devel/trunk/src/frontends/qt4/Action.h
lyx-devel/trunk/src/frontends/qt4/QLToolbar.C
Modified: lyx-devel/trunk/src/frontends/qt4/Action.C
URL:
http://www.lyx.org/trac/file/lyx-devel/trunk/src/frontends/qt4/Action.C?rev=16807
==============================================================================
--- lyx-devel/trunk/src/frontends/qt4/Action.C (original)
+++ lyx-devel/trunk/src/frontends/qt4/Action.C Mon Jan 22 12:31:42 2007
@@ -12,14 +12,13 @@
#include "Action.h"
+#include "GuiView.h"
+#include "qt_helpers.h"
+
#include "lyx_cb.h"
#include "lyxfunc.h"
#include "FuncStatus.h"
#include "debug.h"
-
-#include "frontends/LyXView.h"
-
-#include "qt_helpers.h"
#include "support/lstrings.h"
@@ -40,9 +39,9 @@
} // namespace anon
-Action::Action(LyXView & lyxView, docstring const & text,
+Action::Action(GuiView & lyxView, docstring const & text,
FuncRequest const & func, docstring const & tooltip)
- : QAction(this), func_(func), lyxView_(lyxView)
+ : QAction(&lyxView), func_(func), lyxView_(lyxView)
{
setText(toqstr(text));
setToolTip(toqstr(tooltip));
@@ -51,9 +50,9 @@
update();
}
-Action::Action(LyXView & lyxView, string const & icon, docstring const & text,
+Action::Action(GuiView & lyxView, string const & icon, docstring const & text,
FuncRequest const & func, docstring const & tooltip)
- : QAction(this), func_(func), lyxView_(lyxView)
+ : QAction(&lyxView), func_(func), lyxView_(lyxView)
{
setIcon(QPixmap(icon.c_str()));
setText(toqstr(text));
Modified: lyx-devel/trunk/src/frontends/qt4/Action.h
URL:
http://www.lyx.org/trac/file/lyx-devel/trunk/src/frontends/qt4/Action.h?rev=16807
==============================================================================
--- lyx-devel/trunk/src/frontends/qt4/Action.h (original)
+++ lyx-devel/trunk/src/frontends/qt4/Action.h Mon Jan 22 12:31:42 2007
@@ -26,6 +26,8 @@
namespace lyx {
namespace frontend {
+class GuiView;
+
/**
* Action - Qt interface with LyX' FuncRequest.
*
@@ -35,10 +37,10 @@
Q_OBJECT
public:
- Action(LyXView & lyxView, lyx::docstring const & text,
+ Action(GuiView & lyxView, lyx::docstring const & text,
FuncRequest const & func, lyx::docstring const & tooltip =
lyx::docstring());
- Action(LyXView & lyxView, std::string const & icon, lyx::docstring const & text,
+ Action(GuiView & lyxView, std::string const & icon, lyx::docstring const
& text,
FuncRequest const & func, lyx::docstring const & tooltip =
lyx::docstring());
void update();
@@ -50,8 +52,7 @@
private:
FuncRequest const & func_ ;
- //FuncRequest func_ ;
- LyXView & lyxView_;
+ GuiView & lyxView_;
};
Modified: lyx-devel/trunk/src/frontends/qt4/QLToolbar.C
URL:
http://www.lyx.org/trac/file/lyx-devel/trunk/src/frontends/qt4/QLToolbar.C?rev=16807
==============================================================================
--- lyx-devel/trunk/src/frontends/qt4/QLToolbar.C (original)
+++ lyx-devel/trunk/src/frontends/qt4/QLToolbar.C Mon Jan 22 12:31:42 2007
@@ -193,7 +193,11 @@
if (lyx::getStatus(func).unknown())
break;
- Action * action = new Action(owner_, toolbarbackend.getIcon(func), lyx::docstring(), func, tooltip);
+ Action * action = new Action(owner_,
+ toolbarbackend.getIcon(func),
+ tooltip,
+ func,
+ tooltip);
addAction(action);
ActionVector.push_back(action);
break;