Transfer some more dialog related code from core to frontend:

- LFUN_INSET_APPLY handling goes to GuiView.
- Dialog needs a GuiView instead of a LyXView.




git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21734 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2007-11-23 09:44:02 +00:00
parent 5d2108ae33
commit 42015a8ebd
90 changed files with 240 additions and 242 deletions

View File

@ -539,6 +539,7 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const
case LFUN_DIALOG_SHOW:
case LFUN_DIALOG_UPDATE:
case LFUN_TOOLBAR_TOGGLE:
case LFUN_INSET_APPLY:
if (lyx_view_)
return lyx_view_->getStatus(cmd);
enable = false;
@ -586,29 +587,6 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const
&& (!buf->isClean() || buf->isExternallyModified(Buffer::timestamp_method));
break;
case LFUN_INSET_APPLY: {
if (!view()) {
enable = false;
break;
}
string const name = cmd.getArg(0);
Inset * inset = lyx_view_->getOpenInset(name);
if (inset) {
FuncRequest fr(LFUN_INSET_MODIFY, cmd.argument());
FuncStatus fs;
if (!inset->getStatus(view()->cursor(), fr, fs)) {
// Every inset is supposed to handle this
BOOST_ASSERT(false);
}
flag |= fs;
} else {
FuncRequest fr(LFUN_INSET_INSERT, cmd.argument());
flag |= getStatus(fr);
}
enable = flag.enabled();
break;
}
case LFUN_CITATION_INSERT: {
FuncRequest fr(LFUN_INSET_INSERT, "citation");
enable = getStatus(fr).enabled();
@ -876,8 +854,11 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
case LFUN_DIALOG_DISCONNECT_INSET:
case LFUN_DIALOG_HIDE:
case LFUN_DIALOG_SHOW:
case LFUN_INSET_APPLY:
BOOST_ASSERT(lyx_view_);
lyx_view_->dispatch(cmd);
if (lyx_view_->view())
updateFlags = lyx_view_->view()->cursor().result().update();
break;
case LFUN_WORD_FIND_FORWARD:
@ -1672,23 +1653,6 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
break;
}
case LFUN_INSET_APPLY: {
BOOST_ASSERT(lyx_view_);
string const name = cmd.getArg(0);
Inset * inset = lyx_view_->getOpenInset(name);
if (inset) {
FuncRequest fr(LFUN_INSET_MODIFY, argument);
inset->dispatch(view()->cursor(), fr);
} else {
FuncRequest fr(LFUN_INSET_INSERT, argument);
dispatch(fr);
}
// ideally, the update flag should be set by the insets,
// but this is not possible currently
updateFlags = Update::Force | Update::FitCursor;
break;
}
case LFUN_ALL_INSETS_TOGGLE: {
BOOST_ASSERT(lyx_view_);
string action;

View File

@ -74,7 +74,7 @@ public:
///
virtual FuncStatus getStatus(FuncRequest const & cmd) = 0;
/// dispatch to current BufferView
/// dispatch command.
virtual void dispatch(FuncRequest const & cmd) = 0;
///
@ -85,15 +85,6 @@ public:
//
virtual void errors(std::string const &) = 0;
//
// This View's Dialogs
//
///
virtual void disconnectDialog(std::string const & name) = 0;
///
virtual Inset * getOpenInset(std::string const & name) const = 0;
private:
/// noncopyable
LyXView(LyXView const &);

View File

@ -12,13 +12,13 @@
#include "Dialog.h"
#include "GuiView.h"
#include "Buffer.h"
#include "FuncRequest.h"
#include "FuncStatus.h"
#include "LyXFunc.h"
#include "LyXView.h"
namespace lyx {
namespace frontend {

View File

@ -24,7 +24,7 @@ class FuncRequest;
namespace frontend {
class LyXView;
class GuiView;
/** \enum KernelDocType used to flag the different kinds of buffer
* without making the kernel header files available to the
@ -47,7 +47,7 @@ public:
/// \param lv is the access point for the dialog to the LyX kernel.
/// \param name is the identifier given to the dialog by its parent
/// container.
Dialog(LyXView & lv) : lyxview_(&lv) {}
Dialog(GuiView & lv) : lyxview_(&lv) {}
virtual ~Dialog();
/** \name Container Access
@ -215,8 +215,8 @@ public:
* We should aim to reduce/remove these from the interface.
*/
//@{
LyXView & lyxview() { return *lyxview_; }
LyXView const & lyxview() const { return *lyxview_; }
GuiView & lyxview() { return *lyxview_; }
GuiView const & lyxview() const { return *lyxview_; }
Buffer & buffer();
Buffer const & buffer() const;
@ -229,7 +229,7 @@ protected:
virtual void apply() {}
private:
LyXView * lyxview_;
GuiView * lyxview_;
private:
/// intentionally unimplemented, therefore uncopiable

View File

@ -95,7 +95,7 @@ static QString version()
}
GuiAbout::GuiAbout(LyXView & lv)
GuiAbout::GuiAbout(GuiView & lv)
: GuiDialog(lv, "aboutlyx")
{
setupUi(this);
@ -114,7 +114,7 @@ GuiAbout::GuiAbout(LyXView & lv)
}
Dialog * createGuiAbout(LyXView & lv) { return new GuiAbout(lv); }
Dialog * createGuiAbout(GuiView & lv) { return new GuiAbout(lv); }
} // namespace frontend

View File

@ -24,7 +24,7 @@ class GuiAbout : public GuiDialog, public Ui::AboutUi
public:
// Constructor
GuiAbout(LyXView & lv);
GuiAbout(GuiView & lv);
// Controller stuff
bool initialiseParams(std::string const &) { return true; }

View File

@ -23,7 +23,7 @@ namespace lyx {
namespace frontend {
GuiBibitem::GuiBibitem(LyXView & lv)
GuiBibitem::GuiBibitem(GuiView & lv)
: GuiCommand(lv, "bibitem")
{
setupUi(this);
@ -78,7 +78,7 @@ bool GuiBibitem::isValid()
}
Dialog * createGuiBibitem(LyXView & lv) { return new GuiBibitem(lv); }
Dialog * createGuiBibitem(GuiView & lv) { return new GuiBibitem(lv); }
} // namespace frontend

View File

@ -26,7 +26,7 @@ class GuiBibitem : public GuiCommand, public Ui::BibitemUi
Q_OBJECT
public:
GuiBibitem(LyXView & lv);
GuiBibitem(GuiView & lv);
private Q_SLOTS:
void change_adaptor();

View File

@ -53,7 +53,7 @@ using support::split;
using support::trim;
GuiBibtex::GuiBibtex(LyXView & lv)
GuiBibtex::GuiBibtex(GuiView & lv)
: GuiCommand(lv, "bibtex")
{
setupUi(this);
@ -495,7 +495,7 @@ string const GuiBibtex::getStylefile() const
}
Dialog * createGuiBibtex(LyXView & lv) { return new GuiBibtex(lv); }
Dialog * createGuiBibtex(GuiView & lv) { return new GuiBibtex(lv); }
} // namespace frontend

View File

@ -44,7 +44,7 @@ class GuiBibtex : public GuiCommand, public Ui::BibtexUi
Q_OBJECT
public:
GuiBibtex(LyXView & lv);
GuiBibtex(GuiView & lv);
private Q_SLOTS:
void change_adaptor();

View File

@ -73,7 +73,7 @@ void box_gui_tokens_special_length(vector<string> & ids,
}
GuiBox::GuiBox(LyXView & lv)
GuiBox::GuiBox(GuiView & lv)
: GuiDialog(lv, "box"), params_("")
{
setupUi(this);
@ -436,7 +436,7 @@ void GuiBox::dispatchParams()
}
Dialog * createGuiBox(LyXView & lv) { return new GuiBox(lv); }
Dialog * createGuiBox(GuiView & lv) { return new GuiBox(lv); }
} // namespace frontend

View File

@ -28,7 +28,7 @@ class GuiBox : public GuiDialog, public Ui::BoxUi
Q_OBJECT
public:
GuiBox(LyXView & lv);
GuiBox(GuiView & lv);
private Q_SLOTS:
void change_adaptor();

View File

@ -33,7 +33,7 @@ using std::vector;
namespace lyx {
namespace frontend {
GuiBranch::GuiBranch(LyXView & lv)
GuiBranch::GuiBranch(GuiView & lv)
: GuiDialog(lv, "branch")
{
setupUi(this);
@ -111,7 +111,7 @@ void GuiBranch::dispatchParams()
}
Dialog * createGuiBranch(LyXView & lv) { return new GuiBranch(lv); }
Dialog * createGuiBranch(GuiView & lv) { return new GuiBranch(lv); }
} // namespace frontend

View File

@ -27,7 +27,7 @@ class GuiBranch : public GuiDialog, public Ui::BranchUi
Q_OBJECT
public:
GuiBranch(LyXView & lv);
GuiBranch(GuiView & lv);
private Q_SLOTS:
void change_adaptor();

View File

@ -36,7 +36,7 @@ namespace frontend {
using support::bformat;
GuiChanges::GuiChanges(LyXView & lv)
GuiChanges::GuiChanges(GuiView & lv)
: GuiDialog(lv, "changes")
{
setupUi(this);
@ -124,7 +124,7 @@ void GuiChanges::rejectChange()
}
Dialog * createGuiChanges(LyXView & lv) { return new GuiChanges(lv); }
Dialog * createGuiChanges(GuiView & lv) { return new GuiChanges(lv); }
} // namespace frontend

View File

@ -26,7 +26,7 @@ class GuiChanges : public GuiDialog, public Ui::ChangesUi
Q_OBJECT
public:
GuiChanges(LyXView & lv);
GuiChanges(GuiView & lv);
protected Q_SLOTS:
/// accept the current change

View File

@ -270,7 +270,7 @@ static vector<FamilyPair> const getFamilyData()
}
GuiCharacter::GuiCharacter(LyXView & lv)
GuiCharacter::GuiCharacter(GuiView & lv)
: GuiDialog(lv, "character"), font_(ignore_font),
toggleall_(false), reset_lang_(false)
{
@ -594,7 +594,7 @@ void GuiCharacter::setLanguage(string const & val)
}
Dialog * createGuiCharacter(LyXView & lv) { return new GuiCharacter(lv); }
Dialog * createGuiCharacter(GuiView & lv) { return new GuiCharacter(lv); }
} // namespace frontend

View File

@ -51,7 +51,7 @@ class GuiCharacter : public GuiDialog, public Ui::CharacterUi
Q_OBJECT
public:
GuiCharacter(LyXView & lv);
GuiCharacter(GuiView & lv);
protected Q_SLOTS:
void change_adaptor();

View File

@ -75,7 +75,7 @@ static vector<lyx::docstring> to_docstring_vector(QStringList const & qlist)
}
GuiCitation::GuiCitation(LyXView & lv)
GuiCitation::GuiCitation(GuiView & lv)
: GuiCommand(lv, "citation")
{
setupUi(this);
@ -741,7 +741,7 @@ vector<docstring> GuiCitation::searchKeys(
}
Dialog * createGuiCitation(LyXView & lv) { return new GuiCitation(lv); }
Dialog * createGuiCitation(GuiView & lv) { return new GuiCitation(lv); }
} // namespace frontend

View File

@ -34,7 +34,7 @@ class GuiCitation : public GuiCommand, public Ui::CitationUi
public:
///
GuiCitation(LyXView & lv);
GuiCitation(GuiView & lv);
///
void applyView();

View File

@ -69,7 +69,7 @@ namespace lyx {
namespace frontend {
GuiDelimiter::GuiDelimiter(LyXView & lv)
GuiDelimiter::GuiDelimiter(GuiView & lv)
: GuiMath(lv, "mathdelimiter")
{
setupUi(this);
@ -243,7 +243,7 @@ void GuiDelimiter::on_matchCB_stateChanged(int state)
}
Dialog * createGuiDelimiter(LyXView & lv) { return new GuiDelimiter(lv); }
Dialog * createGuiDelimiter(GuiView & lv) { return new GuiDelimiter(lv); }
} // namespace frontend

View File

@ -25,7 +25,7 @@ class GuiDelimiter : public GuiMath, public Ui::DelimiterUi
Q_OBJECT
public:
GuiDelimiter(LyXView & lv);
GuiDelimiter(GuiView & lv);
public Q_SLOTS:
void on_leftLW_itemActivated(QListWidgetItem *);

View File

@ -13,7 +13,6 @@
#include "GuiDialog.h"
#include "debug.h"
#include "qt_helpers.h"
#include "frontends/LyXView.h"
#include <QCloseEvent>
#include <QSettings>
@ -24,7 +23,7 @@ using std::string;
namespace lyx {
namespace frontend {
GuiDialog::GuiDialog(LyXView & lv, std::string const & name)
GuiDialog::GuiDialog(GuiView & lv, std::string const & name)
: Dialog(lv), is_closing_(false), name_(name)
{}
@ -265,7 +264,7 @@ using std::string;
namespace lyx {
namespace frontend {
GuiCommand::GuiCommand(LyXView & lv, string const & name)
GuiCommand::GuiCommand(GuiView & lv, string const & name)
: GuiDialog(lv, name), params_(insetCode(name)), lfun_name_(name)
{
}

View File

@ -37,7 +37,7 @@ public:
/// \param lv is the access point for the dialog to the LyX kernel.
/// \param name is the identifier given to the dialog by its parent
/// container.
explicit GuiDialog(LyXView & lv, std::string const & name);
explicit GuiDialog(GuiView & lv, std::string const & name);
~GuiDialog();
public Q_SLOTS:
@ -141,7 +141,7 @@ class GuiCommand : public GuiDialog
public:
/// We need to know with what sort of inset we're associated.
// FIXME This should probably be an InsetCode
GuiCommand(LyXView &, std::string const & name);
GuiCommand(GuiView &, std::string const & name);
///
bool initialiseParams(std::string const & data);
/// clean-up on hide.

View File

@ -212,7 +212,7 @@ void PreambleModule::closeEvent(QCloseEvent * e)
GuiDocument::GuiDocument(LyXView & lv)
GuiDocument::GuiDocument(GuiView & lv)
: GuiDialog(lv, "document")
{
setupUi(this);
@ -1841,7 +1841,7 @@ void GuiDocument::loadModuleNames ()
}
Dialog * createGuiDocument(LyXView & lv) { return new GuiDocument(lv); }
Dialog * createGuiDocument(GuiView & lv) { return new GuiDocument(lv); }
} // namespace frontend

View File

@ -75,7 +75,7 @@ class GuiDocument : public GuiDialog, public Ui::DocumentUi
{
Q_OBJECT
public:
GuiDocument(LyXView & lv);
GuiDocument(GuiView & lv);
void updateParams(BufferParams const & params);
void apply(BufferParams & params);

View File

@ -24,7 +24,7 @@
namespace lyx {
namespace frontend {
GuiERT::GuiERT(LyXView & lv)
GuiERT::GuiERT(GuiView & lv)
: GuiDialog(lv, "ert"), status_(InsetERT::Collapsed)
{
setupUi(this);
@ -91,7 +91,7 @@ void GuiERT::dispatchParams()
}
Dialog * createGuiERT(LyXView & lv) { return new GuiERT(lv); }
Dialog * createGuiERT(GuiView & lv) { return new GuiERT(lv); }
} // namespace frontend

View File

@ -24,7 +24,7 @@ class GuiERT : public GuiDialog, public Ui::ERTUi
Q_OBJECT
public:
GuiERT(LyXView & lv);
GuiERT(GuiView & lv);
private Q_SLOTS:
void change_adaptor();

View File

@ -37,7 +37,7 @@ namespace frontend {
using support::bformat;
GuiErrorList::GuiErrorList(LyXView & lv)
GuiErrorList::GuiErrorList(GuiView & lv)
: GuiDialog(lv, "errorlist")
{
setupUi(this);
@ -133,7 +133,7 @@ void GuiErrorList::goTo(int item)
}
Dialog * createGuiErrorList(LyXView & lv) { return new GuiErrorList(lv); }
Dialog * createGuiErrorList(GuiView & lv) { return new GuiErrorList(lv); }
} // namespace frontend
} // namespace lyx

View File

@ -26,7 +26,7 @@ class GuiErrorList : public GuiDialog, public Ui::ErrorListUi
Q_OBJECT
public:
GuiErrorList(LyXView & lv);
GuiErrorList(GuiView & lv);
public Q_SLOTS:
/// select an entry

View File

@ -100,7 +100,7 @@ char const * const origin_gui_strs[] = {
} // namespace anon
GuiExternal::GuiExternal(LyXView & lv)
GuiExternal::GuiExternal(GuiView & lv)
: GuiDialog(lv, "external"), bbChanged_(false)
{
setupUi(this);
@ -831,7 +831,7 @@ string const GuiExternal::readBB(string const & file)
}
Dialog * createGuiExternal(LyXView & lv) { return new GuiExternal(lv); }
Dialog * createGuiExternal(GuiView & lv) { return new GuiExternal(lv); }
} // namespace frontend

View File

@ -41,7 +41,7 @@ class GuiExternal : public GuiDialog, public Ui::ExternalUi
Q_OBJECT
public:
GuiExternal(LyXView & lv);
GuiExternal(GuiView & lv);
private Q_SLOTS:
void bbChanged();

View File

@ -26,7 +26,7 @@ using std::string;
namespace lyx {
namespace frontend {
GuiFloat::GuiFloat(LyXView & lv)
GuiFloat::GuiFloat(GuiView & lv)
: GuiDialog(lv, "float")
{
setupUi(this);
@ -99,7 +99,7 @@ void GuiFloat::dispatchParams()
}
Dialog * createGuiFloat(LyXView & lv) { return new GuiFloat(lv); }
Dialog * createGuiFloat(GuiView & lv) { return new GuiFloat(lv); }
} // namespace frontend

View File

@ -25,7 +25,7 @@ class GuiFloat : public GuiDialog, public Ui::FloatUi
Q_OBJECT
public:
GuiFloat(LyXView & lv);
GuiFloat(GuiView & lv);
private Q_SLOTS:
void change_adaptor();

View File

@ -132,7 +132,7 @@ typedef std::pair<docstring, std::string> RotationOriginPair;
std::vector<RotationOriginPair> getRotationOriginData();
GuiGraphics::GuiGraphics(LyXView & lv)
GuiGraphics::GuiGraphics(GuiView & lv)
: GuiDialog(lv, "graphics")
{
setupUi(this);
@ -870,7 +870,7 @@ vector<RotationOriginPair> getRotationOriginData()
}
Dialog * createGuiGraphics(LyXView & lv) { return new GuiGraphics(lv); }
Dialog * createGuiGraphics(GuiView & lv) { return new GuiGraphics(lv); }
} // namespace frontend

View File

@ -32,14 +32,12 @@ class InsetGraphicsParams;
namespace frontend {
class LyXView;
class GuiGraphics : public GuiDialog, public Ui::GraphicsUi
{
Q_OBJECT
public:
GuiGraphics(LyXView & lv);
GuiGraphics(GuiView & lv);
void setAutoText();
private Q_SLOTS:

View File

@ -26,7 +26,7 @@
namespace lyx {
namespace frontend {
GuiHyperlink::GuiHyperlink(LyXView & lv)
GuiHyperlink::GuiHyperlink(GuiView & lv)
: GuiCommand(lv, "href")
{
setupUi(this);
@ -107,7 +107,7 @@ bool GuiHyperlink::isValid()
}
Dialog * createGuiHyperlink(LyXView & lv) { return new GuiHyperlink(lv); }
Dialog * createGuiHyperlink(GuiView & lv) { return new GuiHyperlink(lv); }
} // namespace frontend

View File

@ -25,7 +25,7 @@ class GuiHyperlink : public GuiCommand, public Ui::HyperlinkUi
Q_OBJECT
public:
GuiHyperlink(LyXView & lv);
GuiHyperlink(GuiView & lv);
public Q_SLOTS:
void changed_adaptor();

View File

@ -57,7 +57,7 @@ using support::getStringFromVector;
using support::getVectorFromString;
GuiInclude::GuiInclude(LyXView & lv)
GuiInclude::GuiInclude(GuiView & lv)
: GuiCommand(lv, "include")
{
setupUi(this);
@ -358,7 +358,7 @@ void GuiInclude::edit(string const & file)
}
Dialog * createGuiInclude(LyXView & lv) { return new GuiInclude(lv); }
Dialog * createGuiInclude(GuiView & lv) { return new GuiInclude(lv); }
} // namespace frontend

View File

@ -30,7 +30,7 @@ class GuiInclude : public GuiCommand, public Ui::IncludeUi
Q_OBJECT
public:
GuiInclude(LyXView & lv);
GuiInclude(GuiView & lv);
private Q_SLOTS:
void change_adaptor();

View File

@ -32,7 +32,7 @@ namespace frontend {
//
/////////////////////////////////////////////////////////////////
GuiIndexDialogBase::GuiIndexDialogBase(LyXView & lv,
GuiIndexDialogBase::GuiIndexDialogBase(GuiView & lv,
docstring const & title, QString const & label, std::string const & name)
: GuiCommand(lv, name)
{
@ -118,7 +118,7 @@ bool GuiIndexDialogBase::isValid()
/////////////////////////////////////////////////////////////////
GuiIndex::GuiIndex(LyXView & lv)
GuiIndex::GuiIndex(GuiView & lv)
: GuiIndexDialogBase(lv, _("Index Entry"), qt_("&Keyword:"), "index")
{
keywordED->setWhatsThis( qt_(
@ -139,7 +139,7 @@ GuiIndex::GuiIndex(LyXView & lv)
}
Dialog * createGuiIndex(LyXView & lv) { return new GuiIndex(lv); }
Dialog * createGuiIndex(GuiView & lv) { return new GuiIndex(lv); }
/////////////////////////////////////////////////////////////////
@ -148,12 +148,12 @@ Dialog * createGuiIndex(LyXView & lv) { return new GuiIndex(lv); }
//
/////////////////////////////////////////////////////////////////
GuiLabel::GuiLabel(LyXView & lv)
GuiLabel::GuiLabel(GuiView & lv)
: GuiIndexDialogBase(lv, _("Label"), qt_("&Label:"), "label")
{}
Dialog * createGuiLabel(LyXView & lv) { return new GuiLabel(lv); }
Dialog * createGuiLabel(GuiView & lv) { return new GuiLabel(lv); }
} // namespace frontend

View File

@ -24,7 +24,7 @@ class GuiIndexDialogBase : public GuiCommand, public Ui::IndexUi
Q_OBJECT
public:
GuiIndexDialogBase(LyXView & lv, docstring const & title,
GuiIndexDialogBase(GuiView & lv, docstring const & title,
QString const & label, std::string const & name);
private Q_SLOTS:
@ -49,14 +49,14 @@ private:
class GuiIndex : public GuiIndexDialogBase
{
public:
GuiIndex(LyXView & lv);
GuiIndex(GuiView & lv);
};
class GuiLabel : public GuiIndexDialogBase
{
public:
GuiLabel(LyXView & lv);
GuiLabel(GuiView & lv);
};

View File

@ -165,7 +165,7 @@ char const * font_styles_gui[] =
GuiListings::GuiListings(LyXView & lv)
GuiListings::GuiListings(GuiView & lv)
: GuiDialog(lv, "listings")
{
setupUi(this);
@ -642,7 +642,7 @@ void GuiListings::setParams(InsetListingsParams const & params)
}
Dialog * createGuiListings(LyXView & lv) { return new GuiListings(lv); }
Dialog * createGuiListings(GuiView & lv) { return new GuiListings(lv); }
} // namespace frontend

View File

@ -23,7 +23,7 @@ class GuiListings : public GuiDialog, public Ui::ListingsUi
{
Q_OBJECT
public:
GuiListings(LyXView & lv);
GuiListings(GuiView & lv);
/// get values from all the widgets and form a string
std::string construct_params();
/// validate listings parameters and return an error message, if any

View File

@ -102,7 +102,7 @@ void LogHighlighter::highlightBlock(QString const & text)
//
/////////////////////////////////////////////////////////////////////
GuiLog::GuiLog(LyXView & lv)
GuiLog::GuiLog(GuiView & lv)
: GuiDialog(lv, "log"), type_(LatexLog)
{
setupUi(this);
@ -237,7 +237,7 @@ void GuiLog::on_copyPB_clicked()
}
Dialog * createGuiLog(LyXView & lv) { return new GuiLog(lv); }
Dialog * createGuiLog(GuiView & lv) { return new GuiLog(lv); }
} // namespace frontend

View File

@ -29,7 +29,7 @@ class GuiLog : public GuiDialog, public Ui::LogUi
Q_OBJECT
public:
GuiLog(LyXView & lv);
GuiLog(GuiView & lv);
private Q_SLOTS:
void updateContents();

View File

@ -20,7 +20,7 @@ using std::map;
namespace lyx {
namespace frontend {
GuiMath::GuiMath(LyXView & lv, std::string const & name)
GuiMath::GuiMath(GuiView & lv, std::string const & name)
: GuiDialog(lv, name)
{
// FIXME: Ideally, those unicode codepoints would be defined

View File

@ -36,7 +36,7 @@ struct MathSymbol {
class GuiMath : public GuiDialog
{
public:
GuiMath(LyXView & lv, std::string const & name);
GuiMath(GuiView & lv, std::string const & name);
/// Nothing to initialise in this case.
bool initialiseParams(std::string const &) { return true; }

View File

@ -28,7 +28,7 @@ using std::string;
namespace lyx {
namespace frontend {
GuiMathMatrix::GuiMathMatrix(LyXView & lv)
GuiMathMatrix::GuiMathMatrix(GuiView & lv)
: GuiMath(lv, "mathmatrix")
{
setupUi(this);
@ -109,7 +109,7 @@ void GuiMathMatrix::slotClose()
}
Dialog * createGuiMathMatrix(LyXView & lv) { return new GuiMathMatrix(lv); }
Dialog * createGuiMathMatrix(GuiView & lv) { return new GuiMathMatrix(lv); }
} // namespace frontend

View File

@ -27,7 +27,7 @@ class GuiMathMatrix : public GuiMath, public Ui::MathMatrixUi
Q_OBJECT
public:
GuiMathMatrix(LyXView & lv);
GuiMathMatrix(GuiView & lv);
public Q_SLOTS:
void slotOK();

View File

@ -37,8 +37,8 @@ namespace frontend {
// MacOSX specific stuff is at the end.
GuiMenubar::GuiMenubar(LyXView * view, MenuBackend & mbe)
: owner_(static_cast<GuiView*>(view)), menubackend_(mbe)
GuiMenubar::GuiMenubar(GuiView * view, MenuBackend & mbe)
: owner_(view), menubackend_(mbe)
{
init();
}

View File

@ -26,13 +26,13 @@ namespace frontend {
class GuiView;
class GuiPopupMenu;
class LyXView;
class GuiView;
class GuiMenubar : public QObject
{
Q_OBJECT
public:
GuiMenubar(LyXView *, MenuBackend &);
GuiMenubar(GuiView *, MenuBackend &);
~GuiMenubar();

View File

@ -28,7 +28,7 @@ using std::string;
namespace lyx {
namespace frontend {
GuiNomenclature::GuiNomenclature(LyXView & lv)
GuiNomenclature::GuiNomenclature(GuiView & lv)
: GuiCommand(lv, "nomenclature")
{
setupUi(this);
@ -99,7 +99,7 @@ bool GuiNomenclature::isValid()
}
Dialog * createGuiNomenclature(LyXView & lv)
Dialog * createGuiNomenclature(GuiView & lv)
{
return new GuiNomenclature(lv);
}

View File

@ -25,7 +25,7 @@ class GuiNomenclature : public GuiCommand, public Ui::NomenclUi
Q_OBJECT
public:
GuiNomenclature(LyXView & lv);
GuiNomenclature(GuiView & lv);
private Q_SLOTS:
void change_adaptor();

View File

@ -25,7 +25,7 @@ using std::string;
namespace lyx {
namespace frontend {
GuiNote::GuiNote(LyXView & lv)
GuiNote::GuiNote(GuiView & lv)
: GuiDialog(lv, "note")
{
setupUi(this);
@ -115,7 +115,7 @@ void GuiNote::dispatchParams()
}
Dialog * createGuiNote(LyXView & lv) { return new GuiNote(lv); }
Dialog * createGuiNote(GuiView & lv) { return new GuiNote(lv); }
} // namespace frontend

View File

@ -23,7 +23,7 @@ class GuiNote : public GuiDialog, public Ui::NoteUi
{
Q_OBJECT
public:
GuiNote(LyXView & lv);
GuiNote(GuiView & lv);
private Q_SLOTS:
void change_adaptor();
private:

View File

@ -48,7 +48,7 @@ using std::endl;
namespace lyx {
namespace frontend {
GuiParagraph::GuiParagraph(LyXView & lv)
GuiParagraph::GuiParagraph(GuiView & lv)
: Dialog(lv)
{
setupUi(this);
@ -328,7 +328,7 @@ LyXAlignment GuiParagraph::alignDefault() const
}
Dialog * createGuiParagraph(LyXView & lv)
Dialog * createGuiParagraph(GuiView & lv)
{
#if 0
GuiView & guiview = static_cast<GuiView &>(lv);

View File

@ -42,7 +42,7 @@ class GuiParagraph
{
Q_OBJECT
public:
GuiParagraph(LyXView & lv);
GuiParagraph(GuiView & lv);
/// update
void updateView();

View File

@ -2117,7 +2117,7 @@ void PrefIdentity::update(LyXRC const & rc)
//
/////////////////////////////////////////////////////////////////////
GuiPreferences::GuiPreferences(LyXView & lv)
GuiPreferences::GuiPreferences(GuiView & lv)
: GuiDialog(lv, "prefs"), update_screen_font_(false)
{
setupUi(this);
@ -2386,7 +2386,7 @@ int GuiPreferences::fromPaperSize(PAPER_SIZE papersize) const
}
Dialog * createGuiPreferences(LyXView & lv) { return new GuiPreferences(lv); }
Dialog * createGuiPreferences(GuiView & lv) { return new GuiPreferences(lv); }
} // namespace frontend

View File

@ -426,7 +426,7 @@ class GuiPreferences : public GuiDialog, public Ui::PrefsUi
{
Q_OBJECT
public:
GuiPreferences(LyXView & lv);
GuiPreferences(GuiView & lv);
void apply(LyXRC & rc) const;
void updateRc(LyXRC const & rc);

View File

@ -42,7 +42,7 @@ namespace frontend {
using support::FileFilterList;
GuiPrint::GuiPrint(LyXView & lv)
GuiPrint::GuiPrint(GuiView & lv)
: GuiDialog(lv, "print")
{
setupUi(this);
@ -257,7 +257,7 @@ void GuiPrint::dispatchParams()
}
Dialog * createGuiPrint(LyXView & lv) { return new GuiPrint(lv); }
Dialog * createGuiPrint(GuiView & lv) { return new GuiPrint(lv); }
} // namespace frontend

View File

@ -30,7 +30,7 @@ class GuiPrint : public GuiDialog, public Ui::PrintUi
Q_OBJECT
public:
GuiPrint(LyXView & lv);
GuiPrint(GuiView & lv);
private Q_SLOTS:
void change_adaptor();

View File

@ -42,7 +42,7 @@ namespace frontend {
using support::makeAbsPath;
using support::makeDisplayPath;
GuiRef::GuiRef(LyXView & lv)
GuiRef::GuiRef(GuiView & lv)
: GuiCommand(lv, "ref")
{
setupUi(this);
@ -372,7 +372,7 @@ void GuiRef::gotoBookmark()
}
Dialog * createGuiRef(LyXView & lv) { return new GuiRef(lv); }
Dialog * createGuiRef(GuiView & lv) { return new GuiRef(lv); }
} // namespace frontend

View File

@ -29,7 +29,7 @@ class GuiRef : public GuiCommand, public Ui::RefUi
Q_OBJECT
public:
GuiRef(LyXView & lv);
GuiRef(GuiView & lv);
private Q_SLOTS:
void changed_adaptor();

View File

@ -38,7 +38,7 @@ static void uniqueInsert(QComboBox * box, QString const & text)
}
GuiSearch::GuiSearch(LyXView & lv)
GuiSearch::GuiSearch(GuiView & lv)
: GuiDialog(lv, "findreplace")
{
setupUi(this);
@ -142,7 +142,7 @@ void GuiSearch::replace(docstring const & search, docstring const & replace,
dispatch(FuncRequest(LFUN_WORD_REPLACE, data));
}
Dialog * createGuiSearch(LyXView & lv) { return new GuiSearch(lv); }
Dialog * createGuiSearch(GuiView & lv) { return new GuiSearch(lv); }
} // namespace frontend

View File

@ -24,7 +24,7 @@ class GuiSearch : public GuiDialog, public Ui::SearchUi
Q_OBJECT
public:
GuiSearch(LyXView & lv);
GuiSearch(GuiView & lv);
private Q_SLOTS:
void findChanged();

View File

@ -36,7 +36,7 @@ namespace frontend {
using support::trim;
GuiSendTo::GuiSendTo(LyXView & lv)
GuiSendTo::GuiSendTo(GuiView & lv)
: GuiDialog(lv, "sendto")
{
setupUi(this);
@ -190,7 +190,7 @@ vector<Format const *> GuiSendTo::allFormats() const
}
Dialog * createGuiSendTo(LyXView & lv) { return new GuiSendTo(lv); }
Dialog * createGuiSendTo(GuiView & lv) { return new GuiSendTo(lv); }
} // namespace frontend

View File

@ -31,7 +31,7 @@ class GuiSendTo : public GuiDialog, public Ui::SendtoUi
Q_OBJECT
public:
GuiSendTo(LyXView & lv);
GuiSendTo(GuiView & lv);
private Q_SLOTS:
void changed_adaptor();

View File

@ -27,7 +27,7 @@ namespace frontend {
using support::FileName;
using support::onlyFilename;
GuiShowFile::GuiShowFile(LyXView & lv)
GuiShowFile::GuiShowFile(GuiView & lv)
: GuiDialog(lv, "file")
{
setupUi(this);
@ -72,7 +72,7 @@ void GuiShowFile::clearParams()
}
Dialog * createGuiShowFile(LyXView & lv) { return new GuiShowFile(lv); }
Dialog * createGuiShowFile(GuiView & lv) { return new GuiShowFile(lv); }
} // namespace frontend

View File

@ -26,7 +26,7 @@ class GuiShowFile : public GuiDialog, public Ui::ShowFileUi
Q_OBJECT
public:
GuiShowFile(LyXView & lv);
GuiShowFile(GuiView & lv);
private:
///

View File

@ -66,7 +66,7 @@ namespace frontend {
using support::bformat;
using support::contains;
GuiSpellchecker::GuiSpellchecker(LyXView & lv)
GuiSpellchecker::GuiSpellchecker(GuiView & lv)
: GuiDialog(lv, "spellchecker"), exitEarly_(false),
oldval_(0), newvalue_(0), count_(0), speller_(0)
{
@ -491,7 +491,7 @@ void GuiSpellchecker::ignoreAll()
}
Dialog * createGuiSpellchecker(LyXView & lv) { return new GuiSpellchecker(lv); }
Dialog * createGuiSpellchecker(GuiView & lv) { return new GuiSpellchecker(lv); }
} // namespace frontend
} // namespace lyx

View File

@ -32,7 +32,7 @@ class GuiSpellchecker : public GuiDialog, public Ui::SpellcheckerUi
Q_OBJECT
public:
GuiSpellchecker(LyXView & lv);
GuiSpellchecker(GuiView & lv);
~GuiSpellchecker();
public Q_SLOTS:

View File

@ -37,7 +37,7 @@ using std::string;
namespace lyx {
namespace frontend {
GuiTabular::GuiTabular(LyXView & lv)
GuiTabular::GuiTabular(GuiView & lv)
: GuiDialog(lv, "tabular")
{
active_cell_ = Tabular::npos;
@ -1155,7 +1155,7 @@ void GuiTabular::longTabular(bool yes)
}
Dialog * createGuiTabular(LyXView & lv) { return new GuiTabular(lv); }
Dialog * createGuiTabular(GuiView & lv) { return new GuiTabular(lv); }
} // namespace frontend

View File

@ -27,7 +27,7 @@ class GuiTabular : public GuiDialog, public Ui::TabularUi
Q_OBJECT
public:
GuiTabular(LyXView & lv);
GuiTabular(GuiView & lv);
~GuiTabular();
private Q_SLOTS:

View File

@ -27,7 +27,7 @@ using std::string;
namespace lyx {
namespace frontend {
GuiTabularCreate::GuiTabularCreate(LyXView & lv)
GuiTabularCreate::GuiTabularCreate(GuiView & lv)
: GuiDialog(lv, "tabularcreate")
{
setupUi(this);
@ -91,7 +91,7 @@ void GuiTabularCreate::dispatchParams()
}
Dialog * createGuiTabularCreate(LyXView & lv)
Dialog * createGuiTabularCreate(GuiView & lv)
{
return new GuiTabularCreate(lv);
}

View File

@ -26,7 +26,7 @@ class GuiTabularCreate : public GuiDialog, public Ui::TabularCreateUi
Q_OBJECT
public:
GuiTabularCreate(LyXView & lv);
GuiTabularCreate(GuiView & lv);
private Q_SLOTS:
void columnsChanged(int);

View File

@ -85,7 +85,7 @@ static string texFileFromList(string const & file, string const & type)
}
GuiTexInfo::GuiTexInfo(LyXView & lv)
GuiTexInfo::GuiTexInfo(GuiView & lv)
: GuiDialog(lv, "texinfo")
{
setupUi(this);
@ -240,7 +240,7 @@ string GuiTexInfo::fileType(TexFileType type) const
}
Dialog * createGuiTexInfo(LyXView & lv) { return new GuiTexInfo(lv); }
Dialog * createGuiTexInfo(GuiView & lv) { return new GuiTexInfo(lv); }
} // namespace frontend

View File

@ -30,7 +30,7 @@ class GuiTexInfo : public GuiDialog, public Ui::TexinfoUi
public:
///
GuiTexInfo(LyXView & lv);
GuiTexInfo(GuiView & lv);
/// the file extensions. order matters in GuiTexInfo::fileType()
enum TexFileType { ClsType, StyType, BstType };

View File

@ -31,7 +31,7 @@ using std::string;
namespace lyx {
namespace frontend {
GuiThesaurus::GuiThesaurus(LyXView & lv)
GuiThesaurus::GuiThesaurus(GuiView & lv)
: GuiDialog(lv, "thesaurus")
{
setupUi(this);
@ -185,7 +185,7 @@ Thesaurus::Meanings const & GuiThesaurus::getMeanings(docstring const & str)
}
Dialog * createGuiThesaurus(LyXView & lv) { return new GuiThesaurus(lv); }
Dialog * createGuiThesaurus(GuiView & lv) { return new GuiThesaurus(lv); }
} // namespace frontend

View File

@ -26,7 +26,7 @@ class GuiThesaurus : public GuiDialog, public Ui::ThesaurusUi
Q_OBJECT
public:
GuiThesaurus(LyXView & lv);
GuiThesaurus(GuiView & lv);
private Q_SLOTS:
void change_adaptor();

View File

@ -229,7 +229,7 @@ void GuiToc::dispatchParams()
}
Dialog * createGuiToc(LyXView & lv)
Dialog * createGuiToc(GuiView & lv)
{
GuiView & guiview = static_cast<GuiView &>(lv);
#ifdef Q_WS_MACX

View File

@ -40,7 +40,7 @@ using std::string;
namespace lyx {
namespace frontend {
GuiVSpace::GuiVSpace(LyXView & lv)
GuiVSpace::GuiVSpace(GuiView & lv)
: GuiDialog(lv, "vspace")
{
setupUi(this);
@ -196,7 +196,7 @@ void GuiVSpace::dispatchParams()
}
Dialog * createGuiVSpace(LyXView & lv) { return new GuiVSpace(lv); }
Dialog * createGuiVSpace(GuiView & lv) { return new GuiVSpace(lv); }
} // namespace frontend

View File

@ -27,7 +27,7 @@ class GuiVSpace : public GuiDialog, public Ui::VSpaceUi
Q_OBJECT
public:
GuiVSpace(LyXView & lv);
GuiVSpace(GuiView & lv);
private Q_SLOTS:
///

View File

@ -981,6 +981,29 @@ FuncStatus GuiView::getStatus(FuncRequest const & cmd)
break;
}
case LFUN_INSET_APPLY: {
if (!buf) {
enable = false;
break;
}
string const name = cmd.getArg(0);
Inset * inset = getOpenInset(name);
if (inset) {
FuncRequest fr(LFUN_INSET_MODIFY, cmd.argument());
FuncStatus fs;
if (!inset->getStatus(view()->cursor(), fr, fs)) {
// Every inset is supposed to handle this
BOOST_ASSERT(false);
}
flag |= fs;
} else {
FuncRequest fr(LFUN_INSET_INSERT, cmd.argument());
flag |= getStatus(fr);
}
enable = flag.enabled();
break;
}
default:
if (!view()) {
enable = false;
@ -997,7 +1020,9 @@ FuncStatus GuiView::getStatus(FuncRequest const & cmd)
void GuiView::dispatch(FuncRequest const & cmd)
{
Buffer * buf = buffer();
// By default we won't need any new update.
Update::flags update_flags = Update::None;
switch(cmd.action) {
case LFUN_BUFFER_SWITCH:
setBuffer(theBufferList().getBuffer(to_utf8(cmd.argument())));
@ -1092,7 +1117,7 @@ void GuiView::dispatch(FuncRequest const & cmd)
showDialog("character", data);
} else if (name == "latexlog") {
Buffer::LogType type;
string const logfile = buf->logName(&type);
string const logfile = buffer()->logName(&type);
switch (type) {
case Buffer::latexlog:
data = "latex ";
@ -1105,17 +1130,36 @@ void GuiView::dispatch(FuncRequest const & cmd)
showDialog("log", data);
} else if (name == "vclog") {
string const data = "vc " +
Lexer::quoteString(buf->lyxvc().getLogFile());
Lexer::quoteString(buffer()->lyxvc().getLogFile());
showDialog("log", data);
} else
showDialog(name, data);
break;
}
case LFUN_INSET_APPLY: {
string const name = cmd.getArg(0);
Inset * inset = getOpenInset(name);
if (inset) {
FuncRequest fr(LFUN_INSET_MODIFY, cmd.argument());
inset->dispatch(view()->cursor(), fr);
// ideally, the update flag should be set by the insets,
// but this is not possible currently
update_flags = Update::Force | Update::FitCursor;
} else {
FuncRequest fr(LFUN_INSET_INSERT, cmd.argument());
lyx::dispatch(fr);
}
break;
}
default:
theLyXFunc().setLyXView(this);
lyx::dispatch(cmd);
}
if (view())
view()->cursor().updateFlags(update_flags);
}
@ -1344,46 +1388,46 @@ void GuiView::checkStatus()
// will be replaced by a proper factory...
Dialog * createGuiAbout(LyXView & lv);
Dialog * createGuiBibitem(LyXView & lv);
Dialog * createGuiBibtex(LyXView & lv);
Dialog * createGuiBox(LyXView & lv);
Dialog * createGuiBranch(LyXView & lv);
Dialog * createGuiChanges(LyXView & lv);
Dialog * createGuiCharacter(LyXView & lv);
Dialog * createGuiCitation(LyXView & lv);
Dialog * createGuiDelimiter(LyXView & lv);
Dialog * createGuiDocument(LyXView & lv);
Dialog * createGuiErrorList(LyXView & lv);
Dialog * createGuiERT(LyXView & lv);
Dialog * createGuiExternal(LyXView & lv);
Dialog * createGuiFloat(LyXView & lv);
Dialog * createGuiGraphics(LyXView & lv);
Dialog * createGuiInclude(LyXView & lv);
Dialog * createGuiIndex(LyXView & lv);
Dialog * createGuiLabel(LyXView & lv);
Dialog * createGuiListings(LyXView & lv);
Dialog * createGuiLog(LyXView & lv);
Dialog * createGuiMathMatrix(LyXView & lv);
Dialog * createGuiNomenclature(LyXView & lv);
Dialog * createGuiNote(LyXView & lv);
Dialog * createGuiParagraph(LyXView & lv);
Dialog * createGuiPreferences(LyXView & lv);
Dialog * createGuiPrint(LyXView & lv);
Dialog * createGuiRef(LyXView & lv);
Dialog * createGuiSearch(LyXView & lv);
Dialog * createGuiSendTo(LyXView & lv);
Dialog * createGuiShowFile(LyXView & lv);
Dialog * createGuiSpellchecker(LyXView & lv);
Dialog * createGuiTabularCreate(LyXView & lv);
Dialog * createGuiTabular(LyXView & lv);
Dialog * createGuiTexInfo(LyXView & lv);
Dialog * createGuiToc(LyXView & lv);
Dialog * createGuiThesaurus(LyXView & lv);
Dialog * createGuiHyperlink(LyXView & lv);
Dialog * createGuiVSpace(LyXView & lv);
Dialog * createGuiViewSource(LyXView & lv);
Dialog * createGuiWrap(LyXView & lv);
Dialog * createGuiAbout(GuiView & lv);
Dialog * createGuiBibitem(GuiView & lv);
Dialog * createGuiBibtex(GuiView & lv);
Dialog * createGuiBox(GuiView & lv);
Dialog * createGuiBranch(GuiView & lv);
Dialog * createGuiChanges(GuiView & lv);
Dialog * createGuiCharacter(GuiView & lv);
Dialog * createGuiCitation(GuiView & lv);
Dialog * createGuiDelimiter(GuiView & lv);
Dialog * createGuiDocument(GuiView & lv);
Dialog * createGuiErrorList(GuiView & lv);
Dialog * createGuiERT(GuiView & lv);
Dialog * createGuiExternal(GuiView & lv);
Dialog * createGuiFloat(GuiView & lv);
Dialog * createGuiGraphics(GuiView & lv);
Dialog * createGuiInclude(GuiView & lv);
Dialog * createGuiIndex(GuiView & lv);
Dialog * createGuiLabel(GuiView & lv);
Dialog * createGuiListings(GuiView & lv);
Dialog * createGuiLog(GuiView & lv);
Dialog * createGuiMathMatrix(GuiView & lv);
Dialog * createGuiNomenclature(GuiView & lv);
Dialog * createGuiNote(GuiView & lv);
Dialog * createGuiParagraph(GuiView & lv);
Dialog * createGuiPreferences(GuiView & lv);
Dialog * createGuiPrint(GuiView & lv);
Dialog * createGuiRef(GuiView & lv);
Dialog * createGuiSearch(GuiView & lv);
Dialog * createGuiSendTo(GuiView & lv);
Dialog * createGuiShowFile(GuiView & lv);
Dialog * createGuiSpellchecker(GuiView & lv);
Dialog * createGuiTabularCreate(GuiView & lv);
Dialog * createGuiTabular(GuiView & lv);
Dialog * createGuiTexInfo(GuiView & lv);
Dialog * createGuiToc(GuiView & lv);
Dialog * createGuiThesaurus(GuiView & lv);
Dialog * createGuiHyperlink(GuiView & lv);
Dialog * createGuiVSpace(GuiView & lv);
Dialog * createGuiViewSource(GuiView & lv);
Dialog * createGuiWrap(GuiView & lv);
Dialog * GuiView::build(string const & name)

View File

@ -230,10 +230,11 @@ public:
void hideDialog(std::string const & name, Inset * inset);
///
void disconnectDialog(std::string const & name);
private:
///
Inset * getOpenInset(std::string const & name) const;
private:
/// Is the dialog currently visible?
bool isDialogVisible(std::string const & name) const;
///

View File

@ -170,7 +170,7 @@ QString GuiViewSource::title() const
}
Dialog * createGuiViewSource(LyXView & lv)
Dialog * createGuiViewSource(GuiView & lv)
{
return new GuiViewSource(static_cast<GuiView &>(lv));
}

View File

@ -31,7 +31,7 @@ using std::string;
namespace lyx {
namespace frontend {
GuiWrap::GuiWrap(LyXView & lv)
GuiWrap::GuiWrap(GuiView & lv)
: GuiDialog(lv, "wrap")
{
setupUi(this);
@ -196,7 +196,7 @@ void GuiWrap::dispatchParams()
}
Dialog * createGuiWrap(LyXView & lv) { return new GuiWrap(lv); }
Dialog * createGuiWrap(GuiView & lv) { return new GuiWrap(lv); }
} // namespace frontend

View File

@ -24,7 +24,7 @@ class GuiWrap : public GuiDialog, public Ui::WrapUi
Q_OBJECT
public:
GuiWrap(LyXView & lv);
GuiWrap(GuiView & lv);
private Q_SLOTS:
void change_adaptor();

View File

@ -11,24 +11,25 @@
#include <config.h>
#include "LyXFunc.h"
#include "FuncStatus.h"
#include "FuncRequest.h"
#include "LyXView.h"
#include "InsertTableWidget.h"
#include "GuiView.h"
#include "qt_helpers.h"
#include "InsertTableWidget.h"
#include "FuncStatus.h"
#include "FuncRequest.h"
#include "LyXFunc.h"
#include <QMouseEvent>
#include <QPainter>
#include <QString>
#include <QToolTip>
#include <QPainter>
namespace lyx {
namespace frontend {
InsertTableWidget::InsertTableWidget(LyXView & lyxView, QWidget * parent)
InsertTableWidget::InsertTableWidget(GuiView & lyxView, QWidget * parent)
: QWidget(parent, Qt::Popup), colwidth_(20), rowheight_(12), lyxView_(lyxView)
{
init();

View File

@ -18,13 +18,13 @@
namespace lyx {
namespace frontend {
class LyXView;
class GuiView;
class InsertTableWidget : public QWidget {
Q_OBJECT
public:
InsertTableWidget(LyXView &, QWidget *);
InsertTableWidget(GuiView &, QWidget *);
Q_SIGNALS:
//! widget is visible
@ -63,7 +63,7 @@ private:
//! column of pointer
int right_;
//! the lyxview we need to dispatch the funcrequest
LyXView & lyxView_;
GuiView & lyxView_;
//! widget under mouse
bool underMouse_;
};