]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/QFloatDialog.C
rename LFUN enum values according to their command (as used in th minibuffer/bind...
[lyx.git] / src / frontends / qt4 / 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 //Added by qt3to4:
16 #include <QCloseEvent>
17 #include "floatplacement.h"
18
19 #include <qpushbutton.h>
20
21
22 namespace lyx {
23 namespace frontend {
24
25 QFloatDialog::QFloatDialog(QFloat * form)
26         : form_(form)
27 {
28         setupUi(this);
29         connect(restorePB, SIGNAL(clicked()),
30                 form, SLOT(slotRestore()));
31         connect(okPB, SIGNAL(clicked()),
32                 form, SLOT(slotOK()));
33         connect(applyPB, SIGNAL(clicked()),
34                 form, SLOT(slotApply()));
35         connect(closePB, SIGNAL(clicked()),
36                 form, SLOT(slotClose()));
37
38         // enable span columns checkbox
39         floatFP->useWide();
40
41         // enable sideways checkbox
42         floatFP->useSideways();
43
44         connect(floatFP, SIGNAL(changed()),
45                 this, SLOT(change_adaptor()));
46 }
47
48
49 void QFloatDialog::change_adaptor()
50 {
51         form_->changed();
52 }
53
54
55 void QFloatDialog::closeEvent(QCloseEvent * e)
56 {
57         form_->slotWMHide();
58         e->accept();
59 }
60
61 } // namespace frontend
62 } // namespace lyx