4 * Copyright 2002 the LyX Team
5 * Read the file COPYING
7 * \author Angus Leeming, a.leeming@ic.ac.uk
8 * \author John Levon <moz@compsoc.man.ac.uk>
18 #include "graphics/GraphicsImage.h"
24 class QLImage : public Image
27 /// Access to this class is through this static method.
28 static ImagePtr newImage();
30 /// Return the list of loadable formats.
31 static FormatList loadableFormats();
36 virtual Image * clone() const;
39 virtual Pixmap getPixmap() const;
41 QPixmap const & qpixmap() const { return xformed_pixmap_; }
43 /// Get the image width
44 virtual unsigned int getWidth() const;
46 /// Get the image height
47 virtual unsigned int getHeight() const;
50 * Load the image file into memory.
51 * The process is asynchronous, so this method starts the loading.
52 * When finished, the Image::finishedLoading signal is emitted.
54 virtual void load(string const & filename);
57 * Generate the pixmap, based on the current state of
58 * image_ (clipped, rotated, scaled etc).
59 * Uses the params to decide on color, grayscale etc.
60 * Returns true if the pixmap is created.
62 virtual bool setPixmap(Params const & params);
64 /// Clip the image using params.
65 virtual void clip(Params const & params);
67 /// Rotate the image using params.
68 virtual void rotate(Params const & params);
70 /// Scale the image using params.
71 virtual void scale(Params const & params);
74 /// Access to the class is through newImage() and clone.
77 QLImage(QLImage const &);
79 /// the original loaded image
82 /// the transformed pixmap for display
83 QPixmap xformed_pixmap_;