akregator
articlelistview.cpp
Go to the documentation of this file.
58 FilterDeletedProxyModel::FilterDeletedProxyModel( QObject* parent ) : QSortFilterProxyModel( parent )
63 bool FilterDeletedProxyModel::filterAcceptsRow( int source_row, const QModelIndex& source_parent ) const
65 return !sourceModel()->index( source_row, 0, source_parent ).data( ArticleModel::IsDeletedRole ).toBool();
68 SortColorizeProxyModel::SortColorizeProxyModel( QObject* parent ) : QSortFilterProxyModel( parent ), m_keepFlagIcon( KIcon( "mail-mark-important" ) )
70 m_unreadColor = KColorScheme( QPalette::Normal, KColorScheme::View ).foreground( KColorScheme::PositiveText ).color();
71 m_newColor = KColorScheme( QPalette::Normal, KColorScheme::View ).foreground( KColorScheme::NegativeText ).color();
74 bool SortColorizeProxyModel::filterAcceptsRow ( int source_row, const QModelIndex& source_parent ) const
88 void SortColorizeProxyModel::setFilters( const std::vector<shared_ptr<const Filters::AbstractMatcher> >& matchers )
241 m_feedHeaderState = QByteArray::fromBase64( conf.readEntry( "ArticleListFeedHeaders" ).toLatin1() );
242 m_groupHeaderState = QByteArray::fromBase64( conf.readEntry( "ArticleListGroupHeaders" ).toLatin1() );
375 "You can also manage articles, as marking them as persistent (\"Mark as Important\") or delete them, using the right mouse button menu. "
376 "To view the web page of the article, you can open the article internally in a tab or in an external browser window."));
379 disconnect( header(), SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(showHeaderMenu(QPoint)) );
380 connect( header(), SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(showHeaderMenu(QPoint)) );
431 #warning The distinction between empty node and 0 items after filtering is hard to port to interview
505 const QModelIndex newIdx = idx.isValid() ? idx.sibling( newRow, 0 ) : model()->index( newRow, 0 );
527 const int startRow = qMin( rowCount - 1, ( currentIndex().isValid() ? currentIndex().row() + 1 : 0 ) );
564 const int startRow = qMax( 0, ( currentIndex().isValid() ? currentIndex().row() : rowCount ) - 1 );
591 void ArticleListView::setFilters( const std::vector<shared_ptr<const Filters::AbstractMatcher> >& matchers )
void customContextMenuRequested(const QPoint &pos)
SortColorizeProxyModel(QObject *parent=0)
Definition: articlelistview.cpp:68
Qt::MouseButtons mouseButtons()
void setSortRole(int role)
virtual int rowCount(const QModelIndex &parent) const =0
static int maxDateColumnWidth(const QFontMetrics &fm)
Definition: articlelistview.cpp:294
void setIsAggregation(bool isAggregation)
Definition: articlelistview.cpp:352
const QPalette & palette() const
virtual void paintEvent(QPaintEvent *event)
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const =0
void setAlternatingRowColors(bool enable)
void setCurrentIndex(const QModelIndex &index)
void setSelectionMode(QAbstractItemView::SelectionMode mode)
void setModel(QAbstractItemModel *model)
Definition: articlelistview.cpp:466
QItemSelectionModel * selectionModel() const
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
Definition: articlelistview.cpp:96
virtual void setSourceModel(QAbstractItemModel *sourceModel)
void setFilters(const std::vector< boost::shared_ptr< const Akregator::Filters::AbstractMatcher > > &)
Definition: articlelistview.cpp:591
void showSection(int logicalIndex)
void setChecked(bool)
bool restoreState(const QByteArray &state)
QVariant data() const
void setArticleModel(Akregator::ArticleModel *model)
Definition: articlelistview.cpp:149
void forceFilterUpdate()
Definition: articlelistview.cpp:585
const QColor & color(ColorGroup group, ColorRole role) const
QItemSelectionModel * articleSelectionModel() const
Definition: articlelistview.cpp:245
bool isEmpty() const
void setDragDropMode(DragDropMode behavior)
QPoint mapToGlobal(const QPoint &pos) const
void mousePressEvent(QMouseEvent *ev)
Definition: articlelistview.cpp:384
T value() const
void setUniformRowHeights(bool uniform)
QWidget * viewport() const
void signalMouseButtonPressed(int, const KUrl)
void sortByColumn(int column, Qt::SortOrder order)
void slotNextArticle()
Definition: articlelistview.cpp:509
bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *method)
article was fetched in the last fetch of it's feed and not read yet.
Definition: types.h:33
int x() const
int y() const
bool isNull() const
void resizeSection(int logicalIndex, int size)
void setMinimumSize(const QSize &)
bool isValid() const
void append(const T &value)
int toInt(bool *ok) const
bool isSectionHidden(int logicalIndex) const
void slotPreviousArticle()
Definition: articlelistview.cpp:498
Qt::MouseButton button() const
virtual void rowsInserted(const QModelIndex &parent, int start, int end)
virtual void select(const QModelIndex &index, QFlags< QItemSelectionModel::SelectionFlag > command)
int row() const
void invalidateFilter()
void setDynamicSortFilter(bool enable)
const QAbstractItemView * itemView() const
Definition: articlelistview.cpp:250
virtual QWidget * container(const char *name)=0
void setAllColumnsShowFocus(bool enable)
QPalette palette()
QScrollBar * verticalScrollBar() const
void setData(const QVariant &userData)
void hideSection(int logicalIndex)
void setContextMenuPolicy(Qt::ContextMenuPolicy policy)
void setValue(int)
int width(const QString &text, int len) const
virtual void scrollTo(const QModelIndex &index, ScrollHint hint)
void setCheckable(bool)
bool invokeMethod(QObject *obj, const char *member, Qt::ConnectionType type, QGenericReturnArgument ret, QGenericArgument val0, QGenericArgument val1, QGenericArgument val2, QGenericArgument val3, QGenericArgument val4, QGenericArgument val5, QGenericArgument val6, QGenericArgument val7, QGenericArgument val8, QGenericArgument val9)
State state() const
void setSortingEnabled(bool enable)
QAbstractItemModel * sourceModel() const
virtual QModelIndex mapToSource(const QModelIndex &proxyIndex) const
void setWhatsThis(const QString &)
void slotNextUnreadArticle()
Definition: articlelistview.cpp:521
QFontMetrics fontMetrics() const
QVariant data(int role) const
static ActionManager * getInstance()
Definition: actionmanager.cpp:35
QByteArray fromBase64(const QByteArray &base64)
ArticleListView(QWidget *parent=0)
Definition: articlelistview.cpp:360
void setColumnEnabled(int col, bool enabled=true)
Definition: filtercolumnsproxymodel.cpp:42
QModelIndex sibling(int row, int column) const
QByteArray saveState() const
virtual void setModel(QAbstractItemModel *model)
void setResizeMode(ResizeMode mode)
void setFilters(const std::vector< boost::shared_ptr< const Akregator::Filters::AbstractMatcher > > &)
Definition: articlelistview.cpp:88
virtual int columnCount(const QModelIndex &parent) const =0
QPoint scrollBarPositions() const
Definition: articlelistview.cpp:260
int column() const
bool toBool() const
void userActionTakingPlace()
QScrollBar * horizontalScrollBar() const
virtual void mousePressEvent(QMouseEvent *event)
QHeaderView * header() const
QByteArray toBase64() const
void setScrollBarPositions(const QPoint &p)
Definition: articlelistview.cpp:265
QAbstractItemModel * model() const
QModelIndex currentIndex() const
void setRootIsDecorated(bool show)
void setStretchLastSection(bool stretch)
void clearSelection()
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QString toString() const
void setSectionHidden(int logicalIndex, bool hide)
void slotPreviousUnreadArticle()
Definition: articlelistview.cpp:558
void setEnabled(bool)
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.