File indexing completed on 2024-05-05 03:57:09
0001 /* 0002 SPDX-FileCopyrightText: 2013 David Edmundson <davidedmundson@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.1-or-later 0005 */ 0006 0007 #ifndef KPEOPLE_ACTIONS_H 0008 #define KPEOPLE_ACTIONS_H 0009 0010 #include <kpeople/kpeople_export.h> 0011 #include <qobjectdefs.h> 0012 0013 #include <QList> 0014 0015 class QString; 0016 class QObject; 0017 class QAction; 0018 namespace KPeople 0019 { 0020 Q_NAMESPACE_EXPORT(KPEOPLE_EXPORT) 0021 class PersonData; 0022 0023 /** 0024 * Each action returned in the list can be one of these 0025 * types, however the Type is not mandatory with the action 0026 * 0027 * The type should be set as QObject property "actionType" 0028 */ 0029 enum ActionType { 0030 TextChatAction, 0031 AudioCallAction, 0032 VideoCallAction, 0033 SendEmailAction, 0034 SendFileAction, 0035 OtherAction = 100, 0036 }; 0037 Q_ENUM_NS(ActionType) 0038 0039 /** 0040 * Returns a list of actions relevant to the specified @p contactUri where 0041 * each QAction will have @p parent passed as its parent QObject 0042 */ 0043 KPEOPLE_EXPORT QList<QAction *> actionsForPerson(const QString &contactUri, QObject *parent); 0044 } 0045 0046 #endif // KPEOPLE_ACTIONS_H