File indexing completed on 2025-01-19 03:56:07

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2008-07-03
0007  * Description : A wrapper send desktop notifications
0008  *
0009  * SPDX-FileCopyrightText: 2009-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
0010  * SPDX-FileCopyrightText: 2009-2011 by Michael G. Hansen <mike at mghansen dot de>
0011  *
0012  * SPDX-License-Identifier: GPL-2.0-or-later
0013  *
0014  * ============================================================ */
0015 
0016 #ifndef DIGIKAM_DNOTIFICATION_WRAPPER_H
0017 #define DIGIKAM_DNOTIFICATION_WRAPPER_H
0018 
0019 // Qt includes
0020 
0021 #include <QString>
0022 #include <QPixmap>
0023 
0024 // Local includes
0025 
0026 #include "digikam_export.h"
0027 
0028 class QWidget;
0029 
0030 namespace Digikam
0031 {
0032 
0033 /**
0034  * @brief Show a notification using KNotify, or KPassivePopup if KNotify is unavailable
0035  * @param eventId     Event id for this notification, KNotification::Notification
0036  *                    is used if this is empty. Events have to be configured in
0037  *                    digikam.notifyrc
0038  * @param message     Message to display
0039  * @param parent      Widget which owns the notification
0040  * @param windowTitle Title of the notification window (only used for KPassivePopup)
0041  * @param pixmap      Pixmap to show in the notification, in addition to the digikam logo.
0042  */
0043 void DIGIKAM_EXPORT DNotificationWrapper(const QString& eventId, const QString& message,
0044                                          QWidget* const parent, const QString& windowTitle,
0045                                          const QPixmap& pixmap = QPixmap());
0046 } // namespace Digikam
0047 
0048 #ifdef Q_OS_DARWIN
0049 
0050 bool MacNativeDispatchNotify(const QString& summary, const QString& message);
0051 
0052 #endif
0053 
0054 #endif // DIGIKAM_DNOTIFICATION_WRAPPER_H