summaryrefslogblamecommitdiffstats
path: root/src/sessionsiconholder.h
blob: 336ce40be01cccdc30fb9acf813f4607d30691f7 (plain) (tree)







































                                                                         
/*
 * sessionsiconholder.h
 *
 *  Created on: Mar 7, 2014
 *      Author: nils
 */

#ifndef SESSIONSICONHOLDER_H_
#define SESSIONSICONHOLDER_H_

#include <QHash>
#include <QtDebug>
#include <QFile>
#include <QIcon>
#include <QResource>
#include <QFileInfo>

#include "globals.h"
#include "sessionsiconholder.h"
#include "FileDownloader.h"


class SessionsIconHolder : QObject {
	Q_OBJECT

private:
	QHash<QString, QIcon> iconsResource;
	QHash<QString, QIcon> iconsFile;
	QHash<QString, QIcon> iconsURL;
public:
	SessionsIconHolder();

	QIcon getIconFromResource(const QString& name);
	QIcon getIconFromFile(const QString& filename);
	QIcon getIconFromURL(const QUrl& url);
public slots:
	void afterDownload(QString& iconName, QByteArray downloadedData);
};

#endif /* SESSIONSICONHOLDER_H_ */