]> git.lyx.org Git - lyx.git/blob - src/frontends/qt2/FormIndex.h
Fix for qt2 citation dialog crash when selecting first key
[lyx.git] / src / frontends / qt2 / FormIndex.h
1 // -*- C++ -*-
2 /* FormIndex.h
3  * (C) 2000 LyX Team
4  * John Levon, moz@compsoc.man.ac.uk
5  * Adapted for Qt2 frontend by Kalle Dalheimer, 
6  *   kalle@klaralvdalens-datakonsult.se
7  */
8
9 /***************************************************************************
10  *                                                                         *
11  *   This program is free software; you can redistribute it and/or modify  *
12  *   it under the terms of the GNU General Public License as published by  *
13  *   the Free Software Foundation; either version 2 of the License, or     *
14  *   (at your option) any later version.                                   *
15  *                                                                         *
16  ***************************************************************************/
17
18 #ifndef FORMINDEX_H
19 #define FORMINDEX_H
20
21 #include "DialogBase.h"
22 #include "LString.h"
23 #include "boost/utility.hpp"
24 #include "insets/insetindex.h"
25
26 class Dialogs;
27 class LyXView;
28 class FormIndexDialog;
29
30 class FormIndex : public DialogBase {
31 public: 
32         /**@name Constructors and Destructors */
33         //@{
34         ///
35         FormIndex(LyXView *, Dialogs *);
36         /// 
37         ~FormIndex();
38         //@}
39
40         /// Apply changes
41         void apply();
42         /// close the connections
43         void close();
44  
45 private: 
46         /// Create the dialog if necessary, update it and display it.
47         void show();
48         /// Hide the dialog.
49         void hide();
50         /// Update the dialog.
51         void update();
52
53         /// create an Index inset
54         void createIndex(string const &);
55         /// edit an Index  inset
56         void showIndex(InsetCommand * const);
57  
58         /// Real GUI implementation.
59         FormIndexDialog * dialog_;
60
61         /// the LyXView we belong to
62         LyXView * lv_;
63  
64         /** Which Dialogs do we belong to?
65             Used so we can get at the signals we have to connect to.
66         */
67         Dialogs * d_;
68         /// pointer to the inset if any
69         InsetCommand * inset_;
70         /// insets params
71         InsetCommandParams params;
72         /// is the inset we are reading from a readonly buffer ?
73         bool readonly;
74         
75         /// Hide connection.
76         Connection h_;
77         /// Update connection.
78         Connection u_;
79         /// Inset hide connection.
80         Connection ih_;
81 };
82
83 #endif