akregator
subscriptionlistmodel.cpp
Go to the documentation of this file.
78 static const Akregator::TreeNode* nodeForIndex( const QModelIndex& index, const FeedList* feedList )
84 Akregator::SubscriptionListModel::SubscriptionListModel( const shared_ptr<const FeedList>& feedList, QObject* parent ) : QAbstractItemModel( parent ), m_feedList( feedList ), m_beganRemoval( false )
165 return feed && feed->isFetching() ? node->icon().pixmap( KIconLoader::SizeSmall, QIcon::Active ) : node->icon();
205 QVariant Akregator::SubscriptionListModel::headerData( int section, Qt::Orientation, int role ) const
244 QModelIndex Akregator::SubscriptionListModel::index( int row, int column, const QModelIndex& parent ) const
247 return ( row == 0 && m_feedList ) ? createIndex( row, column , m_feedList->allFeedsFolder()->id() ) : QModelIndex();
278 void Akregator::SubscriptionListModel::aboutToRemoveSubscription( Akregator::TreeNode* subscription )
352 FolderExpansionHandler::FolderExpansionHandler( QObject* parent ) : QObject( parent ), m_feedList(), m_model( 0 )
440 const TreeNode* const droppedOnNode = qobject_cast<const TreeNode*>( nodeForIndex( parent, m_feedList.get() ) );
445 const Folder* const destFolder = droppedOnNode->isGroup() ? qobject_cast<const Folder*>( droppedOnNode ) : droppedOnNode->parent();
467 const TreeNode* const after = droppedOnNode->isGroup() ? destFolder->childAt( row ) : droppedOnNode;
virtual QIcon icon() const =0
int rowCount(const QModelIndex &parent=QModelIndex()) const
Definition: subscriptionlistmodel.cpp:109
QByteArray data(const QString &mimeType) const
virtual QList< const TreeNode * > children() const
returns the (direct) children of this node.
Definition: treenode.cpp:151
virtual bool hasFormat(const QString &mimeType) const
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const
Definition: subscriptionlistmodel.cpp:244
virtual bool isAggregation() const =0
returns if the node represents an aggregation, i.e.
virtual int unread() const =0
The unread count, returns the number of new/unread articles in the node (for groups: the accumulated ...
QStringList mimeTypes() const
Definition: subscriptionlistmodel.cpp:376
QMimeData * mimeData(const QModelIndexList &indexes) const
Definition: subscriptionlistmodel.cpp:383
qint64 internalId() const
bool isEmpty() const
virtual int totalCount() const =0
returns the number of total articles in the node (for groups: the accumulated count of the subtree) ...
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
Definition: subscriptionlistmodel.cpp:123
QPixmap pixmap(const QSize &size, Mode mode, State state) const
bool isValid() const
Syndication::ErrorCode fetchErrorCode() const
Definition: feed.cpp:391
int toInt(bool *ok) const
void setName(const QString &name)
Definition: subscriptionlistjobs.cpp:105
SubscriptionListModel(const boost::shared_ptr< const FeedList > &feedList, QObject *parent=0)
Definition: subscriptionlistmodel.cpp:84
void setOpen(bool open)
open/close the feed group (display it as expanded/collapsed in the tree view).
Definition: folder.cpp:291
int row() const
void setDestination(int folder, int afterChild)
Definition: subscriptionlistjobs.cpp:47
QString xmlUrl() const
returns the url of the actual feed source (rss/rdf/atom file)
Definition: feed.cpp:372
uint nodeIdForIndex(const QModelIndex &index) const
Definition: subscriptionlistmodel.cpp:118
Definition: article.h:41
void itemCollapsed(const QModelIndex &index)
Definition: subscriptionlistmodel.cpp:334
void setFeedList(const boost::shared_ptr< FeedList > &feedList)
Definition: subscriptionlistmodel.cpp:361
QModelIndex parent() const
bool atEnd() const
void setModel(Akregator::SubscriptionListModel *model)
Definition: subscriptionlistmodel.cpp:356
void itemExpanded(const QModelIndex &index)
Definition: subscriptionlistmodel.cpp:328
Qt::ItemFlags flags(const QModelIndex &index) const
Definition: subscriptionlistmodel.cpp:366
#define AKREGATOR_TREENODE_MIMETYPE
Definition: subscriptionlistmodel.cpp:50
bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent)
Definition: subscriptionlistmodel.cpp:423
QVariant data(int role) const
FolderExpansionHandler(QObject *parent=0)
Definition: subscriptionlistmodel.cpp:352
virtual bool isGroup() const =0
Helps the rest of the app to decide if node should be handled as group or not.
Represents a folder (containing feeds and/or other folders)
Definition: folder.h:44
int column() const
bool setData(const QModelIndex &idx, const QVariant &value, int role=Qt::EditRole)
Definition: subscriptionlistmodel.cpp:409
virtual Qt::ItemFlags flags(const QModelIndex &index) const
void setSubscriptionId(int id)
Definition: subscriptionlistjobs.cpp:42
void setData(const QString &mimeType, const QByteArray &data)
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QObject * parent() const
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
Definition: subscriptionlistmodel.cpp:205
Abstract base class for all kind of elements in the feed tree, like feeds and feed groups (and search...
Definition: treenode.h:58
QString toString() const
int columnCount(const QModelIndex &parent=QModelIndex()) const
Definition: subscriptionlistmodel.cpp:104
void setSubscriptionId(int id)
Definition: subscriptionlistjobs.cpp:100
void setUrls(const QList< QUrl > &urls)
bool subtreeContains(const Akregator::TreeNode *node) const
Definition: folder.cpp:338
typedef ItemFlags
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:34:00 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:34:00 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.