File indexing completed on 2024-05-12 15:44:26

0001 /*
0002     SPDX-FileCopyrightText: 2013 David Edmundson <davidedmundson@kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.1-or-later
0005 */
0006 
0007 #ifndef ABSTRACT_PERSON_ACTION_H
0008 #define ABSTRACT_PERSON_ACTION_H
0009 
0010 #include <QAction>
0011 #include <QObject>
0012 
0013 #include <KPeople/PersonData>
0014 #include <kpeoplebackend/kpeoplebackend_export.h>
0015 
0016 namespace KPeople
0017 {
0018 class PersonData;
0019 
0020 class KPEOPLEBACKEND_EXPORT AbstractPersonAction : public QObject
0021 {
0022     Q_OBJECT
0023 public:
0024     explicit AbstractPersonAction(QObject *parent);
0025     /** A list of actions that can be executed for a contact
0026      * Disabled actions should not be added
0027      *
0028      * @param data passes the person we're creating the actions for
0029      * @param parent parent object for newly created actions
0030      */
0031     virtual QList<QAction *> actionsForPerson(const PersonData &data, QObject *parent) const = 0;
0032 };
0033 
0034 }
0035 
0036 #endif