]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/QViewSourceDialog.C
enable Font cache only for MacOSX and inline width() for other platform.
[lyx.git] / src / frontends / qt4 / QViewSourceDialog.C
1 /**
2  * \file QViewSourceDialog.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 Bo Peng
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #include <config.h>
13
14 #include "QViewSourceDialog.h"
15 #include "QViewSource.h"
16
17 #include <QPushButton>
18 #include <QCloseEvent>
19
20
21 namespace lyx {
22 namespace frontend {
23
24 QViewSourceDialog::QViewSourceDialog(QViewSource * form)
25         : form_(form)
26 {
27         setupUi(this);
28
29         connect(closePB, SIGNAL(clicked()), form, SLOT(slotClose()));
30         connect(viewFullSourceCB, SIGNAL(toggled(bool)),
31                 this, SLOT(slotUpdate()));
32         connect(autoUpdateCB, SIGNAL(toggled(bool)),
33                 updatePB, SLOT(setDisabled(bool)));
34         connect(updatePB, SIGNAL(clicked()),
35                 this, SLOT(slotUpdate()));
36 }
37
38
39 void QViewSourceDialog::closeEvent(QCloseEvent * e)
40 {
41         form_->slotWMHide();
42         e->accept();
43 }
44
45
46 void QViewSourceDialog::slotUpdate()
47 {
48         form_->update_source();
49 }
50
51 } // namespace frontend
52 } // namespace lyx
53
54 #include "QViewSourceDialog_moc.cpp"