]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/QWrapDialog.C
enable Font cache only for MacOSX and inline width() for other platform.
[lyx.git] / src / frontends / qt4 / QWrapDialog.C
1 /**
2  * \file QWrapDialog.C
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author Jürgen Spitzmüller
7  *
8  * Full author contact details are available in file CREDITS.
9  */
10
11 #include <config.h>
12
13 #include "QWrapDialog.h"
14 #include "QWrap.h"
15
16 #include <qpushbutton.h>
17 //Added by qt3to4:
18 #include <QCloseEvent>
19
20 namespace lyx {
21 namespace frontend {
22
23
24 QWrapDialog::QWrapDialog(QWrap * form)
25         : form_(form)
26 {
27         setupUi(this);
28
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     connect( widthED, SIGNAL( textChanged(const QString&) ), this, SLOT( change_adaptor() ) );
39     connect( unitsLC, SIGNAL( selectionChanged(LyXLength::UNIT) ), this, SLOT( change_adaptor() ) );
40     connect( valignCO, SIGNAL( highlighted(const QString&) ), this, SLOT( change_adaptor() ) );
41 }
42
43
44 void QWrapDialog::closeEvent(QCloseEvent * e)
45 {
46         form_->slotWMHide();
47         e->accept();
48 }
49
50
51 void QWrapDialog::change_adaptor()
52 {
53         form_->changed();
54 }
55
56 } // namespace frontend
57 } // namespace lyx
58
59 #include "QWrapDialog_moc.cpp"