]> git.lyx.org Git - lyx.git/blob - src/frontends/qt2/QIndex.h
The big renaming. Yowser.
[lyx.git] / src / frontends / qt2 / QIndex.h
1 // -*- C++ -*-
2 /**
3  * \file QIndex.h
4  * Copyright 2001 the LyX Team
5  * Read the file COPYING
6  *
7  * \author John Levon <moz@compsoc.man.ac.uk>
8  * \author Kalle Dalheimer <kalle@klaralvdalens-datakonsult.se>
9  */
10
11 #ifndef QINDEX_H
12 #define QINDEX_H
13
14 #include "DialogBase.h"
15 #include "LString.h"
16 #include "boost/utility.hpp"
17 #include "insets/insetindex.h"
18
19 class Dialogs;
20 class LyXView;
21 class QIndexDialog;
22
23 class QIndex : public DialogBase {
24 public: 
25         QIndex(LyXView *, Dialogs *);
26         ~QIndex();
27
28         /// Apply changes
29         void apply();
30         /// close the connections
31         void close();
32  
33 private: 
34         /// Create the dialog if necessary, update it and display it.
35         void show();
36         /// Hide the dialog.
37         void hide();
38         /// Update the dialog.
39         void update();
40
41         /// create an Index inset
42         void createIndex(string const &);
43         /// edit an Index  inset
44         void showIndex(InsetCommand * const);
45  
46         /// Real GUI implementation.
47         QIndexDialog * dialog_;
48
49         /// the LyXView we belong to
50         LyXView * lv_;
51  
52         /** Which Dialogs do we belong to?
53             Used so we can get at the signals we have to connect to.
54         */
55         Dialogs * d_;
56         /// pointer to the inset if any
57         InsetCommand * inset_;
58         /// insets params
59         InsetCommandParams params;
60         /// is the inset we are reading from a readonly buffer ?
61         bool readonly;
62         
63         /// Hide connection.
64         SigC::Connection h_;
65         /// Update connection.
66         SigC::Connection u_;
67         /// Inset hide connection.
68         SigC::Connection ih_;
69 };
70
71 #endif // QINDEX_H