qmlFrontend/themeiconprovider.h
author unc0rr
Sat, 25 Apr 2015 23:46:09 +0300
branchqmlfrontend
changeset 10900 6a805e822074
parent 10436 084e046f6bd5
permissions -rw-r--r--
Some hedgewars coding a week keeps doctor away
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