]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiExternal.h
Account for old versions of Pygments
[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 extraChanged(const QString &);
39         void formatChanged(const QString &);
40         void getbbClicked();
41         void sizeChanged();
42         void templateChanged();
43         void widthUnitChanged();
44
45 private:
46         ///
47         typedef QHash<QString, QString> MapType;
48
49         ///
50         bool activateAspectratio() const;
51         /// Apply changes
52         void applyView();
53         /// update
54         void updateContents();
55         /// Helper function called when the template is changed.
56         void updateTemplate();
57         ///
58         bool usingScale() const;
59
60         ///
61         bool initialiseParams(std::string const & data);
62         /// clean-up on hide.
63         void clearParams();
64         /// clean-up on hide.
65         void dispatchParams();
66         ///
67         bool isBufferDependent() const { return true; }
68
69         ///
70         QString browse(QString const & input_file,
71                                  QString const & template_name) const;
72
73         ///
74         MapType extra_;
75         ///
76         InsetExternalParams params_;
77         ///
78         bool bbChanged_;
79 };
80
81 } // namespace frontend
82 } // namespace lyx
83
84 #endif // GUIEXTERNAL_H