]> git.lyx.org Git - features.git/blob - src/frontends/qt2/QGraphicsDialog.C
Remove all unnecessary #includes from header files.
[features.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  * \author Herbert Voß
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #include <config.h>
13
14
15 #include "ControlGraphics.h"
16 #include "debug.h"
17 #include "qt_helpers.h"
18
19 #include <qpushbutton.h>
20 #include <qlineedit.h>
21
22 #include "lengthcombo.h"
23
24 #include "QGraphicsDialog.h"
25 #include "QGraphics.h"
26
27
28
29 QGraphicsDialog::QGraphicsDialog(QGraphics * form)
30         : QGraphicsDialogBase(0, 0, false, 0),
31         form_(form)
32 {
33         connect(okPB, SIGNAL(clicked()),
34                 form, SLOT(slotOK()));
35         connect(applyPB, SIGNAL(clicked()),
36                 form, SLOT(slotApply()));
37         connect(closePB, SIGNAL(clicked()),
38                 form, SLOT(slotClose()));
39         connect(restorePB, SIGNAL(clicked()),
40                 form, SLOT(slotRestore()));
41 }
42
43
44 void QGraphicsDialog::show()
45 {
46         QGraphicsDialogBase::show();
47         filename->setFocus();
48 }
49
50
51 void QGraphicsDialog::change_adaptor()
52 {
53         form_->changed();
54 }
55
56
57 void QGraphicsDialog::change_bb()
58 {
59         form_->controller().bbChanged = true;
60         lyxerr[Debug::GRAPHICS]
61                 << "[controller().bb_Changed set to true]\n";
62         form_->changed();
63 }
64
65
66 void QGraphicsDialog::change_WUnit()
67 {
68         bool useHeight = (widthUnit->currentItem() > 0);
69         height->setEnabled(useHeight);
70         heightUnit->setEnabled(useHeight);
71         form_->changed();
72 }
73
74
75 void QGraphicsDialog::closeEvent(QCloseEvent * e)
76 {
77         form_->slotWMHide();
78         e->accept();
79 }
80
81
82 void QGraphicsDialog::browse_clicked()
83 {
84         string const str = 
85                 form_->controller().Browse(fromqstr(filename->text()));
86         filename->setText(toqstr(str));
87         form_->changed();
88 }
89
90
91 void QGraphicsDialog::getBB_clicked()
92 {
93         form_->getBB();
94 }