]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiVSpace.h
Factorize closeEvent() for GuiDialog based dialogs.
[lyx.git] / src / frontends / qt4 / GuiVSpace.h
1 // -*- C++ -*-
2 /**
3  * \file GuiVSpace.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author André Pönitz
8  * \author Angus Leeming
9  * \author Jürgen Spitzmüller
10  * \author Edwin Leuven
11  *
12  * Full author contact details are available in file CREDITS.
13  */
14
15 #ifndef GUIVSPACE_H
16 #define GUIVSPACE_H
17
18 #include "GuiDialog.h"
19 #include "ui_VSpaceUi.h"
20 #include "VSpace.h"
21
22 namespace lyx {
23 namespace frontend {
24
25 class GuiVSpace : public GuiDialog, public Ui::VSpaceUi
26 {
27         Q_OBJECT
28
29 public:
30         GuiVSpace(GuiView & lv);
31
32 private Q_SLOTS:
33         ///
34         void change_adaptor();
35         ///
36         void enableCustom(int);
37
38 private:
39         /// Apply from dialog
40         void applyView();
41         /// Update the dialog
42         void updateContents();
43         ///
44         bool initialiseParams(std::string const & data);
45         /// clean-up on hide.
46         void clearParams();
47         /// clean-up on hide.
48         void dispatchParams();
49         ///
50         bool isBufferDependent() const { return true; }
51         ///
52         bool inInset() const;
53
54         ///
55         VSpace params_;
56 };
57
58 } // namespace frontend
59 } // namespace lyx
60
61 #endif // GUIVSPACE_H