Warning, file /frameworks/khtml/src/imload/imagetile.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /*
0002     Large image displaying library.
0003 
0004     Copyright (C) 2004,2005 Maks Orlovich (maksim@kde.org)
0005 
0006     Permission is hereby granted, free of charge, to any person obtaining a copy
0007     of this software and associated documentation files (the "Software"), to deal
0008     in the Software without restriction, including without limitation the rights
0009     to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
0010     copies of the Software, and to permit persons to whom the Software is
0011     furnished to do so, subject to the following conditions:
0012 
0013     The above copyright notice and this permission notice shall be included in
0014     all copies or substantial portions of the Software.
0015 
0016     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
0017     IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
0018     FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
0019     AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
0020     AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
0021     CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
0022 
0023 */
0024 
0025 #ifndef IMAGE_TILE_H
0026 #define IMAGE_TILE_H
0027 
0028 #include <QImage>
0029 #include <cstring>
0030 
0031 #include "tile.h"
0032 #include "imagemanager.h"
0033 
0034 namespace khtmlImLoad
0035 {
0036 
0037 class ImageTile: public Tile
0038 {
0039 public:
0040     //### consider making this a pointer, seems quite heavy
0041     QImage        image;
0042 
0043     void discard() override
0044     {
0045         //Set the image to be null
0046         image = QImage();
0047     }
0048 
0049     ImageTile()
0050     {}
0051 
0052     ~ImageTile()
0053     {
0054         if (cacheNode) {
0055             ImageManager::imageCache()->removeEntry(this);
0056         }
0057     }
0058 };
0059 
0060 }
0061 
0062 #endif