]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/QNoteDialog.C
Port of Martin Vermeer's QNote work: fix of framed and shaded note.
[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     connect( framedRB, SIGNAL( toggled(bool) ), this, SLOT( change_adaptor() ) );
37     connect( shadedRB, SIGNAL( toggled(bool) ), this, SLOT( change_adaptor() ) );
38 }
39
40
41 void QNoteDialog::closeEvent(QCloseEvent * e)
42 {
43         form_->slotWMHide();
44         e->accept();
45 }
46
47
48 void QNoteDialog::change_adaptor()
49 {
50         form_->changed();
51 }
52
53 } // namespace frontend
54 } // namespace lyx
55
56 #include "QNoteDialog_moc.cpp"