15#include <QApplication>
23 QCursor loadImpl(
const QString &cursorName,
int hotspotX,
int hotspotY) {
24 QPixmap cursorImage = QPixmap(
":/" + cursorName);
25 if (cursorImage.isNull()) {
26 qWarning() <<
"Could not load cursor from qrc, trying filesystem" << cursorName;
28 if (cursorImage.isNull()) {
29 qWarning() <<
"Could not load cursor from filesystem" << cursorName;
30 return Qt::ArrowCursor;
34 return QCursor(cursorImage, hotspotX, hotspotY);
53 QCursor newCursor = loadImpl(cursorName, hotspotX, hotspotY);
54 cursorHash.insert(cursorName, QPair<QPoint, QCursor>(QPoint(hotspotX, hotspotY), newCursor));
Q_GLOBAL_STATIC(KisStoragePluginRegistry, s_instance)
static KisCursorCache * instance()
QHash< QString, QPair< QPoint, QCursor > > cursorHash
QCursor load(const QString &cursorName, int hotspotX, int hotspotY)
static QString findAsset(const QString &type, const QString &fileName)