qmlFrontend/themeiconprovider.h
author unc0rr
Sun, 06 Dec 2015 20:35:58 +0300
branchqmlfrontend
changeset 11452 2572afe532af
parent 10436 084e046f6bd5
permissions -rw-r--r--
Don't send maze_size parameter when not needed, as it overwrites template_filter
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10436
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents:
diff changeset
     1
#ifndef THEMEICONPROVIDER_H
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents:
diff changeset
     2
#define THEMEICONPROVIDER_H
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents:
diff changeset
     3
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents:
diff changeset
     4
#include <QQuickImageProvider>
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents:
diff changeset
     5
#include <QImage>
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents:
diff changeset
     6
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents:
diff changeset
     7
#include "flib.h"
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents:
diff changeset
     8
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents:
diff changeset
     9
class ThemeIconProvider : public QQuickImageProvider
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents:
diff changeset
    10
{
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents:
diff changeset
    11
public:
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents:
diff changeset
    12
    ThemeIconProvider();
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents:
diff changeset
    13
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents:
diff changeset
    14
    void setFileContentsFunction(getThemeIcon_t *f);
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents:
diff changeset
    15
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents:
diff changeset
    16
    QImage requestImage(const QString &id, QSize *size, const QSize &requestedSize);
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents:
diff changeset
    17
private:
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents:
diff changeset
    18
    getThemeIcon_t *getThemeIcon;
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents:
diff changeset
    19
};
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents:
diff changeset
    20
084e046f6bd5 flib provides theme icons, qmlFrontend shows them
unc0rr
parents:
diff changeset
    21
#endif // THEMEICONPROVIDER_H