File indexing completed on 2024-05-12 16:02:08

0001 /* This file is part of the KDE project
0002    SPDX-FileCopyrightText: 2002 Laurent Montel <lmontel@mandrakesoft.com>
0003    SPDX-FileCopyrightText: 2006-2007 Jan Hambrecht <jaham@gmx.net>
0004    SPDX-FileCopyrightText: 2012 C. Boemann <cbo@boemann.dk>
0005 
0006    SPDX-License-Identifier: LGPL-2.0-or-later
0007 */
0008 
0009 #ifndef KOCONFIGAUTHORPAGE_H
0010 #define KOCONFIGAUTHORPAGE_H
0011 
0012 #include <QWidget>
0013 #include <QStyledItemDelegate>
0014 
0015 #include "kritawidgets_export.h"
0016 
0017 class KRITAWIDGETS_EXPORT KoConfigAuthorPage : public QWidget
0018 {
0019     Q_OBJECT
0020 
0021 public:
0022     KoConfigAuthorPage();
0023     ~KoConfigAuthorPage() override;
0024 
0025     void apply();
0026 
0027 private Q_SLOTS:
0028     void profileChanged(int i);
0029     void addUser();
0030     void deleteUser();
0031     void addContactEntry();
0032     void removeContactEntry();
0033 
0034 private:
0035     class Private;
0036     Private * const d;
0037 };
0038 
0039 /**
0040  * @brief The KoContactInfoDelegate class
0041  *
0042  * quick delegate subclass to allow a qcombobox for the type.
0043  */
0044 class KoContactInfoDelegate : public QStyledItemDelegate
0045 {
0046 public:
0047     KoContactInfoDelegate(QWidget *parent, QStringList contactModes);
0048     ~KoContactInfoDelegate() override;
0049 
0050 public:
0051     QWidget* createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
0052     QStringList m_contactModes;
0053 };
0054 
0055 
0056 #endif // KOCONFIGAUTHORPAGE_H