File indexing completed on 2024-04-28 04:32:47

0001 /*
0002     SPDX-FileCopyrightText: 2012 Fabio D 'Urso <fabiodurso@hotmail.it>
0003     SPDX-License-Identifier: GPL-2.0-or-later
0004 */
0005 
0006 #ifndef _OKULAR_TILE_H_
0007 #define _OKULAR_TILE_H_
0008 
0009 #include "area.h"
0010 
0011 class QPixmap;
0012 
0013 namespace Okular
0014 {
0015 /**
0016  * This class represents a rectangular portion of a page.
0017  *
0018  * It doesn't take ownership of pixmap
0019  *
0020  * @since 0.16 (KDE 4.10)
0021  */
0022 class OKULARCORE_EXPORT Tile
0023 {
0024 public:
0025     Tile(const NormalizedRect &rect, QPixmap *pixmap, bool isValid);
0026     Tile(const Tile &t);
0027     ~Tile();
0028 
0029     /**
0030      * Location of the tile
0031      */
0032     NormalizedRect rect() const;
0033 
0034     /**
0035      * Pixmap (may also be NULL)
0036      */
0037     QPixmap *pixmap() const;
0038 
0039     /**
0040      * True if the pixmap is available and updated
0041      */
0042     bool isValid() const;
0043 
0044     Tile &operator=(const Tile &other);
0045 
0046 private:
0047     class Private;
0048     Private *d;
0049 };
0050 
0051 }
0052 
0053 #endif // _OKULAR_TILE_H_