: QDialog(&lv), Dialog(lv, name)
{}
-
-void DialogView::setViewTitle(docstring const & title)
-{
- setWindowTitle("LyX: " + toqstr(title));
-}
-
} // namespace frontend
} // namespace lyx
#include <QDialog>
-class QCloseEvent;
-class QShowEvent;
-
namespace lyx {
namespace frontend {
virtual QWidget const * asQWidget() const { return this; }
protected:
- ///
- void setViewTitle(docstring const & title);
-
/// Dialog inherited methods
//@{
void applyView() {}
namespace frontend {
GuiDialog::GuiDialog(GuiView & lv, string const & name)
- : DialogView(lv, name), is_closing_(false)
+ : QDialog(&lv), Dialog(lv, name), is_closing_(false)
{}
+void GuiDialog::setViewTitle(docstring const & title)
+{
+ setWindowTitle("LyX: " + toqstr(title));
+}
+
+
void GuiDialog::setButtonsValid(bool valid)
{
bc().setValid(valid);
{
bc().setReadOnly(!enable);
bc().setValid(enable);
- DialogView::enableView(enable);
+ Dialog::enableView(enable);
}
#ifndef GUIDIALOG_H
#define GUIDIALOG_H
-#include "DialogView.h"
+#include "Dialog.h"
#include "ButtonController.h"
#include "insets/InsetCommandParams.h"
+#include <QDialog>
+
+class QCloseEvent;
+class QShowEvent;
+
namespace lyx {
namespace frontend {
-/** \c Dialog collects the different parts of a Model-Controller-View
- * split of a generic dialog together.
- */
-class GuiDialog : public DialogView
+/// Base class for historical LyX dialogs.
+/**
+ * \warning New dialogs should use the leaner classes \c DialogView or
+ * \c DockView depending on the intent. Eventally, old dialog should be
+ * converted to \c DialogView too.
+ */
+class GuiDialog : public QDialog, public Dialog
{
Q_OBJECT
/// container.
explicit GuiDialog(GuiView & lv, std::string const & name);
+ virtual QWidget * asQWidget() { return this; }
+ virtual QWidget const * asQWidget() const { return this; }
+
public Q_SLOTS:
/** \name Buttons
* These methods are publicly accessible because they are invoked
void slotClose();
public:
+ ///
+ void setViewTitle(docstring const & title);
+
/** Check whether we may apply our data.
*
* The buttons are disabled if not and (re-)enabled if yes.