]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiNote.h
Merge QController into individual dialogs. Also various cleanup
[lyx.git] / src / frontends / qt4 / GuiNote.h
1 // -*- C++ -*-
2 /**
3  * \file GuiNote.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Jürgen Spitzmüller
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef GUINOTE_H
13 #define GUINOTE_H
14
15 #include "GuiDialogView.h"
16 #include "ControlNote.h"
17 #include "ui_NoteUi.h"
18
19 #include <QDialog>
20
21
22 namespace lyx {
23 namespace frontend {
24
25 class GuiNote;
26
27 class GuiNoteDialog : public QDialog, public Ui::NoteUi {
28         Q_OBJECT
29 public:
30         GuiNoteDialog(GuiNote * form);
31 protected Q_SLOTS:
32         virtual void change_adaptor();
33 protected:
34         virtual void closeEvent(QCloseEvent * e);
35 private:
36         GuiNote * form_;
37 };
38
39
40 /** This class provides a QT implementation of the Note Dialog.
41  */
42 class GuiNote : public GuiView<GuiNoteDialog>
43 {
44 public:
45         friend class GuiNoteDialog;
46
47         /// Constructor
48         GuiNote(Dialog &);
49         /// parent controller
50         ControlNote & controller()
51         { return static_cast<ControlNote &>(this->getController()); }
52         /// parent controller
53         ControlNote const & controller() const
54         { return static_cast<ControlNote const &>(this->getController()); }
55 private:
56         ///  Apply changes
57         virtual void apply();
58         /// Build the dialog
59         virtual void build_dialog();
60         /// Update dialog before showing it
61         virtual void update_contents();
62 };
63
64 } // namespace frontend
65 } // namespace lyx
66
67 #endif // GUINOTE_H