File indexing completed on 2024-11-17 04:40:41
0001 /* 0002 This file is part of Akonadi Contact. 0003 0004 SPDX-FileCopyrightText: 2007-2010 Tobias Koenig <tokoe@kde.org> 0005 0006 SPDX-License-Identifier: LGPL-2.0-or-later 0007 */ 0008 0009 #pragma once 0010 0011 #include "contactgroupeditor.h" 0012 0013 #include "ui_contactgroupeditor.h" 0014 0015 #include <Akonadi/Collection> 0016 #include <Akonadi/Item> 0017 0018 class KJob; 0019 namespace Akonadi 0020 { 0021 class ContactGroupModel; 0022 class Monitor; 0023 } 0024 namespace Akonadi 0025 { 0026 class ContactGroupEditorPrivate 0027 { 0028 public: 0029 ContactGroupEditorPrivate(ContactGroupEditor *parent); 0030 ~ContactGroupEditorPrivate(); 0031 0032 void itemFetchDone(KJob *job); 0033 void parentCollectionFetchDone(KJob *job); 0034 void storeDone(KJob *job); 0035 void itemChanged(const Akonadi::Item &item, const QSet<QByteArray> ¬Used); 0036 void memberChanged(); 0037 void setReadOnly(bool); 0038 0039 void adaptHeaderSizes(); 0040 0041 void loadContactGroup(const KContacts::ContactGroup &group); 0042 [[nodiscard]] bool storeContactGroup(KContacts::ContactGroup &group); 0043 void setupMonitor(); 0044 0045 ContactGroupEditor::Mode mMode = ContactGroupEditor::Mode::CreateMode; 0046 Akonadi::Item mItem; 0047 Akonadi::Collection mDefaultCollection; 0048 Ui::ContactGroupEditor mGui; 0049 ContactGroupEditor *mParent = nullptr; 0050 Akonadi::ContactGroupModel *mGroupModel = nullptr; 0051 Akonadi::Monitor *mMonitor = nullptr; 0052 bool mReadOnly = false; 0053 }; 0054 }