X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt4%2FGuiPrint.h;h=c0af9572c76d5d04a749fb5a2696c42496fcb218;hb=ee7dd4a11ea21851e7e32164c66b37d3bc8ac31d;hp=b8f8c15d8b552775ecaf771d21eb0d5c7bdd96dd;hpb=fc36725282df43059aee9a821f098309ccdbd523;p=lyx.git diff --git a/src/frontends/qt4/GuiPrint.h b/src/frontends/qt4/GuiPrint.h index b8f8c15d8b..c0af9572c7 100644 --- a/src/frontends/qt4/GuiPrint.h +++ b/src/frontends/qt4/GuiPrint.h @@ -4,6 +4,8 @@ * 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 * @@ -13,53 +15,50 @@ #ifndef GUIPRINT_H #define GUIPRINT_H -#include "GuiDialogView.h" -#include "ControlPrint.h" +#include "GuiDialog.h" #include "ui_PrintUi.h" -#include +#include "Dialog.h" +#include "PrinterParams.h" namespace lyx { namespace frontend { -class GuiPrint; - -class GuiPrintDialog : public QDialog, public Ui::PrintUi { +class GuiPrint : public GuiDialog, public Ui::PrintUi +{ Q_OBJECT + public: - GuiPrintDialog(GuiPrint * f); -protected Q_SLOTS: - virtual void change_adaptor(); - virtual void browseClicked(); - virtual void fileChanged(); - virtual void copiesChanged(int); - virtual void printerChanged(); - virtual void pagerangeChanged(); -private: - GuiPrint * form_; -}; + GuiPrint(GuiView & lv); +private Q_SLOTS: + void change_adaptor(); + void browseClicked(); + void fileChanged(); + void copiesChanged(int); + void printerChanged(); + void pagerangeChanged(); -class GuiPrint : public GuiView -{ -public: - /// - friend class GuiPrintDialog; - /// - GuiPrint(Dialog &); - /// parent controller - ControlPrint & controller() - { return static_cast(this->getController()); } - /// parent controller - ControlPrint const & controller() const - { return static_cast(this->getController()); } 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