4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Abdelrazak Younes
9 * Full author contact details are available in file CREDITS.
18 #include <QCloseEvent>
24 class DialogView : public QDialog, public Dialog
27 /// \param lv is the access point for the dialog to the LyX kernel.
28 /// \param name is the identifier given to the dialog by its parent
30 /// \param title is the window title used for decoration.
31 DialogView(GuiView & lv, QString const & name, QString const & title)
32 : QDialog(&lv), Dialog(lv, name, "LyX: " + title)
34 // remove question marks from Windows dialogs
35 setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
38 virtual QWidget * asQWidget() { return this; }
39 virtual QWidget const * asQWidget() const { return this; }
42 /// \name Dialog inherited methods
45 bool initialiseParams(std::string const & /*data*/) { return true; }
47 bool needBufferOpen() const { return isBufferDependent(); }
49 /// Any dialog that overrides this method should make sure to call it.
50 void closeEvent(QCloseEvent * ev)
56 /// Any dialog that overrides this method should make sure to call it.
57 void hideEvent(QHideEvent * ev)
59 if (!ev->spontaneous()) {
67 } // namespace frontend
70 #endif // DIALOGVIEW_H