]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiImage.h
* fix spelling in comments to please John.
[lyx.git] / src / frontends / qt4 / GuiImage.h
index 57406188ced3ca26fe209f759a53d89df8beabcb..6f6064438a7927292adb7459f818f9aad2ed1752 100644 (file)
@@ -16,7 +16,7 @@
 #include "graphics/GraphicsImage.h"
 
 #include <QImage>
-#include <QPixmap>
+#include <QString>
 
 namespace lyx {
 namespace graphics {
@@ -24,55 +24,52 @@ namespace graphics {
 class GuiImage : public Image
 {
 public:
-       /// Access to this class is through this static method.
-       static Image * newImage();
-
-       /// Retrieve the buffered pixmap.
-       QPixmap const & qpixmap() const { return transformed_pixmap_; }
+       /// Access to the class is through newImage() and clone.
+       GuiImage();
+       ///
+       GuiImage(GuiImage const &);
 
-       /// Retrieve the buffered pixmap.
-       QImage const & qimage() const { return transformed_; }
+       /// Retrieve the rendered image.
+       QImage const & image() const;
 
 private:
        /// Create a copy
-       virtual Image * clone() const;
+       Image * clone() const;
        /// Get the image width
-       virtual unsigned int width() const;
+       unsigned int width() const;
        /// Get the image height
-       virtual unsigned int height() const;
+       unsigned int height() const;
        // FIXME Is the image drawable ?
-       virtual bool isDrawable() const { return true; }
+       bool isDrawable() const { return true; }
        /**
         * Load the image file into memory.
-        * The process is asynchronous, so this method starts the loading.
-        * When finished, the Image::finishedLoading signal is emitted.
         */
-       virtual void load(support::FileName const & filename);
+       bool load(support::FileName const & filename);
+       bool load();
        /**
         * Finishes the process of modifying transformed_, using
         * \c params to decide on color, grayscale etc.
         * \returns true if successful.
         */
-       virtual bool setPixmap(Params const & params);
+       bool setPixmap(Params const & params);
+
        /// Clip the image using params.
-       virtual void clip(Params const & params);
+       bool clip(Params const & params);
        /// Rotate the image using params.
-       virtual void rotate(Params const & params);
+       bool rotate(Params const & params);
        /// Scale the image using params.
-       virtual void scale(Params const & params);
-
-       /// Access to the class is through newImage() and clone.
-       GuiImage() {}
-       ///
-       GuiImage(GuiImage const &);
+       bool scale(Params const & params);
 
        /// The original loaded image.
        QImage original_;
 
        /// The transformed image for display.
        QImage transformed_;
-       /// Buffer the pixmap itself
-       QPixmap transformed_pixmap_;
+
+       ///
+       bool is_transformed_;
+       ///
+       QString fname_;
 };
 
 } // namespace graphics