]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiSendto.h
Merge QController into individual dialogs. Also various cleanup
[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 Jürgen Spitzmüller
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef GUISENDTO_H
13 #define GUISENDTO_H
14
15 #include "GuiDialogView.h"
16 #include "ControlSendto.h"
17 #include "ui_SendtoUi.h"
18
19 #include <QDialog>
20
21 #include <vector>
22
23 class QListWidgetItem;
24
25 namespace lyx {
26
27 class Format;
28
29 namespace frontend {
30
31 class GuiSendto;
32
33 class GuiSendtoDialog : public QDialog, public Ui::SendtoUi {
34         Q_OBJECT
35 public:
36         GuiSendtoDialog(GuiSendto * form);
37 protected Q_SLOTS:
38         virtual void changed_adaptor();
39         virtual void slotFormatHighlighted(QListWidgetItem *) {}
40         virtual void slotFormatSelected(QListWidgetItem *) {}
41 protected:
42         virtual void closeEvent(QCloseEvent * e);
43 private:
44         GuiSendto * form_;
45 };
46
47
48 /** This class provides a Qt implementation of the Custom Export Dialog.
49  */
50 class GuiSendto : public GuiView<GuiSendtoDialog>
51 {
52 public:
53         ///
54         friend class GuiSendtoDialog;
55         ///
56         GuiSendto(Dialog &);
57         /// parent controller
58         ControlSendto & controller()
59         { return static_cast<ControlSendto &>(this->getController()); }
60         /// parent controller
61         ControlSendto const & controller() const
62         { return static_cast<ControlSendto const &>(this->getController()); }
63 protected:
64         virtual bool isValid();
65 private:
66         /// Apply from dialog
67         virtual void apply();
68         /// Update the dialog
69         virtual void update_contents();
70         /// Build the dialog
71         virtual void build_dialog();
72         ///
73         std::vector<Format const *> all_formats_;
74 };
75
76 } // namespace frontend
77 } // namespace lyx
78
79 #endif // GUISENDTO_H