]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiIndex.h
31929004a9fa2d5f9f2b3fe11d73ba23081e9214
[lyx.git] / src / frontends / qt4 / GuiIndex.h
1 // -*- C++ -*-
2 /**
3  * \file GuiIndex.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author John Levon
8  * \author Kalle Dalheimer
9  *
10  * Full author contact details are available in file CREDITS.
11  */
12
13 #ifndef GUIINDEX_H
14 #define GUIINDEX_H
15
16 #include "GuiDialogView.h"
17 #include "ControlCommand.h"
18 #include "ui_IndexUi.h"
19
20 #include <QDialog>
21
22 namespace lyx {
23 namespace frontend {
24
25 class GuiIndex;
26
27 class GuiIndexDialog : public QDialog, public Ui::IndexUi {
28         Q_OBJECT
29 public:
30         GuiIndexDialog(GuiIndex * form);
31
32 protected Q_SLOTS:
33         virtual void change_adaptor();
34         virtual void reject();
35 protected:
36         virtual void closeEvent(QCloseEvent * e);
37 private:
38         GuiIndex * form_;
39 };
40
41
42 class GuiIndex : public GuiView<GuiIndexDialog>
43 {
44 public:
45         friend class GuiIndexDialog;
46
47         GuiIndex(Dialog &, docstring const & title, QString const & label);
48         /// parent controller
49         ControlCommand & controller()
50         { return static_cast<ControlCommand &>(this->getController()); }
51         /// parent controller
52         ControlCommand const & controller() const
53         { return static_cast<ControlCommand const &>(this->getController()); }
54 protected:
55         virtual bool isValid();
56 private:
57         /// Apply changes
58         virtual void apply();
59         /// update
60         virtual void update_contents();
61         /// build the dialog
62         virtual void build_dialog();
63
64         ///
65         QString const label_;
66 };
67
68 } // namespace frontend
69 } // namespace lyx
70
71 #endif // GUIINDEX_H