]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiPrint.h
Whitespace.
[lyx.git] / src / frontends / qt4 / GuiPrint.h
index dc1a87d814768d87f26f7ed14bfd3c9e7ebe7423..c0af9572c76d5d04a749fb5a2696c42496fcb218 100644 (file)
@@ -4,42 +4,64 @@
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
+ * \author Allan Rae
+ * \author Angus Leeming
  * \author John Levon
  * \author Edwin Leuven
  *
  * Full author contact details are available in file CREDITS.
  */
 
-#ifndef QPRINT_H
-#define QPRINT_H
+#ifndef GUIPRINT_H
+#define GUIPRINT_H
 
-#include "GuiDialogView.h"
-#include "GuiPrintDialog.h"
+#include "GuiDialog.h"
+#include "ui_PrintUi.h"
+
+#include "Dialog.h"
+#include "PrinterParams.h"
 
 namespace lyx {
 namespace frontend {
 
-class ControlPrint;
-
-///
-class GuiPrint
-       : public QController<ControlPrint, GuiView<GuiPrintDialog> >
+class GuiPrint : public GuiDialog, public Ui::PrintUi
 {
+       Q_OBJECT
+
 public:
-       ///
-       friend class GuiPrintDialog;
-       ///
-       GuiPrint(Dialog &);
+       GuiPrint(GuiView & lv);
+
+private Q_SLOTS:
+       void change_adaptor();
+       void browseClicked();
+       void fileChanged();
+       void copiesChanged(int);
+       void printerChanged();
+       void pagerangeChanged();
+
 private:
        /// Apply changes
-       virtual void apply();
+       void applyView();
        /// update
-       virtual void update_contents();
-       /// build the dialog
-       virtual void build_dialog();
+       void updateContents();
+       ///
+       bool initialiseParams(std::string const & data);
+       ///
+       void clearParams();
+       ///
+       void dispatchParams();
+       ///
+       bool isBufferDependent() const { return true; }
+       ///
+       bool canApplyToReadOnly() const { return true; }
+       ///
+       FuncCode getLfun() const { return LFUN_BUFFER_PRINT; }
+
+       ///
+       PrinterParams params_;
 };
 
 } // namespace frontend
 } // namespace lyx
 
-#endif // QPRINT_H
+#endif // GUIPRINT_H