#include "GuiDialog.h"
#include "GuiView.h"
#include "qt_helpers.h"
+#include "FuncRequest.h"
+
+#include "insets/InsetCommand.h"
#include "support/debug.h"
namespace lyx {
namespace frontend {
-GuiDialog::GuiDialog(GuiView & lv, string const & name, QString const & title)
+GuiDialog::GuiDialog(GuiView & lv, QString const & name, QString const & title)
: QDialog(&lv), Dialog(lv, name, "LyX: " + title), is_closing_(false)
{}
-void GuiDialog::closeEvent(QCloseEvent *e)
+void GuiDialog::closeEvent(QCloseEvent * ev)
{
slotClose();
- e->accept();
+ ev->accept();
}
setUpdatesEnabled(true);
}
-} // namespace frontend
-} // namespace lyx
-
/////////////////////////////////////////////////////////////////////
//
//
/////////////////////////////////////////////////////////////////////
-#include "FuncRequest.h"
-#include "insets/InsetCommand.h"
-
-using namespace std;
-
-namespace lyx {
-namespace frontend {
-GuiCommand::GuiCommand(GuiView & lv, string const & name,
+GuiCommand::GuiCommand(GuiView & lv, QString const & name,
QString const & title)
- : GuiDialog(lv, name, title), params_(insetCode(name)), lfun_name_(name)
+ : GuiDialog(lv, name, title), params_(insetCode(fromqstr(name))),
+ lfun_name_(fromqstr(name))
{
}
{
// The name passed with LFUN_INSET_APPLY is also the name
// used to identify the mailer.
- InsetCommandMailer::string2params(lfun_name_, data, params_);
+ InsetCommand::string2params(lfun_name_, data, params_);
return true;
}
if (lfun_name_.empty())
return;
- string const lfun =
- InsetCommandMailer::params2string(lfun_name_, params_);
+ string const lfun = InsetCommand::params2string(lfun_name_, params_);
dispatch(FuncRequest(getLfun(), lfun));
}