1 /* 2 This file is part of Akregator. 3 4 SPDX-FileCopyrightText: 2006 Frank Osterfeld <osterfeld@kde.org> 5 6 SPDX-License-Identifier: GPL-2.0-or-later WITH Qt-Commercial-exception-1.0 7 */ 8 9 #pragma once 10 11 #include <QVector> 12 #include <enclosure.h> 13 14 namespace Akregator 15 { 16 class Article; 17 class TreeNode; 18 class ArticleFormatterPrivate; 19 20 class ArticleFormatter 21 { 22 public: 23 enum IconOption { NoIcon, ShowIcon }; 24 25 explicit ArticleFormatter(); 26 27 virtual ~ArticleFormatter(); 28 29 virtual QString formatArticles(const QVector<Article> &article, IconOption icon) const = 0; 30 31 virtual QString formatSummary(TreeNode *node) const = 0; 32 33 static QString formatEnclosure(const Syndication::Enclosure &enclosure); 34 35 private: 36 Q_DISABLE_COPY(ArticleFormatter) 37 }; 38 } // namespace Akregator 39 40