]> git.lyx.org Git - lyx.git/blob - src/frontends/qt2/FormRefDialog.C
Fixed connections. There is still a bug somewhere.
[lyx.git] / src / frontends / qt2 / FormRefDialog.C
1 #include "FormRefDialog.h"
2 #include "Dialogs.h"
3 #include "FormRef.h"
4
5 /* 
6  *  Constructs a FormRefDialog which is a child of 'parent', with the 
7  *  name 'name' and widget flags set to 'f' 
8  *
9  *  The dialog will by default be modeless, unless you set 'modal' to
10  *  TRUE to construct a modal dialog.
11  */
12 FormRefDialog::FormRefDialog( FormRef* _form, QWidget* parent,  const char* name, bool modal, WFlags fl )
13   : FormReferenceDialogBase( parent, name, modal, fl ),
14     form( _form )
15 {
16 }
17
18 /*  
19  *  Destroys the object and frees any allocated resources
20  */
21 FormRefDialog::~FormRefDialog()
22 {
23     // no need to delete child widgets, Qt does it all for us
24 }
25
26 /* 
27  * public slot
28  */
29 void FormRefDialog::apply_adaptor()
30 {
31   form->apply();
32   form->close();
33   hide();
34 }
35 /* 
36  * public slot
37  */
38 void FormRefDialog::goto_adaptor()
39 {
40   form->goto_ref();
41 }
42 /* 
43  * public slot
44  */
45 void FormRefDialog::highlight_adaptor(const QString& sel)
46 {
47   form->highlight(sel); 
48 }
49 /* 
50  * public slot
51  */
52 void FormRefDialog::close_adaptor()
53 {
54   form->close();
55   hide();
56 }
57 /* 
58  * public slot
59  */
60 void FormRefDialog::select_adaptor(const QString& sel)
61 {
62   form->select(sel);
63 }
64 /* 
65  * public slot
66  */
67 void FormRefDialog::sort_adaptor(bool sort)
68 {
69   form->set_sort(sort);
70 }
71 /* 
72  * public slot
73  */
74 void FormRefDialog::update_adaptor()
75 {
76   form->do_ref_update();
77 }
78
79 void FormRefDialog::closeEvent(QCloseEvent *e)
80 {
81   form->close();
82   e->accept();
83 }