qmlFrontend/themeiconprovider.h
author unc0rr
Fri, 22 Dec 2017 23:59:03 +0100
branchqmlfrontend
changeset 12862 90f927b4b9e1
parent 10436 084e046f6bd5
permissions -rw-r--r--
Start hacking new frontend
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