mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-16 21:10:26 +00:00
c293be56bd
In particular, the directory frontends/qt4 is renamed to frontends/qt. Many configurations file have to be updated. All mentions of qt4 in the source have been audited, and changed to qt if necessary. The only part that has not been updated is the CMake build system.
79 lines
1.6 KiB
C++
79 lines
1.6 KiB
C++
// -*- C++ -*-
|
|
/**
|
|
* \file GuiImage.h
|
|
* This file is part of LyX, the document processor.
|
|
* Licence details can be found in the file COPYING.
|
|
*
|
|
* \author Angus Leeming
|
|
* \author John Levon
|
|
*
|
|
* Full author contact details are available in file CREDITS.
|
|
*/
|
|
|
|
#ifndef GUIIMAGE_H
|
|
#define GUIIMAGE_H
|
|
|
|
#include "graphics/GraphicsImage.h"
|
|
|
|
#include <QImage>
|
|
#include <QString>
|
|
|
|
namespace lyx {
|
|
namespace graphics {
|
|
|
|
class GuiImage : public Image
|
|
{
|
|
public:
|
|
/// Access to the class is through newImage() and clone.
|
|
GuiImage();
|
|
///
|
|
GuiImage(GuiImage const &);
|
|
|
|
/// Retrieve the rendered image.
|
|
QImage const & image() const;
|
|
|
|
private:
|
|
/// Create a copy
|
|
Image * clone() const;
|
|
/// Get the image width
|
|
unsigned int width() const;
|
|
/// Get the image height
|
|
unsigned int height() const;
|
|
// FIXME Is the image drawable ?
|
|
bool isDrawable() const { return true; }
|
|
/**
|
|
* 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.
|
|
* \returns true if successful.
|
|
*/
|
|
bool setPixmap(Params const & params);
|
|
|
|
/// Clip the image using params.
|
|
bool clip(Params const & params);
|
|
/// Rotate the image using params.
|
|
bool rotate(Params const & params);
|
|
/// Scale the image using params.
|
|
bool scale(Params const & params);
|
|
|
|
/// The original loaded image.
|
|
QImage original_;
|
|
|
|
/// The transformed image for display.
|
|
QImage transformed_;
|
|
|
|
///
|
|
bool is_transformed_;
|
|
///
|
|
QString fname_;
|
|
};
|
|
|
|
} // namespace graphics
|
|
} // namespace lyx
|
|
|
|
#endif // GUIIMAGE_H
|