File indexing completed on 2024-11-24 04:39:31
0001 /* 0002 This file is part of Contact Editor. 0003 0004 SPDX-FileCopyrightText: 2010 Tobias Koenig <tokoe@kde.org> 0005 0006 SPDX-License-Identifier: LGPL-2.0-or-later 0007 */ 0008 0009 #pragma once 0010 0011 #include <KContacts/Addressee> 0012 #include <KJob> 0013 #include <QWidget> 0014 namespace Akonadi 0015 { 0016 class TagWidget; 0017 0018 /** 0019 * @short A widget for editing the categories of a contact. 0020 */ 0021 0022 class CategoriesEditWidget : public QWidget 0023 { 0024 Q_OBJECT 0025 0026 public: 0027 explicit CategoriesEditWidget(QWidget *parent = nullptr); 0028 ~CategoriesEditWidget() override; 0029 0030 void loadContact(const KContacts::Addressee &contact); 0031 void storeContact(KContacts::Addressee &contact) const; 0032 0033 void setReadOnly(bool readOnly); 0034 0035 private: 0036 void onMissingTagCreated(KJob *); 0037 Akonadi::TagWidget *const mTagWidget; 0038 }; 0039 }