]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiGraphics.h
Complete the removal of the embedding stuff. Maybe. It's hard to be sure we got every...
[lyx.git] / src / frontends / qt4 / GuiGraphics.h
index e70e23c134dc1c8d9e8443e45f5b3de30c65e7eb..3e767bb38ac32039149c1ae907f1f57b0b06d38b 100644 (file)
@@ -6,6 +6,8 @@
  *
  * \author John Levon
  * \author Herbert Voß
+ * \author Baruch Even
+ * \author Angus Leeming
  *
  * Full author contact details are available in file CREDITS.
  */
 #define GUIGRAPHICS_H
 
 #include "GuiDialog.h"
-#include "ControlGraphics.h"
 #include "ui_GraphicsUi.h"
 
+#include "support/docstring.h"
+#include "insets/InsetGraphics.h"
+
 #include <vector>
 
 class QString;
 
 namespace lyx {
+
+class InsetGraphics;
+class InsetGraphicsParams;
+
 namespace frontend {
 
-class GuiGraphicsDialog : public GuiDialog, public Ui::GraphicsUi
+class GuiGraphics : public GuiDialog, public Ui::GraphicsUi
 {
        Q_OBJECT
+
 public:
-       GuiGraphicsDialog(LyXView & lv);
+       GuiGraphics(GuiView & lv);
        void setAutoText();
+
 private Q_SLOTS:
        void change_adaptor();
        void change_bb();
        void on_browsePB_clicked();
        void on_getPB_clicked();
-       void on_editPB_clicked();
-       void on_filename_textChanged(const QString &);
        void on_scaleCB_toggled(bool);
        void on_WidthCB_toggled(bool);
        void on_HeightCB_toggled(bool);
        void on_angle_textChanged(const QString &);
+
 private:
-       void closeEvent(QCloseEvent * e);
-       /// parent controller
-       ControlGraphics & controller() const;
+       ///
        bool isValid();
        /// Apply changes
        void applyView();
        /// update
-       void update_contents();
+       void updateContents();
        /// get bounding box from file
        void getBB();
 
        /// Store the LaTeX names for the rotation origins.
        std::vector<std::string> origin_ltx;
+       ///
+       bool initialiseParams(std::string const & data);
+       /// clean-up on hide.
+       void clearParams();
+       /// clean-up on hide.
+       void dispatchParams();
+       ///
+       bool isBufferDependent() const { return true; }
+
+       /// 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);
+       /// Control the bb
+       bool bbChanged;
+       /// test if file exist
+       bool isFileNameValid(std::string const & fname) const;
+
+private:
+       ///
+       InsetGraphicsParams params_;
 };
 
 } // namespace frontend