GuiPrintNomencl.{cpp,h}:
[lyx.git] / src / frontends / qt4 / GuiImage.h
blob6f6064438a7927292adb7459f818f9aad2ed1752
1 // -*- C++ -*-
2 /**
3 * \file GuiImage.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Angus Leeming
8 * \author John Levon
10 * Full author contact details are available in file CREDITS.
13 #ifndef GUIIMAGE_H
14 #define GUIIMAGE_H
16 #include "graphics/GraphicsImage.h"
18 #include <QImage>
19 #include <QString>
21 namespace lyx {
22 namespace graphics {
24 class GuiImage : public Image
26 public:
27 /// Access to the class is through newImage() and clone.
28 GuiImage();
29 ///
30 GuiImage(GuiImage const &);
32 /// Retrieve the rendered image.
33 QImage const & image() const;
35 private:
36 /// Create a copy
37 Image * clone() const;
38 /// Get the image width
39 unsigned int width() const;
40 /// Get the image height
41 unsigned int height() const;
42 // FIXME Is the image drawable ?
43 bool isDrawable() const { return true; }
44 /**
45 * Load the image file into memory.
47 bool load(support::FileName const & filename);
48 bool load();
49 /**
50 * Finishes the process of modifying transformed_, using
51 * \c params to decide on color, grayscale etc.
52 * \returns true if successful.
54 bool setPixmap(Params const & params);
56 /// Clip the image using params.
57 bool clip(Params const & params);
58 /// Rotate the image using params.
59 bool rotate(Params const & params);
60 /// Scale the image using params.
61 bool scale(Params const & params);
63 /// The original loaded image.
64 QImage original_;
66 /// The transformed image for display.
67 QImage transformed_;
69 ///
70 bool is_transformed_;
71 ///
72 QString fname_;
75 } // namespace graphics
76 } // namespace lyx
78 #endif // GUIIMAGE_H