X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt4%2FGuiImage.h;h=6f6064438a7927292adb7459f818f9aad2ed1752;hb=425d092204118ea6c24c28e85fdf03fcf2bb51a4;hp=f531dd589d9ae430fc5a639d36534dae75ba3f1e;hpb=374ec4be5779d57be84689d39bc96c85aa134450;p=lyx.git diff --git a/src/frontends/qt4/GuiImage.h b/src/frontends/qt4/GuiImage.h index f531dd589d..6f6064438a 100644 --- a/src/frontends/qt4/GuiImage.h +++ b/src/frontends/qt4/GuiImage.h @@ -15,7 +15,8 @@ #include "graphics/GraphicsImage.h" -#include +#include +#include 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