1 /*
2     This file is part of Akregator.
3 
4     SPDX-FileCopyrightText: 2008 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 "command.h"
12 
13 #include <memory>
14 
15 namespace Akregator
16 {
17 class Folder;
18 class MainWidget;
19 class SubscriptionListView;
20 class TreeNode;
21 class CreateFeedCommandPrivate;
22 
23 class CreateFeedCommand : public Command
24 {
25     Q_OBJECT
26 public:
27     explicit CreateFeedCommand(MainWidget *parent = nullptr);
28     ~CreateFeedCommand() override;
29 
30     void setSubscriptionListView(SubscriptionListView *view);
31     void setRootFolder(Folder *rootFolder);
32     void setUrl(const QString &url);
33     void setPosition(Folder *parent, TreeNode *after);
34     void setAutoExecute(bool autoexec);
35 
36 private:
37     void doStart() override;
38     void doAbort() override;
39 
40 private:
41     friend class CreateFeedCommandPrivate;
42     std::unique_ptr<CreateFeedCommandPrivate> const d;
43 };
44 }
45 
46