]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiSendto.h
* fix spelling in comments to please John.
[lyx.git] / src / frontends / qt4 / GuiSendto.h
index efdd78b41f25f4929b83b5baff1d88910635395c..38f0f531a780b0f16567a2a98c5e351f5cd029e9 100644 (file)
@@ -4,7 +4,8 @@
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
- * \author Jürgen Spitzmüller
+ * \author Angus Leeming
+ * \author Jürgen Spitzmüller
  *
  * Full author contact details are available in file CREDITS.
  */
 #ifndef GUISENDTO_H
 #define GUISENDTO_H
 
-#include "GuiDialogView.h"
-#include "ControlSendto.h"
+#include "GuiDialog.h"
 #include "ui_SendtoUi.h"
 
-#include <QDialog>
-
 #include <vector>
 
 class QListWidgetItem;
@@ -28,49 +26,46 @@ class Format;
 
 namespace frontend {
 
-class GuiSendto;
-
-class GuiSendtoDialog : public QDialog, public Ui::SendtoUi {
+class GuiSendTo : public GuiDialog, public Ui::SendtoUi
+{
        Q_OBJECT
+
 public:
-       GuiSendtoDialog(GuiSendto * form);
-protected Q_SLOTS:
-       virtual void changed_adaptor();
-       virtual void slotFormatHighlighted(QListWidgetItem *) {}
-       virtual void slotFormatSelected(QListWidgetItem *) {}
-protected:
-       virtual void closeEvent(QCloseEvent * e);
-private:
-       GuiSendto * form_;
-};
+       GuiSendTo(GuiView & lv);
 
+private Q_SLOTS:
+       void changed_adaptor();
+       void slotFormatHighlighted(QListWidgetItem *) {}
+       void slotFormatSelected(QListWidgetItem *) {}
 
-/** This class provides a Qt implementation of the Custom Export Dialog.
- */
-class GuiSendto : public GuiView<GuiSendtoDialog>
-{
-public:
-       ///
-       friend class GuiSendtoDialog;
-       ///
-       GuiSendto(Dialog &);
-       /// parent controller
-       ControlSendto & controller()
-       { return static_cast<ControlSendto &>(this->getController()); }
-       /// parent controller
-       ControlSendto const & controller() const
-       { return static_cast<ControlSendto const &>(this->getController()); }
-protected:
-       virtual bool isValid();
 private:
+       ///
+       bool isValid();
        /// Apply from dialog
-       virtual void apply();
+       void applyView();
        /// Update the dialog
-       virtual void update_contents();
-       /// Build the dialog
-       virtual void build_dialog();
+       void updateContents();
+
        ///
        std::vector<Format const *> all_formats_;
+       ///
+       bool initialiseParams(std::string const & data);
+       ///
+       void paramsToDialog(Format const * format, QString const & command);
+       ///
+       void clearParams() {}
+       ///
+       void dispatchParams();
+       ///
+       bool isBufferDependent() const { return true; }
+       ///
+       FuncCode getLfun() const { return LFUN_BUFFER_EXPORT_CUSTOM; }
+
+private:
+       ///
+       Format const * format_;
+       ///
+       QString command_;
 };
 
 } // namespace frontend