]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiSendto.h
move Controller inheritance further up the tree
[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(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         ///
44         bool isValid();
45         /// Apply from dialog
46         void applyView();
47         /// Update the dialog
48         void updateContents();
49
50         ///
51         std::vector<Format const *> all_formats_;
52         ///
53         bool initialiseParams(std::string const & data);
54         ///
55         void clearParams() {}
56         ///
57         void dispatchParams();
58         ///
59         bool isBufferDependent() const { return true; }
60         ///
61         kb_action getLfun() const { return LFUN_BUFFER_EXPORT_CUSTOM; }
62
63         /// Return a vector of those formats that can be exported from "lyx".
64         std::vector<Format const *> allFormats() const;
65
66 private:
67         ///
68         Format const * format_;
69         ///
70         std::string command_;
71 };
72
73 } // namespace frontend
74 } // namespace lyx
75
76 #endif // GUISENDTO_H