]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiSendto.h
64284c180d8724a7fe4a87e6ee06896ff938ea04
[lyx.git] / src / frontends / qt4 / GuiSendto.h
1 // -*- C++ -*-
2 /**
3  * \file GuiSendto.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Angus Leeming
8  * \author Jürgen Spitzmüller
9  *
10  * Full author contact details are available in file CREDITS.
11  */
12
13 #ifndef GUISENDTO_H
14 #define GUISENDTO_H
15
16 #include "GuiDialog.h"
17 #include "ui_SendtoUi.h"
18
19 #include <vector>
20
21 class QListWidgetItem;
22
23 namespace lyx {
24
25 class Format;
26
27 namespace frontend {
28
29 class GuiSendTo : public GuiDialog, public Ui::SendtoUi
30 {
31         Q_OBJECT
32
33 public:
34         GuiSendTo(GuiView & lv);
35
36 private Q_SLOTS:
37         void changed_adaptor();
38         void slotFormatHighlighted(QListWidgetItem *) {}
39         void slotFormatSelected(QListWidgetItem *) {}
40
41 private:
42         ///
43         bool isValid();
44         /// Apply from dialog
45         void applyView();
46         /// Update the dialog
47         void updateContents();
48
49         ///
50         std::vector<Format const *> all_formats_;
51         ///
52         bool initialiseParams(std::string const & data);
53         ///
54         void paramsToDialog(Format const * format, QString const & command);
55         ///
56         void clearParams() {}
57         ///
58         void dispatchParams();
59         ///
60         bool isBufferDependent() const { return true; }
61         ///
62         FuncCode getLfun() const { return LFUN_BUFFER_EXPORT_CUSTOM; }
63
64         /// Return a vector of those formats that can be exported from "lyx".
65         std::vector<Format const *> allFormats() const;
66
67 private:
68         ///
69         Format const * format_;
70         ///
71         QString command_;
72 };
73
74 } // namespace frontend
75 } // namespace lyx
76
77 #endif // GUISENDTO_H