File indexing completed on 2024-05-12 05:12:54

0001 /*
0002     This file is part of Akregator.
0003 
0004     SPDX-FileCopyrightText: 2006 Frank Osterfeld <osterfeld@kde.org>
0005 
0006     SPDX-License-Identifier: GPL-2.0-or-later WITH Qt-Commercial-exception-1.0
0007 */
0008 
0009 #pragma once
0010 
0011 #include <QList>
0012 #include <Syndication/Enclosure>
0013 
0014 namespace Akregator
0015 {
0016 class Article;
0017 class TreeNode;
0018 class ArticleFormatterPrivate;
0019 
0020 class ArticleFormatter
0021 {
0022 public:
0023     enum IconOption { NoIcon, ShowIcon };
0024 
0025     explicit ArticleFormatter();
0026 
0027     virtual ~ArticleFormatter();
0028 
0029     virtual QString formatArticles(const QList<Article> &article, IconOption icon) const = 0;
0030 
0031     virtual QString formatSummary(TreeNode *node) const = 0;
0032 
0033     static QString formatEnclosure(const Syndication::Enclosure &enclosure);
0034 
0035 private:
0036     Q_DISABLE_COPY(ArticleFormatter)
0037 };
0038 } // namespace Akregator