]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/DialogView.h
Complete the removal of the embedding stuff. Maybe. It's hard to be sure we got every...
[lyx.git] / src / frontends / qt4 / DialogView.h
1 // -*- C++ -*-
2 /**
3  * \file DialogView.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Abdelrazak Younes
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef DIALOGVIEW_H
13 #define DIALOGVIEW_H
14
15 #include "Dialog.h"
16 #include "GuiView.h"
17
18 #include <QDialog>
19
20 namespace lyx {
21 namespace frontend {
22
23 /** \c Dialog collects the different parts of a Model-Controller-View
24  *  split of a generic dialog together.
25  */
26 class DialogView : public QDialog, public Dialog
27 {
28 public:
29         /// \param lv is the access point for the dialog to the LyX kernel.
30         /// \param name is the identifier given to the dialog by its parent
31         /// container.
32         /// \param title is the window title used for decoration.
33         DialogView(GuiView & lv, QString const & name, QString const & title)
34                 : QDialog(&lv), Dialog(lv, name, "LyX: " + title)
35         {}
36
37         virtual QWidget * asQWidget() { return this; }
38         virtual QWidget const * asQWidget() const { return this; }
39
40 protected:
41         /// Dialog inherited methods
42         //@{
43         void applyView() {}
44         bool initialiseParams(std::string const & /*data*/) { return true; }
45         void clearParams() {}
46         //@}
47 };
48
49 } // namespace frontend
50 } // namespace lyx
51
52 #endif // DIALOGVIEW_H