File indexing completed on 2024-03-24 15:17:03

0001 /*
0002     SPDX-FileCopyrightText: 2015-2017 Pavel Mraz
0003 
0004     SPDX-FileCopyrightText: 2017 Jasem Mutlaq
0005 
0006     SPDX-License-Identifier: GPL-2.0-or-later
0007 */
0008 
0009 #ifndef HIPS_H
0010 #define HIPS_H
0011 
0012 #include <QString>
0013 #include <QImage>
0014 #include <QDebug>
0015 
0016 #define HIPS_FRAME_EQT          0
0017 #define HIPS_FRAME_GAL          1
0018 
0019 typedef struct
0020 {
0021   QString cachePath;
0022   qint64  discCacheSize;
0023   int     memoryCacheSize;   // count
0024 } hipsCache_t;
0025 
0026 class pixCacheItem_t
0027 {  
0028 public:
0029    pixCacheItem_t() = default;
0030 
0031   ~pixCacheItem_t()
0032    {
0033      //qDebug() << Q_FUNC_INFO << "delete";
0034      Q_ASSERT(image);
0035      delete image;
0036    }
0037 
0038   QImage *image { nullptr };
0039 };
0040 
0041 typedef struct
0042 {
0043   int    level;
0044   int    pix;
0045   qint64 uid;  
0046 } pixCacheKey_t;
0047 
0048 Q_DECLARE_METATYPE(pixCacheKey_t)
0049 
0050 #endif // HIPS_H