Krita Source Code Documentation
Loading...
Searching...
No Matches
KisRssReader.h
Go to the documentation of this file.
1/**************************************************************************
2**
3** This file is part of Qt Creator
4**
5** SPDX-FileCopyrightText: 2011 Nokia Corporation and /or its subsidiary(-ies).
6**
7** Contact: Nokia Corporation (qt-info@nokia.com)
8**
9**
10** SPDX-License-Identifier: LGPL-2.1-only
11**
12** In addition, as a special exception, Nokia gives you certain additional
13** rights. These rights are described in the Nokia Qt LGPL Exception
14** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
15**
16** Other Usage
17**
18** Alternatively, this file may be used in accordance with the terms and
19** conditions contained in a signed written agreement between you and Nokia.
20**
21** If you have questions regarding the use of this file, please contact
22** Nokia at qt-info@nokia.com.
23**
24**************************************************************************/
25
26#ifndef KISRSSREADER_H
27#define KISRSSREADER_H
28
29#include <QString>
30#include <QDateTime>
31#include <QXmlStreamReader>
32#include <QNetworkReply>
33#include <QFile>
34
35#include <kritaui_export.h>
36
37struct RssItem {
38 QString source;
39 QString title;
40 QString link;
41 QString description;
42 QString category;
43 QString blogName;
44 QString blogIcon;
45 QDateTime pubDate;
46
47};
49
51
52
53class KRITAUI_EXPORT KisRssReader
54{
55public:
57
58 enum RssRoles {
59 TitleRole = Qt::UserRole + 1,
65 BlogIconRole
66 };
67
68 RssItem parseItem();
69 RssItemList parseStream(QXmlStreamReader& streamReader);
70 RssItemList parse(QNetworkReply *reply);
71 RssItemList parse(QFile& file);
72
73private:
74 QXmlStreamReader m_streamReader;
75 QString requestUrl;
76 QString blogIcon;
77 QString blogName;
78};
79
80#endif // KISRSSREADER_H
QList< RssItem > RssItemList
Q_DECLARE_METATYPE(RssItem)
QXmlStreamReader m_streamReader
QString blogName
QString requestUrl
QString blogIcon
QString title
QString category
QString blogName
QString blogIcon
QDateTime pubDate
QString source
QString description
QString link