File indexing completed on 2024-11-10 04:49:59
0001 /* 0002 SPDX-FileCopyrightText: 2009-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include "mailcommon_export.h" 0010 0011 #include <Akonadi/CollectionPropertiesPage> 0012 0013 class QLineEdit; 0014 0015 class QCheckBox; 0016 0017 template<typename T> 0018 class QSharedPointer; 0019 namespace PimCommon 0020 { 0021 class IncidencesForWidget; 0022 class ContentTypeWidget; 0023 } 0024 namespace KIdentityManagementCore 0025 { 0026 } 0027 namespace MailCommon 0028 { 0029 class FolderSettings; 0030 class CollectionGeneralWidget; 0031 /** 0032 * @brief The CollectionGeneralPage class 0033 * @author Laurent Montel <montel@kde.org> 0034 */ 0035 class MAILCOMMON_EXPORT CollectionGeneralPage : public Akonadi::CollectionPropertiesPage 0036 { 0037 Q_OBJECT 0038 0039 public: 0040 explicit CollectionGeneralPage(QWidget *parent = nullptr); 0041 ~CollectionGeneralPage() override; 0042 0043 void load(const Akonadi::Collection &collection) override; 0044 void save(Akonadi::Collection &collection) override; 0045 0046 protected: 0047 void init(const Akonadi::Collection &); 0048 0049 private: 0050 MAILCOMMON_NO_EXPORT void slotFolderContentsSelectionChanged(int); 0051 MAILCOMMON_NO_EXPORT void slotNameChanged(const QString &name); 0052 0053 private: 0054 QString mColorName; 0055 0056 CollectionGeneralWidget *mCollectionGeneralWidget = nullptr; 0057 PimCommon::ContentTypeWidget *mContentsComboBox = nullptr; 0058 PimCommon::IncidencesForWidget *mIncidencesForComboBox = nullptr; 0059 QCheckBox *mSharedSeenFlagsCheckBox = nullptr; 0060 QLineEdit *mNameEdit = nullptr; 0061 QSharedPointer<MailCommon::FolderSettings> mFolderCollection; 0062 bool mIsLocalSystemFolder = false; 0063 bool mIsResourceFolder = false; 0064 }; 0065 0066 AKONADI_COLLECTION_PROPERTIES_PAGE_FACTORY(CollectionGeneralPageFactory, CollectionGeneralPage) 0067 }