]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiPrint.h
Transfer some more dialog related code from core to frontend:
[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
29 {
30         Q_OBJECT
31
32 public:
33         GuiPrint(GuiView & 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
43 private:
44         /// Apply changes
45         void applyView();
46         /// update
47         void updateContents();
48         ///
49         bool initialiseParams(std::string const & data);
50         ///
51         void clearParams();
52         ///
53         void dispatchParams();
54         ///
55         bool isBufferDependent() const { return true; }
56         ///
57         bool canApplyToReadOnly() const { return true; }
58         ///
59         kb_action getLfun() const { return LFUN_BUFFER_PRINT; }
60
61         ///
62         PrinterParams params_;
63 };
64
65 } // namespace frontend
66 } // namespace lyx
67
68 #endif // GUIPRINT_H