File indexing completed on 2024-05-12 15:59:51

0001 /*
0002  *  SPDX-License-Identifier: GPL-3.0-or-later
0003  */
0004 
0005 #ifndef KISRESOURCEQUERYMAPPER_H
0006 #define KISRESOURCEQUERYMAPPER_H
0007 
0008 #include <QSqlQuery>
0009 #include <QMap>
0010 
0011 class QImage;
0012 
0013 class KisResourceQueryMapper
0014 {
0015 public:
0016     /**
0017      * @brief variantFromResourceQuery returns a QVariant for the given column and or role
0018      * @param query the query: it supposed to be in the right position already
0019      */
0020     static QVariant variantFromResourceQuery(const QSqlQuery &query, int column, int role, bool useResourcePrefix);
0021 
0022 private:
0023     static QImage getThumbnailFromQuery(const QSqlQuery &query, bool useResourcePrefix);
0024 };
0025 
0026 #endif // KISRESOURCEQUERYMAPPER_H