4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
10 * \author Angus Leeming
12 * Full author contact details are available in file CREDITS.
18 #include "GuiDialog.h"
19 #include "ui_GraphicsUi.h"
21 #include "support/docstring.h"
22 #include "insets/InsetGraphics.h"
32 class InsetGraphicsParams;
38 class GuiGraphics : public GuiDialog, public Ui::GraphicsUi, public Controller
43 GuiGraphics(LyXView & lv);
47 void change_adaptor();
49 void on_browsePB_clicked();
50 void on_getPB_clicked();
51 void on_editPB_clicked();
52 void on_filename_textChanged(const QString &);
53 void on_scaleCB_toggled(bool);
54 void on_WidthCB_toggled(bool);
55 void on_HeightCB_toggled(bool);
56 void on_angle_textChanged(const QString &);
59 void closeEvent(QCloseEvent * e);
61 Controller & controller() { return *this; }
66 void updateContents();
67 /// get bounding box from file
70 /// Store the LaTeX names for the rotation origins.
71 std::vector<std::string> origin_ltx;
73 bool initialiseParams(std::string const & data);
77 void dispatchParams();
79 bool isBufferDependent() const { return true; }
82 docstring const browse(docstring const &) const;
83 /// Read the Bounding Box from a eps or ps-file
84 std::string const readBB(std::string const & file);
87 /// test if file exist
88 bool isFilenameValid(std::string const & fname) const;
94 InsetGraphicsParams params_;
98 /// get the units for the bounding box
99 std::vector<std::string> const getBBUnits();
101 /// The (tranlated) GUI std::string and it's LaTeX equivalent.
102 typedef std::pair<docstring, std::string> RotationOriginPair;
104 std::vector<RotationOriginPair> getRotationOriginData();
106 } // namespace frontend
109 #endif // GUIGRAPHICS_H