1 /*
2   This file is part of KMail, the KDE mail client.
3   SPDX-FileCopyrightText: 2004 Till Adam <adam@kde.org>
4   SPDX-FileCopyrightText: 2013 Jonathan Marten <jjm@keelhaul.me.uk>
5 
6   SPDX-License-Identifier: GPL-2.0-only
7 */
8 
9 #pragma once
10 
11 #include <MailCommon/FolderSettings>
12 
13 #include <Akonadi/CollectionPropertiesPage>
14 
15 template<typename T> class QSharedPointer;
16 
17 class KKeySequenceWidget;
18 
19 class CollectionShortcutPage : public Akonadi::CollectionPropertiesPage
20 {
21     Q_OBJECT
22 public:
23     explicit CollectionShortcutPage(QWidget *parent = nullptr);
24     ~CollectionShortcutPage() override;
25 
26     void load(const Akonadi::Collection &col) override;
27     void save(Akonadi::Collection &col) override;
28 
29 private:
30     void slotShortcutChanged();
31     void init(const Akonadi::Collection &);
32     QSharedPointer<MailCommon::FolderSettings> mFolder;
33     Akonadi::Collection mCurrentCollection;
34     KKeySequenceWidget *const mKeySeqWidget;
35     bool mShortcutChanged = false;
36 };
37 
38 AKONADI_COLLECTION_PROPERTIES_PAGE_FACTORY(CollectionShortcutPageFactory, CollectionShortcutPage)
39 
40