File indexing completed on 2024-05-05 05:13:00
0001 /* 0002 This file is part of Akregator. 0003 0004 SPDX-FileCopyrightText: 2009 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 "command.h" 0012 0013 #include <QWeakPointer> 0014 0015 #include <memory> 0016 0017 class QDomDocument; 0018 0019 namespace Akregator 0020 { 0021 class FeedList; 0022 class ImportFeedListCommandPrivate; 0023 0024 class ImportFeedListCommand : public Command 0025 { 0026 Q_OBJECT 0027 public: 0028 explicit ImportFeedListCommand(QObject *parent = nullptr); 0029 ~ImportFeedListCommand() override; 0030 0031 void setTargetList(const QWeakPointer<FeedList> &feedList); 0032 0033 enum RootFolderOption { 0034 None, 0035 Auto, 0036 Ask, 0037 }; 0038 0039 void setImportedRootFolderOption(RootFolderOption opt); 0040 void setImportedRootFolderName(const QString &defaultName); 0041 0042 void setFeedListDocument(const QDomDocument &doc); 0043 0044 private: 0045 void doStart() override; 0046 void doAbort() override; 0047 0048 private: 0049 friend class ImportFeedListCommandPrivate; 0050 std::unique_ptr<ImportFeedListCommandPrivate> const d; 0051 }; 0052 }