X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt4%2FGuiImage.h;h=6f6064438a7927292adb7459f818f9aad2ed1752;hb=425d092204118ea6c24c28e85fdf03fcf2bb51a4;hp=2bdfb6af73e084cffffe55cff6e0ed642f6cbf13;hpb=79036bcede894c24516c4dbacf026a8cdf426460;p=lyx.git diff --git a/src/frontends/qt4/GuiImage.h b/src/frontends/qt4/GuiImage.h index 2bdfb6af73..6f6064438a 100644 --- a/src/frontends/qt4/GuiImage.h +++ b/src/frontends/qt4/GuiImage.h @@ -15,7 +15,7 @@ #include "graphics/GraphicsImage.h" -#include +#include #include namespace lyx { @@ -24,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 @@ -44,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. @@ -58,17 +60,13 @@ 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_;