File indexing completed on 2024-05-05 16:16:35
0001 /* 0002 SPDX-FileCopyrightText: 2013 David Edmundson <davidedmundson@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.1-or-later 0005 */ 0006 0007 #ifndef ABSTRACTFIELDWIDGETFACTORY_H 0008 #define ABSTRACTFIELDWIDGETFACTORY_H 0009 0010 #include <QWidget> 0011 0012 #include <kpeople/widgets/kpeoplewidgets_export.h> 0013 0014 namespace KPeople 0015 { 0016 class AbstractFieldWidgetFactoryPrivate; 0017 class PersonData; 0018 0019 class KPEOPLEWIDGETS_EXPORT AbstractFieldWidgetFactory : public QObject 0020 { 0021 Q_OBJECT 0022 public: 0023 explicit AbstractFieldWidgetFactory(QObject *parent = nullptr); 0024 ~AbstractFieldWidgetFactory() override; 0025 0026 virtual QString label() const = 0; 0027 virtual int sortWeight() const 0028 { 0029 return 100; 0030 } 0031 0032 virtual QWidget *createDetailsWidget(const KPeople::PersonData &person, QWidget *parent) const = 0; 0033 }; 0034 } 0035 0036 #endif // ABSTRACTFIELDWIDGETFACTORY_H