]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiSendto.h
095c24914295de2c806b6a1122d3052eda9eb142
[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, public Controller
30 {
31         Q_OBJECT
32
33 public:
34         GuiSendTo(LyXView & lv);
35
36 private Q_SLOTS:
37         void changed_adaptor();
38         void slotFormatHighlighted(QListWidgetItem *) {}
39         void slotFormatSelected(QListWidgetItem *) {}
40
41 private:
42         void closeEvent(QCloseEvent * e);
43         /// parent controller
44         Controller & controller() { return *this; }
45         ///
46         bool isValid();
47         /// Apply from dialog
48         void applyView();
49         /// Update the dialog
50         void updateContents();
51
52         ///
53         std::vector<Format const *> all_formats_;
54         ///
55         bool initialiseParams(std::string const & data);
56         ///
57         void clearParams() {}
58         ///
59         void dispatchParams();
60         ///
61         bool isBufferDependent() const { return true; }
62         ///
63         kb_action getLfun() const { return LFUN_BUFFER_EXPORT_CUSTOM; }
64
65         /// Return a vector of those formats that can be exported from "lyx".
66         std::vector<Format const *> allFormats() const;
67
68 private:
69         ///
70         Format const * format_;
71         ///
72         std::string command_;
73 };
74
75 } // namespace frontend
76 } // namespace lyx
77
78 #endif // GUISENDTO_H