]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiDialog.h
renaming of some methods that hurt the eyes + removal of:
[lyx.git] / src / frontends / qt4 / GuiDialog.h
1 // -*- C++ -*-
2 /**
3  * \file GuiDialog.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Angus Leeming
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef GUIDIALOG_H
13 #define GUIDIALOG_H
14
15 #include "Dialog.h"
16 #include "ButtonController.h"
17
18 namespace lyx {
19 namespace frontend {
20
21 /** \c Dialog collects the different parts of a Model-Controller-View
22  *  split of a generic dialog together.
23  */
24 class GuiDialog : public Dialog
25 {
26 public:
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
29         /// container.
30         GuiDialog(LyXView & lv, std::string const & name);
31
32         /** \name Buttons
33          *  These methods are publicly accessible because they are invoked
34          *  by the View when the user presses... guess what ;-)
35          */
36         //@{
37         void ApplyButton();
38         void OKButton();
39         void CancelButton();
40         void RestoreButton();
41         //@}
42
43         /** Check whether we may apply our data.
44          *
45          *  The buttons are disabled if not and (re-)enabled if yes.
46          */
47         void checkStatus();
48         void setButtonsValid(bool valid);
49
50
51         /** \name Dialog Components
52          *  Methods to access the various components making up a dialog.
53          */
54         //@{
55         ButtonController const & bc() const { return bc_; }
56         ButtonController & bc() { return bc_; }
57         //@}
58
59         void preShow();
60         void postShow();
61         void preUpdate();
62         void postUpdate();
63
64 private:
65         ButtonController bc_;
66 };
67
68 } // namespace frontend
69 } // namespace lyx
70
71 #endif // GUIDIALOG_H