]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiExternal.h
Complete the removal of the embedding stuff. Maybe. It's hard to be sure we got every...
[lyx.git] / src / frontends / qt4 / GuiExternal.h
1 // -*- C++ -*-
2 /**
3  * \file GuiExternal.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Asger Alstrup
8  * \author John Levon
9  * \author Angus Leeming
10  *
11  * Full author contact details are available in file CREDITS.
12  */
13
14 #ifndef GUIEXTERNAL_H
15 #define GUIEXTERNAL_H
16
17 #include "GuiDialog.h"
18 #include "ui_ExternalUi.h"
19
20 #include "insets/InsetExternal.h"
21
22 #include <QHash>
23
24 namespace lyx {
25 namespace frontend {
26
27 class GuiExternal : public GuiDialog, public Ui::ExternalUi
28 {
29         Q_OBJECT
30
31 public:
32         GuiExternal(GuiView & lv);
33
34 private Q_SLOTS:
35         void bbChanged();
36         void browseClicked();
37         void change_adaptor();
38         void editClicked();
39         void extraChanged(const QString &);
40         void formatChanged(const QString &);
41         void getbbClicked();
42         void sizeChanged();
43         void templateChanged();
44         void widthUnitChanged();
45
46 private:
47         ///
48         typedef QHash<QString, QString> MapType;
49
50         ///
51         bool activateAspectratio() const;
52         /// Apply changes
53         void applyView();
54         /// update
55         void updateContents();
56         /// Helper function called when the template is changed.
57         void updateTemplate();
58
59         ///
60         bool initialiseParams(std::string const & data);
61         /// clean-up on hide.
62         void clearParams();
63         /// clean-up on hide.
64         void dispatchParams();
65         ///
66         bool isBufferDependent() const { return true; }
67
68         ///
69         void editExternal();
70         ///
71         QString browse(QString const & input_file,
72                                  QString const & template_name) const;
73
74         ///
75         MapType extra_;
76         ///
77         InsetExternalParams params_;
78         ///
79         bool bbChanged_;
80 };
81
82 } // namespace frontend
83 } // namespace lyx
84
85 #endif // GUIEXTERNAL_H