akregator
subscriptionlistmodel.cpp
Go to the documentation of this file.
79 static const Akregator::TreeNode* nodeForIndex( const QModelIndex& index, const FeedList* feedList )
85 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:110
QModelIndex parent(const QModelIndex &index) const
Definition: subscriptionlistmodel.cpp:223
virtual QList< const TreeNode * > children() const
returns the (direct) children of this node.
Definition: treenode.cpp:151
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
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:124
Syndication::ErrorCode fetchErrorCode() const
Definition: feed.cpp:393
void setName(const QString &name)
Definition: subscriptionlistjobs.cpp:105
SubscriptionListModel(const boost::shared_ptr< const FeedList > &feedList, QObject *parent=0)
Definition: subscriptionlistmodel.cpp:85
void setOpen(bool open)
open/close the feed group (display it as expanded/collapsed in the tree view).
Definition: folder.cpp:291
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:374
uint nodeIdForIndex(const QModelIndex &index) const
Definition: subscriptionlistmodel.cpp:119
void itemCollapsed(const QModelIndex &index)
Definition: subscriptionlistmodel.cpp:334
void setFeedList(const boost::shared_ptr< FeedList > &feedList)
Definition: subscriptionlistmodel.cpp:361
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:51
bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent)
Definition: subscriptionlistmodel.cpp:423
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
bool setData(const QModelIndex &idx, const QVariant &value, int role=Qt::EditRole)
Definition: subscriptionlistmodel.cpp:409
void setSubscriptionId(int id)
Definition: subscriptionlistjobs.cpp:42
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:59
int columnCount(const QModelIndex &parent=QModelIndex()) const
Definition: subscriptionlistmodel.cpp:105
void setSubscriptionId(int id)
Definition: subscriptionlistjobs.cpp:100
Definition: article.h:39
bool subtreeContains(const Akregator::TreeNode *node) const
Definition: folder.cpp:338
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:58:14 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:58:14 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.