]> git.lyx.org Git - lyx.git/blob - src/frontends/qt2/QFloatDialog.C
some tabular fixes for the problems reported by Helge
[lyx.git] / src / frontends / qt2 / QFloatDialog.C
1 /**
2  * \file QFloatDialog.C
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author Edwin Leuven
7  *
8  * Full author contact details are available in file CREDITS.
9  */
10
11 #include <config.h>
12
13 #include "QFloatDialog.h"
14 #include "QFloat.h"
15 #include "floatplacement.h"
16
17 #include <qpushbutton.h>
18
19
20 namespace lyx {
21 namespace frontend {
22
23 QFloatDialog::QFloatDialog(QFloat * form)
24         : QFloatDialogBase(0, 0, false, 0),
25         form_(form)
26 {
27         connect(restorePB, SIGNAL(clicked()),
28                 form, SLOT(slotRestore()));
29         connect(okPB, SIGNAL(clicked()),
30                 form, SLOT(slotOK()));
31         connect(applyPB, SIGNAL(clicked()),
32                 form, SLOT(slotApply()));
33         connect(closePB, SIGNAL(clicked()),
34                 form, SLOT(slotClose()));
35
36         // enable span columns checkbox
37         floatFP->useWide();
38
39         // enable sideways checkbox
40         floatFP->useSideways();
41
42         connect(floatFP, SIGNAL(changed()),
43                 this, SLOT(change_adaptor()));
44 }
45
46
47 void QFloatDialog::change_adaptor()
48 {
49         form_->changed();
50 }
51
52
53 void QFloatDialog::closeEvent(QCloseEvent * e)
54 {
55         form_->slotWMHide();
56         e->accept();
57 }
58
59 } // namespace frontend
60 } // namespace lyx