akregator
selectioncontroller.cpp
Go to the documentation of this file.
54 static QList<Akregator::Article> articlesForIndexes( const QModelIndexList& indexes, FeedList* feedList )
68 static Akregator::TreeNode* subscriptionForIndex( const QModelIndex& index, Akregator::FeedList* feedList )
73 return feedList->findByID( index.data( Akregator::SubscriptionListModel::SubscriptionIdRole ).toInt() );
139 void Akregator::SelectionController::setSingleArticleDisplay( Akregator::SingleArticleDisplay* display )
148 return ::articleForIndex( m_articleLister->articleSelectionModel()->currentIndex(), m_feedList.get() );
160 return ::articlesForIndexes( m_articleLister->articleSelectionModel()->selectedRows(), m_feedList.get() );
165 return ::subscriptionForIndex( m_feedSelector->selectionModel()->currentIndex(), m_feedList.get() );
191 void Akregator::SelectionController::setFolderExpansionHandler( Akregator::FolderExpansionHandler* handler )
230 delete m_articleModel; //order is important: do not delete the old model before the new model is set in the view
233 disconnect( m_articleLister->articleSelectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
235 connect( m_articleLister->articleSelectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
276 const TreeNode* const node = ::subscriptionForIndex( m_feedSelector->indexAt( point ), m_feedList.get() );
280 QWidget* w = ActionManager::getInstance()->container( node->isGroup() ? "feedgroup_popup" : "feeds_popup" );
303 void SelectionController::setFilters( const std::vector<boost::shared_ptr<const Filters::AbstractMatcher> >& matchers )
SelectionController(QObject *parent=0)
Definition: selectioncontroller.cpp:77
QModelIndex currentIndex() const
void setFilters(const std::vector< boost::shared_ptr< const Akregator::Filters::AbstractMatcher > > &)
Definition: selectioncontroller.cpp:303
void forceFilterUpdate()
Definition: selectioncontroller.cpp:309
virtual void forceFilterUpdate()=0
virtual void setModel(QAbstractItemModel *model)
~SelectionController()
Definition: selectioncontroller.cpp:90
Akregator::TreeNode * selectedSubscription() const
Definition: selectioncontroller.cpp:163
virtual bool isAggregation() const =0
returns if the node represents an aggregation, i.e.
const Article findArticle(const QString &feedURL, const QString &guid) const
Definition: feedlist.cpp:337
virtual QItemSelectionModel * articleSelectionModel() const =0
bool isValid() const
void append(const T &value)
void setFolderExpansionHandler(Akregator::FolderExpansionHandler *handler)
Definition: selectioncontroller.cpp:191
int toInt(bool *ok) const
Definition: articlejobs.h:110
void setArticleLister(Akregator::ArticleLister *lister)
Definition: selectioncontroller.cpp:122
virtual QWidget * container(const char *name)=0
void setFeedList(const boost::shared_ptr< FeedList > &feedList)
Definition: subscriptionlistmodel.cpp:361
Akregator::Article currentArticle() const
Definition: selectioncontroller.cpp:144
void setModel(Akregator::SubscriptionListModel *model)
Definition: subscriptionlistmodel.cpp:356
QModelIndex currentArticleIndex() const
Definition: selectioncontroller.cpp:151
QPoint listViewScrollBarPositions() const
Definition: treenode.cpp:228
QVariant data(int role) const
static ActionManager * getInstance()
Definition: actionmanager.cpp:35
virtual bool isGroup() const =0
Helps the rest of the app to decide if node should be handled as group or not.
A proxy class for Syndication::ItemPtr with some additional methods to assist sorting.
Definition: article.h:63
QList< Akregator::Article > selectedArticles() const
Definition: selectioncontroller.cpp:156
void setFeedList(const boost::shared_ptr< FeedList > &list)
Definition: selectioncontroller.cpp:168
void setSingleArticleDisplay(Akregator::SingleArticleDisplay *display)
Definition: selectioncontroller.cpp:139
void setFeedSelector(QAbstractItemView *feedSelector)
Definition: selectioncontroller.cpp:96
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
virtual void setFilters(const std::vector< boost::shared_ptr< const Filters::AbstractMatcher > > &)=0
Definition: articlemodel.h:46
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.