4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Asger Alstrup
9 * \author Angus Leeming
11 * Full author contact details are available in file CREDITS.
17 #include "GuiDialog.h"
18 #include "ui_ExternalUi.h"
20 #include "support/types.h"
22 #include "insets/InsetExternal.h"
34 class RotationDataType;
36 } // namespace external
40 class GuiExternal : public GuiDialog, public Ui::ExternalUi
45 GuiExternal(GuiView & lv);
50 void change_adaptor();
52 void extraChanged(const QString&);
53 void formatChanged(const QString&);
56 void templateChanged();
57 void widthUnitChanged();
61 typedef QHash<QString, QString> MapType;
65 bool activateAspectratio() const;
69 void updateContents();
70 /// Helper function called when the template is changed.
71 void updateTemplate();
72 /// get bounding box from file
78 bool initialiseParams(std::string const & data);
82 void dispatchParams();
84 bool isBufferDependent() const { return true; }
89 std::vector<std::string> templates() const;
91 int templateNumber(std::string const &) const;
93 external::Template getTemplate(int) const;
95 std::string templateFilters(std::string const & template_name) const;
97 QString browse(QString const & input_file,
98 QString const & template_name) const;
100 /// Read the Bounding Box from a eps or ps-file
101 std::string const readBB(std::string const & file);
105 InsetExternalParams params_;
109 } // namespace frontend
112 #endif // GUIEXTERNAL_H