]> git.lyx.org Git - features.git/blob - src/frontends/qt3/QLPrintDialog.C
7c4d50625cb8d5fee0386c06cb60b2c5ec945816
[features.git] / src / frontends / qt3 / QLPrintDialog.C
1 /**
2  * \file QLPrintDialog.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 Edwin Leuven
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #include <config.h>
13
14 #include "controllers/ControlPrint.h"
15 #include "QLPrintDialog.h"
16 #include "QPrint.h"
17 #include "qt_helpers.h"
18
19 #include <qcheckbox.h>
20 #include <qlineedit.h>
21 #include <qpushbutton.h>
22 #include <qradiobutton.h>
23
24 namespace lyx {
25 namespace frontend {
26
27 QLPrintDialog::QLPrintDialog(QPrint * f)
28         : QPrintDialogBase(0, 0, false, 0),
29         form_(f)
30 {
31         connect(printPB, SIGNAL(clicked()),
32                 form_, SLOT(slotOK()));
33         connect(closePB, SIGNAL(clicked()),
34                 form_, SLOT(slotClose()));
35 }
36
37
38 void QLPrintDialog::change_adaptor()
39 {
40         form_->changed();
41 }
42
43
44 void QLPrintDialog::browseClicked()
45 {
46         QString file = toqstr(form_->controller().browse(""));
47         if (!file.isNull()) {
48                 fileED->setText(file);
49                 form_->changed();
50         }
51 }
52
53
54 void QLPrintDialog::fileChanged()
55 {
56         if (!fileED->text().isEmpty())
57                 fileRB->setChecked(true);
58         form_->changed();
59 }
60
61
62 void QLPrintDialog::copiesChanged(int i)
63 {
64         collateCB->setEnabled(i != 1);
65         form_->changed();
66 }
67
68
69 void QLPrintDialog::printerChanged()
70 {
71         printerRB->setChecked(true);
72         form_->changed();
73 }
74
75
76 void QLPrintDialog::pagerangeChanged()
77 {
78         form_->changed();
79 }
80
81 } // namespace frontend
82 } // namespace lyx