]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiIndex.h
bbfb4ebbd55bd468abb08f2ccc483409df94d472
[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 "GuiDialog.h"
17 #include "ControlCommand.h"
18 #include "ui_IndexUi.h"
19
20 namespace lyx {
21 namespace frontend {
22
23 class GuiIndexDialogBase : public GuiDialog, public Ui::IndexUi
24 {
25         Q_OBJECT
26
27 public:
28         GuiIndexDialogBase(LyXView & lv, docstring const & title,
29                 QString const & label);
30
31 private Q_SLOTS:
32         void change_adaptor();
33         void reject();
34
35 private:
36         ///
37         void closeEvent(QCloseEvent * e);
38         /// parent controller
39         ControlCommand & controller() const;
40         ///
41         bool isValid();
42         /// Apply changes
43         void applyView();
44         /// update
45         void update_contents();
46
47         ///
48         QString label_;
49 };
50
51
52 class GuiIndexDialog : public GuiIndexDialogBase
53 {
54 public:
55         GuiIndexDialog(LyXView & lv)
56                 : GuiIndexDialogBase(lv, _("Index Entry"), qt_("&Keyword:")) 
57         {}
58 };
59
60
61 class GuiLabelDialog : public GuiIndexDialogBase
62 {
63 public:
64         GuiLabelDialog(LyXView & lv)
65                 : GuiIndexDialogBase(lv, _("Label"), qt_("&Label:"))
66         {}
67 };
68
69 } // namespace frontend
70 } // namespace lyx
71
72 #endif // GUIINDEX_H