namespace frontend {
-Dialog::Dialog(GuiView & lv, string const & name, QString const & title)
+Dialog::Dialog(GuiView & lv, QString const & name, QString const & title)
: name_(name), title_(title), lyxview_(&lv)
{}
{}
-string const & Dialog::name() const
-{
- return name_;
-}
-
-
bool Dialog::canApply() const
{
- FuncRequest const fr(getLfun(), from_ascii(name_));
+ FuncRequest const fr(getLfun(), fromqstr(name_));
FuncStatus const fs(getStatus(fr));
return fs.enabled();
}
void Dialog::updateDialog() const
{
- dispatch(FuncRequest(LFUN_DIALOG_UPDATE, from_ascii(name_)));
+ dispatch(FuncRequest(LFUN_DIALOG_UPDATE, fromqstr(name_)));
}
void Dialog::disconnect() const
{
- lyxview_->disconnectDialog(name_);
+ lyxview_->disconnectDialog(fromqstr(name_));
}
return;
if (!initialiseParams(data)) {
- LYXERR0("Dialog \"" << name()
+ LYXERR0("Dialog \"" << fromqstr(name())
<< "\" failed to translate the data string passed to show()");
return;
}
return;
if (!initialiseParams(data)) {
- LYXERR0("Dialog \"" << name()
+ LYXERR0("Dialog \"" << fromqstr(name())
<< "\" could not be initialized");
return;
}
QString Dialog::sessionKey() const
{
return "view-" + QString::number(lyxview_->id())
- + "/" + toqstr(name());
+ + "/" + name();
}
/// \param name is the identifier given to the dialog by its parent
/// container.
/// \param title is the window title used for decoration.
- Dialog(GuiView & lv, std::string const & name, QString const & title);
+ Dialog(GuiView & lv, QString const & name, QString const & title);
virtual ~Dialog();
//@}
/// Dialog identifier.
- /// FIXME for Andre': Now that Dialog is entirely within qt4/
- /// We can use QString instead in order to avoid <string> inclusion
- /// or we can pimpl name_.
- std::string const & name() const;
+ QString name() const { return name_; }
//@{
/** Enable the controller to initialise its data structures.
/** The Dialog's name is the means by which a dialog identifies
* itself to the LyXView.
*/
- std::string const name_;
+ QString const name_;
///
QString title_;
///
+++ /dev/null
-/**
- * \file DialogView.cpp
- * This file is part of LyX, the document processor.
- * Licence details can be found in the file COPYING.
- *
- * \author Angus Leeming
- *
- * Full author contact details are available in file CREDITS.
- */
-
-#include <config.h>
-
-#include "DialogView.h"
-
-#include "GuiView.h"
-#include "qt_helpers.h"
-
-#include <QShowEvent>
-
-using namespace std;
-
-namespace lyx {
-namespace frontend {
-
-DialogView::DialogView(GuiView & lv, string const & name,
- QString const & title)
- : QDialog(&lv), Dialog(lv, name, "LyX: " + title)
-{}
-
-} // namespace frontend
-} // namespace lyx
-
-#include "DialogView_moc.cpp"
#define DIALOGVIEW_H
#include "Dialog.h"
+#include "GuiView.h"
#include <QDialog>
*/
class DialogView : public QDialog, public Dialog
{
- Q_OBJECT
-
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.
/// \param title is the window title used for decoration.
- DialogView(GuiView & lv, std::string const & name, QString const & title);
- virtual ~DialogView() {}
+ DialogView(GuiView & lv, QString const & name, QString const & title)
+ : QDialog(&lv), Dialog(lv, name, "LyX: " + title)
+ {}
virtual QWidget * asQWidget() { return this; }
virtual QWidget const * asQWidget() const { return this; }
public:
DockView(
GuiView & parent, ///< the main window where to dock.
- std::string const & name, ///< dialog identifier.
+ QString const & name, ///< dialog identifier.
QString const & title, ///< dialog title.
Qt::DockWidgetArea area = Qt::LeftDockWidgetArea, ///< Position of the dock (and also drawer)
Qt::WindowFlags flags = 0
#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))
{
}
/// \param name is the identifier given to the dialog by its parent
/// container.
/// \param title is the window title used for decoration.
- GuiDialog(GuiView & lv, std::string const & name, QString const & title);
+ GuiDialog(GuiView & lv, QString const & name, QString const & title);
virtual QWidget * asQWidget() { return this; }
virtual QWidget const * asQWidget() const { return this; }
public:
/// We need to know with what sort of inset we're associated.
// FIXME This should probably be an InsetCode
- GuiCommand(GuiView &, std::string const & name, QString const & title);
+ GuiCommand(GuiView &, QString const & name, QString const & title);
///
bool initialiseParams(std::string const & data);
/// clean-up on hide.
namespace lyx {
namespace frontend {
-GuiMath::GuiMath(GuiView & lv, string const & name, QString const & title)
+GuiMath::GuiMath(GuiView & lv, QString const & name, QString const & title)
: GuiDialog(lv, name, title)
{
// FIXME: Ideally, those unicode codepoints would be defined
class GuiMath : public GuiDialog
{
public:
- GuiMath(GuiView & lv, std::string const & name, QString const & title);
+ GuiMath(GuiView & lv, QString const & name, QString const & title);
/// Nothing to initialise in this case.
bool initialiseParams(std::string const &) { return true; }
ButtonPolicy.h \
Dialog.cpp \
Dialog.h \
- DialogView.cpp \
Resources.cpp \
Action.cpp \
BulletsModule.cpp \
NOMOCHEADER = \
ButtonController.h \
ColorCache.h \
+ DialogView.h \
DockView.h \
FileDialog.h \
GuiFontExample.h \
Action.h \
BulletsModule.h \
CustomizedWidgets.h \
- DialogView.h \
EmptyTable.h \
FloatPlacement.h \
GuiAbout.h \