]> git.lyx.org Git - lyx.git/blob - src/frontends/qt2/FormUrl.h
Add an updateParagraph signal, take the opportunity to make a couple of
[lyx.git] / src / frontends / qt2 / FormUrl.h
1 // -*- C++ -*-
2 /* FormUrl.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 FORMURL_H
19 #define FORMURL_H
20
21 #include "DialogBase.h"
22 #include "LString.h"
23 #include "boost/utility.hpp"
24 #include "insets/inseturl.h"
25
26 class Dialogs;
27 class LyXView;
28 class FormUrlDialog;
29
30 class FormUrl : public DialogBase {
31 public: 
32         /**@name Constructors and Destructors */
33         //@{
34         ///
35         FormUrl(LyXView *, Dialogs *);
36         /// 
37         ~FormUrl();
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 a URL inset
54         void createUrl(string const &);
55         /// edit a URL inset
56         void showUrl(InsetCommand * const);
57  
58         /// Real GUI implementation.
59         FormUrlDialog * 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