- DialogView(
- GuiViewBase & parent, ///< the main window where to dock.
- std::string const & name, ///< dialog identifier.
- bool modal = false, ///< Window modality.
- Qt::WindowFlags flags = 0
- )
- : QDialog(&parent, flags), name_(name)
- {
- setModal(modal);
- MyController * c = new MyController(*this);
- controller_ = c;
- controller_->setLyXView(parent);
- QGridLayout * gridLayout = new QGridLayout(this);
- gridLayout->setMargin(0);
- widget_ = new MyWidget(*c, this);
- gridLayout->addWidget(widget_);
- setWindowTitle("LyX: " + widget_->windowTitle());
- }
+ /// \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, 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; }