* 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 QSENDTO_H
-#define QSENDTO_H
+#ifndef GUISENDTO_H
+#define GUISENDTO_H
-#include "GuiDialogView.h"
+#include "GuiDialog.h"
#include "ui_SendtoUi.h"
-#include <QDialog>
-
#include <vector>
-class QCloseEvent;
class QListWidgetItem;
namespace lyx {
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 *) {}
-class ControlSendto;
+private:
+ ///
+ bool isValid();
+ /// Apply from dialog
+ void applyView();
+ /// Update the dialog
+ void updateContents();
-/** This class provides a Qt implementation of the Custom Export Dialog.
- */
-class GuiSendto
- : public QController<ControlSendto, GuiView<GuiSendtoDialog> >
-{
-public:
///
- friend class GuiSendtoDialog;
+ bool initialiseParams(std::string const & data);
+ ///
+ void paramsToDialog(Format const * format, QString const & command);
+ ///
+ void clearParams() {}
+ ///
+ void dispatchParams();
///
- GuiSendto(Dialog &);
-protected:
- virtual bool isValid();
+ bool isBufferDependent() const { return true; }
+ ///
+ FuncCode getLfun() const { return LFUN_BUFFER_EXPORT_CUSTOM; }
+
private:
- /// Apply from dialog
- virtual void apply();
- /// Update the dialog
- virtual void update_contents();
- /// Build the dialog
- virtual void build_dialog();
///
- std::vector<Format const *> all_formats_;
+ Format const * format_;
+ ///
+ QString command_;
};
} // namespace frontend
} // namespace lyx
-#endif // QSENDTO_H
+#endif // GUISENDTO_H