]> git.lyx.org Git - lyx.git/blob - src/frontends/qt2/QGraphicsDialog.C
Herbert's bb units fix
[lyx.git] / src / frontends / qt2 / QGraphicsDialog.C
1 /**
2  * \file QGraphicsDialog.C
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author John Levon
7  *
8  * Full author contact details are available in file CREDITS
9  */
10
11 #include <config.h>
12
13 #ifdef __GNUG__
14 #pragma implementation
15 #endif
16
17 #include "ControlGraphics.h"
18 #include "debug.h"
19 #include "LString.h"
20
21 #include <qwidget.h>
22 #include <qpushbutton.h>
23 #include <qlineedit.h>
24 #include <qcheckbox.h>
25
26 #include "QGraphicsDialog.h"
27 #include "QGraphics.h"
28
29 #include <vector>
30
31
32 QGraphicsDialog::QGraphicsDialog(QGraphics * form)
33         : QGraphicsDialogBase(0, 0, false, 0),
34         form_(form)
35 {
36         connect(okPB, SIGNAL(clicked()),
37                 form, SLOT(slotOK()));
38         connect(applyPB, SIGNAL(clicked()),
39                 form, SLOT(slotApply()));
40         connect(closePB, SIGNAL(clicked()),
41                 form, SLOT(slotClose()));
42         connect(restorePB, SIGNAL(clicked()),
43                 form, SLOT(slotRestore()));
44 }
45
46
47 void QGraphicsDialog::show()
48 {
49         QGraphicsDialogBase::show();
50         filename->setFocus();
51 }
52
53
54 void QGraphicsDialog::change_adaptor()
55 {
56         form_->changed();
57 }
58
59
60 void QGraphicsDialog::change_bb()
61 {
62         form_->controller().bbChanged = true;
63         form_->changed();
64 }
65
66
67 void QGraphicsDialog::closeEvent(QCloseEvent * e)
68 {
69         form_->slotWMHide();
70         e->accept();
71 }
72
73
74 void QGraphicsDialog::browse_clicked()
75 {
76         form_->browse();
77 }
78
79 void QGraphicsDialog::get_clicked()
80 {
81         form_->get();
82 }