File indexing completed on 2022-11-23 10:35:59

0001 /*
0002     This file is part of the KDE project
0003     SPDX-FileCopyrightText: 2005-2007 Olivier Goffart <ogoffart at kde.org>
0004 
0005     SPDX-License-Identifier: LGPL-2.0-only
0006 */
0007 
0008 #ifndef KNOTIFYCONFIGACTIONSWIDGET_H
0009 #define KNOTIFYCONFIGACTIONSWIDGET_H
0010 
0011 #include "knotify-config.h"
0012 #include "ui_knotifyconfigactionswidgetbase.h"
0013 #include <QWidget>
0014 
0015 #if HAVE_CANBERRA
0016 struct ca_context;
0017 #endif
0018 
0019 class KNotifyConfigElement;
0020 
0021 /**
0022  * Represent the config for an event
0023  *  @internal
0024  *  @author Olivier Goffart <ogoffart @ kde.org>
0025  */
0026 class KNotifyConfigActionsWidget : public QWidget
0027 {
0028     Q_OBJECT
0029 public:
0030     explicit KNotifyConfigActionsWidget(QWidget *parent);
0031     ~KNotifyConfigActionsWidget() override;
0032 
0033     void setConfigElement(KNotifyConfigElement *config);
0034     void save(KNotifyConfigElement *config);
0035 Q_SIGNALS:
0036     void changed();
0037 private Q_SLOTS:
0038     void slotPlay();
0039     void slotTTSComboChanged();
0040 
0041 private:
0042     Ui::KNotifyConfigActionsWidgetBase m_ui;
0043 #if HAVE_CANBERRA
0044     ca_context *m_context = nullptr;
0045 #endif
0046 };
0047 
0048 #endif // KNOTIFYCONFIGACTIONSWIDGET_H