diff options
author | Klaas Freitag <freitag@owncloud.com> | 2016-03-04 19:40:29 +0300 |
---|---|---|
committer | Klaas Freitag <freitag@owncloud.com> | 2016-03-10 19:22:36 +0300 |
commit | 688c5502a86e50a5ab6134a2987da17f7f741e90 (patch) | |
tree | eab9200b629bb2c7b9c30a0a6aa4af073514aa90 /src/gui/notificationwidget.h | |
parent | eb00b341915de2cb69b1f849dd3847e2031b2c16 (diff) |
New GUI class NotificationWidget.
It displays a server notification that can come with a dynamic
set of buttons next to a message and a subject (=header)
Diffstat (limited to 'src/gui/notificationwidget.h')
-rw-r--r-- | src/gui/notificationwidget.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/src/gui/notificationwidget.h b/src/gui/notificationwidget.h new file mode 100644 index 000000000..63f4e14a3 --- /dev/null +++ b/src/gui/notificationwidget.h @@ -0,0 +1,51 @@ +/* + * Copyright (C) by Klaas Freitag <freitag@owncloud.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + */ + +#ifndef NOTIFICATIONWIDGET_H +#define NOTIFICATIONWIDGET_H + +#include <QWidget> + +#include "activitywidget.h" + +#include "ui_notificationwidget.h" + +namespace OCC { + +class NotificationWidget : public QWidget +{ + Q_OBJECT +public: + explicit NotificationWidget(QWidget *parent = 0); + + void setAccountName( const QString& name ); + +signals: + void sendNotificationRequest( const QString&, const QString& link, const QString& verb); + +public slots: + void setActivity(const Activity& activity); + +private slots: + void slotButtonClicked(); + +private: + Ui_NotificationWidget _ui; + Activity _myActivity; + QList<QPushButton*> _buttons; + QString _accountName; +}; + +} + +#endif // NOTIFICATIONWIDGET_H |