]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiSendto.h
Complete the removal of the embedding stuff. Maybe. It's hard to be sure we got every...
[lyx.git] / src / frontends / qt4 / GuiSendto.h
index 8fd9faf32a37d860e3831e39c1bff30151d15182..af13be46273d9cbf8e2d2fa23faacaf5671f7991 100644 (file)
@@ -4,6 +4,7 @@
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
+ * \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,47 @@ 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(GuiDialog &);
-       /// 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 clearParams() {}
+       ///
+       void dispatchParams();
+       ///
+       bool isBufferDependent() const { return true; }
+       ///
+       FuncCode getLfun() const { return LFUN_BUFFER_EXPORT_CUSTOM; }
+
+       /// Return a vector of those formats that can be exported from "lyx".
+       std::vector<Format const *> allFormats() const;
+
+private:
+       ///
+       Format const * format_;
+       ///
+       std::string command_;
 };
 
 } // namespace frontend