]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiImage.h
Do not compute caret geometry when we are not ready to do so.
[lyx.git] / src / frontends / qt4 / GuiImage.h
index f531dd589d9ae430fc5a639d36534dae75ba3f1e..6f6064438a7927292adb7459f818f9aad2ed1752 100644 (file)
@@ -15,7 +15,8 @@
 
 #include "graphics/GraphicsImage.h"
 
-#include <QPixmap>
+#include <QImage>
+#include <QString>
 
 namespace lyx {
 namespace graphics {
@@ -23,12 +24,13 @@ namespace graphics {
 class GuiImage : public Image
 {
 public:
-       /// Access to this class is through this static method.
-       static Image * newImage();
+       /// Access to the class is through newImage() and clone.
+       GuiImage();
+       ///
+       GuiImage(GuiImage const &);
 
-       /// Retrieve the buffered pixmap.
-       QPixmap const & pixmap() const
-       { return is_transformed_? transformed_ : original_; }
+       /// Retrieve the rendered image.
+       QImage const & image() const;
 
 private:
        /// Create a copy
@@ -43,6 +45,7 @@ private:
         * Load the image file into memory.
         */
        bool load(support::FileName const & filename);
+       bool load();
        /**
         * Finishes the process of modifying transformed_, using
         * \c params to decide on color, grayscale etc.
@@ -57,18 +60,16 @@ private:
        /// Scale the image using params.
        bool scale(Params const & params);
 
-       /// Access to the class is through newImage() and clone.
-       GuiImage() {}
-       ///
-       GuiImage(GuiImage const &);
-
        /// The original loaded image.
-       QPixmap original_;
+       QImage original_;
 
        /// The transformed image for display.
-       QPixmap transformed_;
-       /// Buffer the pixmap itself
+       QImage transformed_;
+
+       ///
        bool is_transformed_;
+       ///
+       QString fname_;
 };
 
 } // namespace graphics