]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/DialogView.h
cleanup DialogView based classes.
[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
17 #include <QDialog>
18
19 class QCloseEvent;
20 class QShowEvent;
21
22 namespace lyx {
23 namespace frontend {
24
25 /** \c Dialog collects the different parts of a Model-Controller-View
26  *  split of a generic dialog together.
27  */
28 class DialogView : public QDialog, public Dialog
29 {
30         Q_OBJECT
31
32 public:
33         /// \param lv is the access point for the dialog to the LyX kernel.
34         /// \param name is the identifier given to the dialog by its parent
35         /// container.
36         explicit DialogView(GuiView & lv, std::string const & name);
37         virtual ~DialogView() {}
38
39         virtual QWidget * asQWidget() { return this; }
40         virtual QWidget const * asQWidget() const { return this; }
41
42 protected:
43         ///
44         void setViewTitle(docstring const & title);
45
46         /// Dialog inherited methods
47         //@{
48         void applyView() {}
49         bool initialiseParams(std::string const & /*data*/) { return true; }
50         void clearParams() {}
51         //@}
52 };
53
54 } // namespace frontend
55 } // namespace lyx
56
57 #endif // DIALOGVIEW_H