• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

akregator

  • sources
  • kde-4.14
  • kdepim
  • akregator
  • src
subscriptionlistmodel.cpp
Go to the documentation of this file.
1 /*
2  This file is part of Akregator.
3 
4  Copyright (C) 2007 Frank Osterfeld <osterfeld@kde.org>
5 
6  This program is free software you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation either version 2 of the License, or
9  (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program if not, write to the Free Software
18  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 
20  As a special exception, permission is given to link this program
21  with any edition of Qt, and distribute the resulting executable,
22  without including the source code for Qt in the source distribution.
23 */
24 
25 #include "subscriptionlistmodel.h"
26 #include "feed.h"
27 #include "feedlist.h"
28 #include "folder.h"
29 #include "subscriptionlistjobs.h"
30 #include "treenode.h"
31 
32 #include <KDebug>
33 #include <KIconLoader>
34 #include <KLocalizedString>
35 
36 #include <QByteArray>
37 #include <QDataStream>
38 #include <QIcon>
39 #include <QList>
40 #include <QMimeData>
41 #include <QUrl>
42 #include <QVariant>
43 
44 #include <cassert>
45 
46 using namespace boost;
47 using namespace Akregator;
48 using namespace Syndication;
49 
50 #define AKREGATOR_TREENODE_MIMETYPE "akregator/treenode-id"
51 
52 
53 namespace {
54 
55  static QString errorCodeToString( Syndication::ErrorCode err )
56  {
57  switch ( err )
58  {
59  case Timeout:
60  return i18n( "Timeout on remote server" );
61  case UnknownHost:
62  return i18n( "Unknown host" );
63  case FileNotFound:
64  return i18n( "Feed file not found on remote server" );
65  case InvalidXml:
66  return i18n( "Could not read feed (invalid XML)" );
67  case XmlNotAccepted:
68  return i18n( "Could not read feed (unknown format)" );
69  case InvalidFormat:
70  return i18n( "Could not read feed (invalid feed)" );
71  case Success:
72  case Aborted:
73  default:
74  return QString();
75  }
76  }
77 
78  static const Akregator::TreeNode* nodeForIndex( const QModelIndex& index, const FeedList* feedList )
79  {
80  return ( !index.isValid() || !feedList ) ? 0 : feedList->findByID( index.internalId() );
81  }
82 }
83 
84 Akregator::SubscriptionListModel::SubscriptionListModel( const shared_ptr<const FeedList>& feedList, QObject* parent ) : QAbstractItemModel( parent ), m_feedList( feedList ), m_beganRemoval( false )
85 {
86  if ( !m_feedList )
87  return;
88  connect( m_feedList.get(), SIGNAL(signalNodeAdded(Akregator::TreeNode*)),
89  this, SLOT(subscriptionAdded(Akregator::TreeNode*)) );
90  connect( m_feedList.get(), SIGNAL(signalAboutToRemoveNode(Akregator::TreeNode*)),
91  this, SLOT(aboutToRemoveSubscription(Akregator::TreeNode*)) );
92  connect( m_feedList.get(), SIGNAL(signalNodeRemoved(Akregator::TreeNode*)),
93  this, SLOT(subscriptionRemoved(Akregator::TreeNode*)) );
94  connect( m_feedList.get(), SIGNAL(signalNodeChanged(Akregator::TreeNode*)),
95  this, SLOT(subscriptionChanged(Akregator::TreeNode*)) );
96  connect( m_feedList.get(), SIGNAL(fetchStarted(Akregator::Feed*)),
97  this, SLOT(fetchStarted(Akregator::Feed*)) );
98  connect( m_feedList.get(), SIGNAL(fetched(Akregator::Feed*)),
99  this, SLOT(fetched(Akregator::Feed*)) );
100  connect( m_feedList.get(), SIGNAL(fetchAborted(Akregator::Feed*)),
101  this, SLOT(fetchAborted(Akregator::Feed*)) );
102 }
103 
104 int Akregator::SubscriptionListModel::columnCount( const QModelIndex& ) const
105 {
106  return 3;
107 }
108 
109 int Akregator::SubscriptionListModel::rowCount( const QModelIndex& parent ) const
110 {
111  if ( !parent.isValid() )
112  return 1;
113 
114  const Akregator::TreeNode* const node = nodeForIndex( parent, m_feedList.get() );
115  return node ? node->children().count() : 0;
116 }
117 
118 uint Akregator::SubscriptionListModel::nodeIdForIndex( const QModelIndex& idx ) const
119 {
120  return idx.isValid() ? idx.internalId() : 0;
121 }
122 
123 QVariant Akregator::SubscriptionListModel::data( const QModelIndex& index, int role ) const
124 {
125  if ( !index.isValid() )
126  return QVariant();
127 
128  const Akregator::TreeNode* const node = nodeForIndex( index, m_feedList.get() );
129 
130  if ( !node )
131  return QVariant();
132 
133  switch ( role )
134  {
135  case Qt::EditRole:
136  case Qt::DisplayRole:
137  {
138  switch ( index.column() )
139  {
140  case TitleColumn:
141  return node->title();
142  case UnreadCountColumn:
143  return node->unread();
144  case TotalCountColumn:
145  return node->totalCount();
146  }
147  break;
148  }
149  case Qt::ToolTipRole:
150  {
151  if ( node->isGroup() || node->isAggregation() )
152  return node->title();
153  const Feed* const feed = qobject_cast<const Feed* const>( node );
154  if ( !feed )
155  return QString();
156  if ( feed->fetchErrorOccurred() )
157  return i18n( "Could not fetch feed: %1", errorCodeToString( feed->fetchErrorCode() ) );
158  return feed->title();
159  }
160  case Qt::DecorationRole:
161  {
162  if ( index.column() != TitleColumn )
163  return QVariant();
164  const Feed* const feed = qobject_cast<const Feed* const>( node );
165  return feed && feed->isFetching() ? node->icon().pixmap( KIconLoader::SizeSmall, QIcon::Active ) : node->icon();
166  }
167  case SubscriptionIdRole:
168  {
169  return node->id();
170  }
171  case IsGroupRole:
172  {
173  return node->isGroup();
174  }
175  case IsFetchableRole:
176  {
177  return !node->isGroup() && !node->isAggregation();
178  }
179  case IsAggregationRole:
180  {
181  return node->isAggregation();
182  }
183  case LinkRole:
184  {
185  const Feed* const feed = qobject_cast<const Feed* const>( node );
186  return feed ? feed->xmlUrl() : QVariant();
187  }
188  case IsOpenRole:
189  {
190  if ( !node->isGroup() )
191  return false;
192  const Akregator::Folder* const folder = qobject_cast<const Akregator::Folder* const>( node );
193  Q_ASSERT( folder );
194  return folder->isOpen();
195  }
196  case HasUnreadRole:
197  {
198  return node->unread()>0;
199  }
200  }
201 
202  return QVariant();
203 }
204 
205 QVariant Akregator::SubscriptionListModel::headerData( int section, Qt::Orientation, int role ) const
206 {
207  if ( role != Qt::DisplayRole )
208  return QVariant();
209 
210  switch (section)
211  {
212  case TitleColumn:
213  return i18nc("Feedlist's column header", "Feeds");
214  case UnreadCountColumn:
215  return i18nc("Feedlist's column header", "Unread");
216  case TotalCountColumn:
217  return i18nc("Feedlist's column header", "Total");
218  }
219 
220  return QVariant();
221 }
222 
223 QModelIndex Akregator::SubscriptionListModel::parent( const QModelIndex& index ) const
224 {
225  const Akregator::TreeNode* const node = nodeForIndex( index, m_feedList.get() );
226 
227  if ( !node || !node->parent() )
228  return QModelIndex();
229 
230  const Akregator::Folder* parent = node->parent();
231 
232  if ( !parent->parent() )
233  return createIndex( 0, 0, parent->id() );
234 
235  const Akregator::Folder* const grandparent = parent->parent();
236 
237  const int row = grandparent->indexOf( parent );
238 
239  Q_ASSERT( row != -1 );
240 
241  return createIndex( row, 0, parent->id() );
242 }
243 
244 QModelIndex Akregator::SubscriptionListModel::index( int row, int column, const QModelIndex& parent ) const
245 {
246  if ( !parent.isValid() )
247  return ( row == 0 && m_feedList ) ? createIndex( row, column , m_feedList->allFeedsFolder()->id() ) : QModelIndex();
248 
249  const Akregator::TreeNode* const parentNode = nodeForIndex( parent, m_feedList.get() );
250  const Akregator::TreeNode* const childNode = parentNode->childAt( row );
251  return childNode ? createIndex( row, column, childNode->id() ) : QModelIndex();
252 }
253 
254 
255 QModelIndex SubscriptionListModel::indexForNode( const TreeNode* node ) const
256 {
257  if ( !node || !m_feedList )
258  return QModelIndex();
259  const Folder* const parent = node->parent();
260  if ( !parent )
261  return index( 0, 0 );
262  const int row = parent->indexOf( node );
263  Q_ASSERT( row >= 0 );
264  const QModelIndex idx = index( row, 0, indexForNode( parent ) );
265  Q_ASSERT( idx.internalId() == node->id() );
266  return idx;
267 }
268 
269 void Akregator::SubscriptionListModel::subscriptionAdded( Akregator::TreeNode* subscription )
270 {
271  const Folder* const parent = subscription->parent();
272  const int row = parent ? parent->indexOf( subscription ) : 0;
273  Q_ASSERT( row >= 0 );
274  beginInsertRows( indexForNode( parent ), row, row );
275  endInsertRows();
276 }
277 
278 void Akregator::SubscriptionListModel::aboutToRemoveSubscription( Akregator::TreeNode* subscription )
279 {
280  kDebug() << subscription->id() << endl;
281  const Folder* const parent = subscription->parent();
282  const int row = parent ? parent->indexOf( subscription ) : -1;
283  if ( row < 0 )
284  return;
285  beginRemoveRows( indexForNode( parent ), row, row );
286  m_beganRemoval = true;
287 }
288 
289 void Akregator::SubscriptionListModel::subscriptionRemoved( TreeNode* subscription )
290 {
291  kDebug() << subscription->id() << endl;
292  if ( m_beganRemoval )
293  {
294  m_beganRemoval = false;
295  endRemoveRows();
296  }
297 }
298 
299 void Akregator::SubscriptionListModel::subscriptionChanged( TreeNode* node )
300 {
301  const QModelIndex idx = indexForNode( node );
302  if ( !idx.isValid() )
303  return;
304  emit dataChanged( index( idx.row(), 0, idx.parent() ),
305  index( idx.row(), ColumnCount - 1, idx.parent() ) );
306 }
307 
308 void SubscriptionListModel::fetchStarted( Akregator::Feed* node )
309 {
310  subscriptionChanged( node );
311 }
312 
313 void SubscriptionListModel::fetched( Akregator::Feed* node )
314 {
315  subscriptionChanged( node );
316 }
317 
318 void SubscriptionListModel::fetchError( Akregator::Feed* node )
319 {
320  subscriptionChanged( node );
321 }
322 
323 void SubscriptionListModel::fetchAborted( Akregator::Feed* node )
324 {
325  subscriptionChanged( node );
326 }
327 
328 void Akregator::FolderExpansionHandler::itemExpanded( const QModelIndex& idx )
329 {
330  setExpanded( idx, true );
331 }
332 
333 
334 void Akregator::FolderExpansionHandler::itemCollapsed( const QModelIndex& idx )
335 {
336  setExpanded( idx, false );
337 }
338 
339 void Akregator::FolderExpansionHandler::setExpanded( const QModelIndex& idx, bool expanded )
340 {
341  if ( !m_feedList || !m_model )
342  return;
343  Akregator::TreeNode* const node = m_feedList->findByID( m_model->nodeIdForIndex( idx ) );
344  if ( !node || !node->isGroup() )
345  return;
346 
347  Akregator::Folder* const folder = qobject_cast<Akregator::Folder*>( node );
348  Q_ASSERT( folder );
349  folder->setOpen( expanded );
350 }
351 
352 FolderExpansionHandler::FolderExpansionHandler( QObject* parent ) : QObject( parent ), m_feedList(), m_model( 0 )
353 {
354 }
355 
356 void FolderExpansionHandler::setModel( Akregator::SubscriptionListModel* model )
357 {
358  m_model = model;
359 }
360 
361 void FolderExpansionHandler::setFeedList( const shared_ptr<FeedList>& feedList )
362 {
363  m_feedList = feedList;
364 }
365 
366 Qt::ItemFlags SubscriptionListModel::flags( const QModelIndex& idx ) const
367 {
368  const Qt::ItemFlags flags = QAbstractItemModel::flags( idx );
369  if ( !idx.isValid() || ( idx.column() != TitleColumn ) )
370  return flags;
371  if ( !idx.parent().isValid() ) // the root folder is neither draggable nor editable
372  return flags | Qt::ItemIsDropEnabled;
373  return flags | Qt::ItemIsDragEnabled | Qt::ItemIsDropEnabled | Qt::ItemIsEditable;
374 }
375 
376 QStringList SubscriptionListModel::mimeTypes() const
377 {
378  QStringList types;
379  types << "text/uri-list" << AKREGATOR_TREENODE_MIMETYPE;
380  return types;
381 }
382 
383 QMimeData* SubscriptionListModel::mimeData( const QModelIndexList& indexes ) const
384 {
385  QMimeData* mimeData = new QMimeData;
386 
387  QList<QUrl> urls;
388  Q_FOREACH ( const QModelIndex& i, indexes )
389  {
390  const QUrl url = i.data( LinkRole ).toString();
391  if ( !url.isEmpty() )
392  urls << url;
393  }
394 
395  mimeData->setUrls( urls );
396 
397  QByteArray idList;
398  QDataStream idStream( &idList, QIODevice::WriteOnly );
399  Q_FOREACH ( const QModelIndex& i, indexes )
400  if ( i.isValid() )
401  idStream << i.data( SubscriptionIdRole ).toInt();
402 
403  mimeData->setData( AKREGATOR_TREENODE_MIMETYPE, idList );
404 
405  return mimeData;
406 }
407 
408 
409 bool SubscriptionListModel::setData( const QModelIndex& idx, const QVariant& value, int role )
410 {
411  if ( !idx.isValid() || idx.column() != TitleColumn || role != Qt::EditRole )
412  return false;
413  const TreeNode* const node = nodeForIndex( idx, m_feedList.get() );
414  if ( !node )
415  return false;
416  RenameSubscriptionJob* job = new RenameSubscriptionJob( this );
417  job->setSubscriptionId( node->id() );
418  job->setName( value.toString() );
419  job->start();
420  return true;
421 }
422 
423 bool SubscriptionListModel::dropMimeData( const QMimeData* data,
424  Qt::DropAction action,
425  int row,
426  int column,
427  const QModelIndex& parent )
428 {
429  Q_UNUSED( column )
430 
431  if ( action == Qt::IgnoreAction )
432  return true;
433 
434  //if ( column != TitleColumn )
435  // return false;
436 
437  if ( !data->hasFormat( AKREGATOR_TREENODE_MIMETYPE ) )
438  return false;
439 
440  const TreeNode* const droppedOnNode = qobject_cast<const TreeNode*>( nodeForIndex( parent, m_feedList.get() ) );
441 
442  if ( !droppedOnNode )
443  return false;
444 
445  const Folder* const destFolder = droppedOnNode->isGroup() ? qobject_cast<const Folder*>( droppedOnNode ) : droppedOnNode->parent();
446  if ( !destFolder )
447  return false;
448 
449  QByteArray idData = data->data( AKREGATOR_TREENODE_MIMETYPE );
450  QList<int> ids;
451  QDataStream stream( &idData, QIODevice::ReadOnly );
452  while ( !stream.atEnd() )
453  {
454  int id;
455  stream >> id;
456  ids << id;
457  }
458 
459  //don't drop nodes into their own subtree
460  Q_FOREACH ( const int id, ids )
461  {
462  const Folder* const asFolder = qobject_cast<const Folder*>( m_feedList->findByID( id ) );
463  if ( asFolder && ( asFolder == destFolder || asFolder->subtreeContains( destFolder ) ) )
464  return false;
465  }
466 
467  const TreeNode* const after = droppedOnNode->isGroup() ? destFolder->childAt( row ) : droppedOnNode;
468 
469  Q_FOREACH ( const int id, ids )
470  {
471  const TreeNode* const node = m_feedList->findByID( id );
472  if ( !node )
473  continue;
474  MoveSubscriptionJob* job = new MoveSubscriptionJob( this );
475  job->setSubscriptionId( node->id() );
476  job->setDestination( destFolder->id(), after ? after->id() : -1 );
477  job->start();
478  }
479 
480  return true;
481 }
482 
treenode.h
QModelIndex
Akregator::TreeNode::icon
virtual QIcon icon() const =0
Akregator::SubscriptionListModel::rowCount
int rowCount(const QModelIndex &parent=QModelIndex()) const
Definition: subscriptionlistmodel.cpp:109
QMimeData::data
QByteArray data(const QString &mimeType) const
Akregator::TreeNode::childAt
virtual TreeNode * childAt(int pos)
Definition: treenode.cpp:167
Akregator::SubscriptionListModel::LinkRole
Definition: subscriptionlistmodel.h:52
feedlist.h
QByteArray
Akregator::TreeNode::children
virtual QList< const TreeNode * > children() const
returns the (direct) children of this node.
Definition: treenode.cpp:151
QMimeData::hasFormat
virtual bool hasFormat(const QString &mimeType) const
QDataStream
Akregator::TreeNode::title
QString title() const
Get title of node.
Definition: treenode.cpp:87
uint
unsigned int uint
Definition: article.h:41
Akregator::SubscriptionListModel::index
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const
Definition: subscriptionlistmodel.cpp:244
Akregator::TreeNode::isAggregation
virtual bool isAggregation() const =0
returns if the node represents an aggregation, i.e.
Akregator::TreeNode::unread
virtual int unread() const =0
The unread count, returns the number of new/unread articles in the node (for groups: the accumulated ...
Akregator::SubscriptionListModel::SubscriptionIdRole
Definition: subscriptionlistmodel.h:48
Akregator::SubscriptionListModel::mimeTypes
QStringList mimeTypes() const
Definition: subscriptionlistmodel.cpp:376
Akregator::SubscriptionListModel::mimeData
QMimeData * mimeData(const QModelIndexList &indexes) const
Definition: subscriptionlistmodel.cpp:383
Akregator::SubscriptionListModel
Definition: subscriptionlistmodel.h:42
QModelIndex::internalId
qint64 internalId() const
Akregator::Folder::isOpen
bool isOpen() const
returns whether the feed group is opened or not.
Definition: folder.cpp:286
QUrl::isEmpty
bool isEmpty() const
Akregator::TreeNode::totalCount
virtual int totalCount() const =0
returns the number of total articles in the node (for groups: the accumulated count of the subtree) ...
QMimeData
feed.h
Akregator::SubscriptionListModel::data
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
Definition: subscriptionlistmodel.cpp:123
QIcon::pixmap
QPixmap pixmap(const QSize &size, Mode mode, State state) const
Akregator::TreeNode::parent
virtual const Folder * parent() const
Returns the parent node.
Definition: treenode.cpp:141
Akregator::FeedList
The model of a feed tree, represents an OPML document.
Definition: feedlist.h:78
Akregator::Folder::childAt
TreeNode * childAt(int pos)
Definition: folder.cpp:379
QModelIndex::isValid
bool isValid() const
Akregator::Feed::fetchErrorCode
Syndication::ErrorCode fetchErrorCode() const
Definition: feed.cpp:391
QVariant::toInt
int toInt(bool *ok) const
Akregator::RenameSubscriptionJob::setName
void setName(const QString &name)
Definition: subscriptionlistjobs.cpp:105
Akregator::SubscriptionListModel::SubscriptionListModel
SubscriptionListModel(const boost::shared_ptr< const FeedList > &feedList, QObject *parent=0)
Definition: subscriptionlistmodel.cpp:84
QObject
Akregator::Folder::setOpen
void setOpen(bool open)
open/close the feed group (display it as expanded/collapsed in the tree view).
Definition: folder.cpp:291
QModelIndex::row
int row() const
Akregator::MoveSubscriptionJob::setDestination
void setDestination(int folder, int afterChild)
Definition: subscriptionlistjobs.cpp:47
Akregator::Feed::xmlUrl
QString xmlUrl() const
returns the url of the actual feed source (rss/rdf/atom file)
Definition: feed.cpp:372
Akregator::RenameSubscriptionJob
Definition: subscriptionlistjobs.h:63
Akregator::MoveSubscriptionJob::start
void start()
Definition: subscriptionlistjobs.cpp:54
Akregator::SubscriptionListModel::nodeIdForIndex
uint nodeIdForIndex(const QModelIndex &index) const
Definition: subscriptionlistmodel.cpp:118
QString
QList
Definition: article.h:41
Akregator::FolderExpansionHandler::itemCollapsed
void itemCollapsed(const QModelIndex &index)
Definition: subscriptionlistmodel.cpp:334
Akregator::FolderExpansionHandler::setFeedList
void setFeedList(const boost::shared_ptr< FeedList > &feedList)
Definition: subscriptionlistmodel.cpp:361
QModelIndex::parent
QModelIndex parent() const
QDataStream::atEnd
bool atEnd() const
Akregator::FolderExpansionHandler::setModel
void setModel(Akregator::SubscriptionListModel *model)
Definition: subscriptionlistmodel.cpp:356
QStringList
Akregator::FeedList::findByID
const TreeNode * findByID(int id) const
Definition: feedlist.cpp:386
Akregator::FolderExpansionHandler::itemExpanded
void itemExpanded(const QModelIndex &index)
Definition: subscriptionlistmodel.cpp:328
Akregator::SubscriptionListModel::flags
Qt::ItemFlags flags(const QModelIndex &index) const
Definition: subscriptionlistmodel.cpp:366
QUrl
Akregator::MoveSubscriptionJob
Definition: subscriptionlistjobs.h:42
AKREGATOR_TREENODE_MIMETYPE
#define AKREGATOR_TREENODE_MIMETYPE
Definition: subscriptionlistmodel.cpp:50
folder.h
Akregator::SubscriptionListModel::dropMimeData
bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent)
Definition: subscriptionlistmodel.cpp:423
QModelIndex::data
QVariant data(int role) const
Akregator::FolderExpansionHandler::FolderExpansionHandler
FolderExpansionHandler(QObject *parent=0)
Definition: subscriptionlistmodel.cpp:352
Akregator::TreeNode::isGroup
virtual bool isGroup() const =0
Helps the rest of the app to decide if node should be handled as group or not.
Akregator::Feed
represents a feed
Definition: feed.h:53
Akregator::Folder
Represents a folder (containing feeds and/or other folders)
Definition: folder.h:44
Akregator::Folder::indexOf
int indexOf(const TreeNode *node) const
Definition: folder.cpp:175
QModelIndex::column
int column() const
Akregator::SubscriptionListModel::setData
bool setData(const QModelIndex &idx, const QVariant &value, int role=Qt::EditRole)
Definition: subscriptionlistmodel.cpp:409
Akregator::RenameSubscriptionJob::start
void start()
Definition: subscriptionlistjobs.cpp:110
QAbstractItemModel
QAbstractItemModel::flags
virtual Qt::ItemFlags flags(const QModelIndex &index) const
Akregator::Feed::fetchErrorOccurred
bool fetchErrorOccurred() const
returns whether a fetch error has occurred
Definition: feed.cpp:389
subscriptionlistjobs.h
Akregator::MoveSubscriptionJob::setSubscriptionId
void setSubscriptionId(int id)
Definition: subscriptionlistjobs.cpp:42
QMimeData::setData
void setData(const QString &mimeType, const QByteArray &data)
QObject::connect
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QObject::parent
QObject * parent() const
subscriptionlistmodel.h
Akregator::SubscriptionListModel::headerData
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
Definition: subscriptionlistmodel.cpp:205
Akregator::TreeNode
Abstract base class for all kind of elements in the feed tree, like feeds and feed groups (and search...
Definition: treenode.h:58
Akregator::TreeNode::id
virtual uint id() const
returns the ID of this node.
Definition: treenode.cpp:198
Akregator::SubscriptionListModel::TitleColumn
Definition: subscriptionlistmodel.h:59
QVariant::toString
QString toString() const
Akregator::SubscriptionListModel::columnCount
int columnCount(const QModelIndex &parent=QModelIndex()) const
Definition: subscriptionlistmodel.cpp:104
Akregator::RenameSubscriptionJob::setSubscriptionId
void setSubscriptionId(int id)
Definition: subscriptionlistjobs.cpp:100
QMimeData::setUrls
void setUrls(const QList< QUrl > &urls)
QVariant
Akregator::Feed::isFetching
bool isFetching() const
Definition: feed.cpp:341
Akregator::Folder::subtreeContains
bool subtreeContains(const Akregator::TreeNode *node) const
Definition: folder.cpp:338
Qt::ItemFlags
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

KDE's Doxygen guidelines are available online.

akregator

Skip menu "akregator"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer
  • pimprint

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal