]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiPrint.h
5c84ba23ed80e8bf026d6895a7c0ac1fe11b9dc1
[lyx.git] / src / frontends / qt4 / GuiPrint.h
1 // -*- C++ -*-
2 /**
3  * \file GuiPrint.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Allan Rae
8  * \author Angus Leeming
9  * \author John Levon
10  * \author Edwin Leuven
11  *
12  * Full author contact details are available in file CREDITS.
13  */
14
15 #ifndef GUIPRINT_H
16 #define GUIPRINT_H
17
18 #include "GuiDialog.h"
19 #include "ui_PrintUi.h"
20
21 #include "Dialog.h"
22 #include "PrinterParams.h"
23 #include "support/docstring.h"
24
25 namespace lyx {
26 namespace frontend {
27
28 class GuiPrint : public GuiDialog, public Ui::PrintUi, public Controller
29 {
30         Q_OBJECT
31
32 public:
33         GuiPrint(LyXView & lv);
34
35 private Q_SLOTS:
36         void change_adaptor();
37         void browseClicked();
38         void fileChanged();
39         void copiesChanged(int);
40         void printerChanged();
41         void pagerangeChanged();
42         /// parent controller
43         Controller & controller() { return *this; }
44
45 private:
46         /// Apply changes
47         void applyView();
48         /// update
49         void updateContents();
50         ///
51         bool initialiseParams(std::string const & data);
52         ///
53         void clearParams();
54         ///
55         void dispatchParams();
56         ///
57         bool isBufferDependent() const { return true; }
58         ///
59         bool canApplyToReadOnly() const { return true; }
60         ///
61         kb_action getLfun() const { return LFUN_BUFFER_PRINT; }
62
63         ///
64         PrinterParams params_;
65 };
66
67 } // namespace frontend
68 } // namespace lyx
69
70 #endif // GUIPRINT_H