]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/QNoteDialog.C
Added initial qt4 work by Abdelrazak Younes
[lyx.git] / src / frontends / qt4 / QNoteDialog.C
1 /**
2  * \file QNoteDialog.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 "QNoteDialog.h"
14 #include "QNote.h"
15
16 #include <qpushbutton.h>
17 //Added by qt3to4:
18 #include <QCloseEvent>
19
20 namespace lyx {
21 namespace frontend {
22
23 QNoteDialog::QNoteDialog(QNote * form)
24         : form_(form)
25 {
26         setupUi(this);
27
28         connect(okPB, SIGNAL(clicked()),
29                 form, SLOT(slotOK()));
30         connect(closePB, SIGNAL(clicked()),
31                 form, SLOT(slotClose()));
32
33     connect( noteRB, SIGNAL( toggled(bool) ), this, SLOT( change_adaptor() ) );
34     connect( greyedoutRB, SIGNAL( toggled(bool) ), this, SLOT( change_adaptor() ) );
35     connect( commentRB, SIGNAL( toggled(bool) ), this, SLOT( change_adaptor() ) );
36 }
37
38
39 void QNoteDialog::closeEvent(QCloseEvent * e)
40 {
41         form_->slotWMHide();
42         e->accept();
43 }
44
45
46 void QNoteDialog::change_adaptor()
47 {
48         form_->changed();
49 }
50
51 } // namespace frontend
52 } // namespace lyx