2021-05-24 07:25:56 +00:00
|
|
|
/*
|
|
|
|
SPDX-FileCopyrightText: 2012 Fabio D 'Urso <fabiodurso@hotmail.it>
|
|
|
|
SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
*/
|
2012-11-08 20:29:09 +00:00
|
|
|
|
|
|
|
#ifndef _OKULAR_TILE_H_
|
|
|
|
#define _OKULAR_TILE_H_
|
|
|
|
|
|
|
|
#include "area.h"
|
|
|
|
|
|
|
|
class QPixmap;
|
|
|
|
|
|
|
|
namespace Okular
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* This class represents a rectangular portion of a page.
|
|
|
|
*
|
2012-11-12 03:05:23 +00:00
|
|
|
* It doesn't take ownership of pixmap
|
|
|
|
*
|
2012-11-08 20:29:09 +00:00
|
|
|
* @since 0.16 (KDE 4.10)
|
|
|
|
*/
|
2014-10-27 21:35:06 +00:00
|
|
|
class OKULARCORE_EXPORT Tile
|
2012-11-08 20:29:09 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
Tile(const NormalizedRect &rect, QPixmap *pixmap, bool isValid);
|
|
|
|
Tile(const Tile &t);
|
|
|
|
~Tile();
|
2020-07-10 22:15:05 +00:00
|
|
|
|
2012-11-08 20:29:09 +00:00
|
|
|
/**
|
|
|
|
* Location of the tile
|
|
|
|
*/
|
|
|
|
NormalizedRect rect() const;
|
2020-07-10 22:15:05 +00:00
|
|
|
|
2012-11-08 20:29:09 +00:00
|
|
|
/**
|
|
|
|
* Pixmap (may also be NULL)
|
|
|
|
*/
|
|
|
|
QPixmap *pixmap() const;
|
2020-07-10 22:15:05 +00:00
|
|
|
|
2012-11-08 20:29:09 +00:00
|
|
|
/**
|
|
|
|
* True if the pixmap is available and updated
|
|
|
|
*/
|
|
|
|
bool isValid() const;
|
2020-07-10 22:15:05 +00:00
|
|
|
|
2012-11-10 04:54:09 +00:00
|
|
|
Tile &operator=(const Tile &other);
|
2020-07-10 22:15:05 +00:00
|
|
|
|
2012-11-08 20:29:09 +00:00
|
|
|
private:
|
|
|
|
class Private;
|
|
|
|
Private *d;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // _OKULAR_TILE_H_
|