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 "insets/InsetGraphicsParams.h"
31 class GuiGraphics : public GuiDialog, public Ui::GraphicsUi
36 GuiGraphics(GuiView & lv);
40 void change_adaptor();
41 void changeGroup(int);
43 void on_newGroupPB_clicked();
44 void on_browsePB_clicked();
45 void on_getPB_clicked();
46 void on_editPB_clicked();
47 void on_chooseSamplePB_clicked();
48 void on_okPB_clicked();
49 void on_scaleCB_toggled(bool);
50 void on_WidthCB_toggled(bool);
51 void on_HeightCB_toggled(bool);
52 void updateAspectRatioStatus();
53 void on_aspectratio_toggled(bool);
54 void on_angle_textChanged(const QString &);
59 /// Dialog inherited methods
62 void updateContents() {}
63 bool initialiseParams(std::string const & data);
65 void dispatchParams();
66 bool isBufferDependent() const { return true; }
70 void paramsToDialog(InsetGraphicsParams const & params);
72 /// get bounding box from file
75 QString browse(QString const &) const;
76 /// Read the Bounding Box from a eps or ps-file
77 std::string readBoundingBox(std::string const & file);
78 /// test if file exist
79 bool isFileNameValid(std::string const & fname) const;
80 /// Check if file exists, if not, ask whether ok to continue
81 bool checkFileExists();
85 /// Store the LaTeX names for the rotation origins.
86 std::vector<std::string> origin_ltx;
88 InsetGraphicsParams params_;
89 /// the current graphics group
90 std::string current_group_;
93 } // namespace frontend
96 #endif // GUIGRAPHICS_H