Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/desktop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCamila San <hello@camila.codes>2018-04-25 18:19:05 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2018-07-30 23:06:00 +0300
commit00a73b5ded022175ddef6ff0c1329b3d901f7e0e (patch)
tree2946c76341518b492ec7e27f46d8494d9fafd159 /src/gui/iconjob.h
parent49377976dbf3396b72ec6886d50e31a46207965c (diff)
Adds class to retrieve icons.
- This is an attempt to cache the icons. Signed-off-by: Camila San <hello@camila.codes>
Diffstat (limited to 'src/gui/iconjob.h')
-rw-r--r--src/gui/iconjob.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/src/gui/iconjob.h b/src/gui/iconjob.h
new file mode 100644
index 000000000..1ad107890
--- /dev/null
+++ b/src/gui/iconjob.h
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) by Camila Ayres <hello@camila.codes>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * for more details.
+ */
+
+#ifndef ICONJOB_H
+#define ICONJOB_H
+
+#include <QObject>
+#include <QByteArray>
+#include <QNetworkAccessManager>
+#include <QNetworkRequest>
+#include <QNetworkReply>
+
+namespace OCC {
+
+/**
+ * @brief Job to fetch a icon
+ * @ingroup gui
+ */
+class IconJob : public QObject
+{
+ Q_OBJECT
+public:
+ explicit IconJob(const QUrl &url, QObject *parent = 0);
+
+signals:
+ void jobFinished(QByteArray iconData);
+
+private slots:
+ void finished(QNetworkReply *reply);
+
+private:
+ QNetworkAccessManager _accessManager;
+};
+}
+
+#endif // ICONJOB_H