]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/QChangesDialog.C
This new citation dialog follows a new design similar to lyx-1.3:
[lyx.git] / src / frontends / qt4 / QChangesDialog.C
1 /**
2  * \file QChangesDialog.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  *
8  * Full author contact details are available in file CREDITS.
9  */
10
11 #include <config.h>
12
13 #include "QChangesDialog.h"
14
15 #include <QPushButton>
16 #include <QCloseEvent>
17
18
19 namespace lyx {
20 namespace frontend {
21
22 QChangesDialog::QChangesDialog(QChanges * form)
23         : form_(form)
24 {
25         setupUi(this);
26         connect(closePB, SIGNAL(clicked()),
27                 form, SLOT(slotClose()));
28
29     connect( nextPB, SIGNAL( clicked() ), this, SLOT( nextPressed() ) );
30     connect( rejectPB, SIGNAL( clicked() ), this, SLOT( rejectPressed() ) );
31     connect( acceptPB, SIGNAL( clicked() ), this, SLOT( acceptPressed() ) );
32 }
33
34
35 void QChangesDialog::nextPressed()
36 {
37         form_->next();
38 }
39
40
41 void QChangesDialog::acceptPressed()
42 {
43         form_->accept();
44 }
45
46
47 void QChangesDialog::rejectPressed()
48 {
49         form_->reject();
50 }
51
52
53 void QChangesDialog::closeEvent(QCloseEvent *e)
54 {
55         form_->slotWMHide();
56         e->accept();
57 }
58
59 } // namespace frontend
60 } // namespace lyx