X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt4%2FGuiGraphics.h;h=67a4cbeac299d05cf32cbf354e92b2e1085b91ae;hb=425d092204118ea6c24c28e85fdf03fcf2bb51a4;hp=45744ae38ecc079ea0b4bc6b816bb1f53f690e8a;hpb=a1cec91afaca91968b46e695533c10ad2a3f73d3;p=lyx.git diff --git a/src/frontends/qt4/GuiGraphics.h b/src/frontends/qt4/GuiGraphics.h index 45744ae38e..67a4cbeac2 100644 --- a/src/frontends/qt4/GuiGraphics.h +++ b/src/frontends/qt4/GuiGraphics.h @@ -5,51 +5,87 @@ * Licence details can be found in the file COPYING. * * \author John Levon - * \author Herbert Voß + * \author Herbert Voß + * \author Baruch Even + * \author Angus Leeming * * Full author contact details are available in file CREDITS. */ -#ifndef QGRAPHICS_H -#define QGRAPHICS_H +#ifndef GUIGRAPHICS_H +#define GUIGRAPHICS_H -#include "GuiDialogView.h" -#include "GuiGraphicsDialog.h" +#include "GuiDialog.h" +#include "ui_GraphicsUi.h" + +#include "insets/InsetGraphicsParams.h" + +#include "support/docstring.h" #include +class QString; + namespace lyx { -namespace frontend { -class ControlGraphics; +namespace frontend { -/// -class GuiGraphics - : public QController > +class GuiGraphics : public GuiDialog, public Ui::GraphicsUi { + Q_OBJECT + public: + GuiGraphics(GuiView & lv); + void setAutoText(); + +private Q_SLOTS: + void change_adaptor(); + void changeGroup(int); + void changeBB(); + void on_newGroupPB_clicked(); + void on_browsePB_clicked(); + void on_getPB_clicked(); + void on_scaleCB_toggled(bool); + void on_WidthCB_toggled(bool); + void on_HeightCB_toggled(bool); + void on_angle_textChanged(const QString &); + +private: /// - friend class GuiGraphicsDialog; + bool isValid(); + /// Dialog inherited methods + //@{ + void applyView(); + void updateContents() {} + bool initialiseParams(std::string const & data); + void clearParams(); + void dispatchParams(); + bool isBufferDependent() const { return true; } + //@} + /// - GuiGraphics(Dialog &); -protected: - virtual bool isValid(); -private: - /// Apply changes - virtual void apply(); - /// update - virtual void update_contents(); - /// build the dialog - virtual void build_dialog(); + void paramsToDialog(InsetGraphicsParams const & params); + /// get bounding box from file void getBB(); + /// Browse for a file + QString browse(QString const &) const; + /// Read the Bounding Box from a eps or ps-file + std::string readBoundingBox(std::string const & file); + /// test if file exist + bool isFileNameValid(std::string const & fname) const; + /// Control the bb + bool bbChanged; /// Store the LaTeX names for the rotation origins. std::vector origin_ltx; - + /// + InsetGraphicsParams params_; + /// the current graphics group + std::string current_group_; }; } // namespace frontend } // namespace lyx -#endif // QGRAPHICS_H +#endif // GUIGRAPHICS_H