#include <KisMultiFeedRSSModel.h>
Definition at line 41 of file KisMultiFeedRSSModel.h.
◆ MultiFeedRssModel() [1/2]
| MultiFeedRssModel::MultiFeedRssModel |
( |
QObject * | parent = 0 | ) |
|
|
explicit |
◆ MultiFeedRssModel() [2/2]
◆ ~MultiFeedRssModel()
| MultiFeedRssModel::~MultiFeedRssModel |
( |
| ) |
|
|
override |
◆ addFeed()
| void MultiFeedRssModel::addFeed |
( |
const QString & | feed | ) |
|
|
virtual |
◆ appendFeedData
| void MultiFeedRssModel::appendFeedData |
( |
QNetworkReply * | reply | ) |
|
|
privateslot |
◆ articleCount()
| int MultiFeedRssModel::articleCount |
( |
| ) |
const |
|
inline |
◆ articleCountChanged
| void MultiFeedRssModel::articleCountChanged |
( |
int | arg | ) |
|
|
signal |
◆ data()
| QVariant MultiFeedRssModel::data |
( |
const QModelIndex & | index, |
|
|
int | role = Qt::DisplayRole ) const |
|
override |
Definition at line 141 of file KisMultiFeedRSSModel.cpp.
142{
145
146 switch (role) {
147 case Qt::DisplayRole:
148 {
149 QTextDocument doc;
151
152
153
154 QString text = doc.firstBlock().text();
155 if (text.length() > 292) {
156 text.truncate(290);
157 text.append("...");
158 }
159 return QString(
"<b><a href=\"" + item.
link +
"\">" + item.
title +
"</a></b>"
160 "<br><small>(" + QLocale().
toString(item.
pubDate.toLocalTime(), QLocale::ShortFormat) +
") "
161 "<p style=\"margin-top: 4px\">" + text + "</p></small>");
162 }
168 return item.
pubDate.toString(
"dd-MM-yyyy hh:mm");
177 }
178 }
179
180 return QVariant();
181}
QString toString(const QString &value)
References RssItem::blogIcon, KisRssReader::BlogIconRole, RssItem::blogName, KisRssReader::BlogNameRole, RssItem::category, KisRssReader::CategoryRole, RssItem::description, KisRssReader::DescriptionRole, RssItem::link, KisRssReader::LinkRole, m_aggregatedFeed, RssItem::pubDate, KisRssReader::PubDateRole, RssItem::title, and KisRssReader::TitleRole.
◆ feedDataChanged
| void MultiFeedRssModel::feedDataChanged |
( |
| ) |
|
|
signal |
◆ initialize()
| void MultiFeedRssModel::initialize |
( |
| ) |
|
|
private |
◆ removeFeed()
| void MultiFeedRssModel::removeFeed |
( |
const QString & | feed | ) |
|
◆ roleNames()
| QHash< int, QByteArray > MultiFeedRssModel::roleNames |
( |
| ) |
const |
|
override |
◆ rowCount()
| int MultiFeedRssModel::rowCount |
( |
const QModelIndex & | parent = QModelIndex() | ) |
const |
|
override |
◆ setArticleCount
| void MultiFeedRssModel::setArticleCount |
( |
int | arg | ) |
|
|
inlineslot |
◆ sortAggregatedFeed()
| void MultiFeedRssModel::sortAggregatedFeed |
( |
| ) |
|
|
private |
◆ MockMultiFeedRssModel
| friend class MockMultiFeedRssModel |
|
friend |
◆ m_aggregatedFeed
◆ m_articleCount
| int MultiFeedRssModel::m_articleCount |
|
private |
◆ m_networkAccessManager
◆ m_sites
◆ articleCount
| int MultiFeedRssModel::articleCount |
|
readwrite |
The documentation for this class was generated from the following files: