diff options
| author | Tobias Markmann <tm@ayena.de> | 2015-07-09 08:30:11 (GMT) |
|---|---|---|
| committer | Tobias Markmann <tm@ayena.de> | 2015-07-10 14:00:16 (GMT) |
| commit | 7af21fdd59af3b3112cff69996301605859af84c (patch) | |
| tree | 5a1c79ac5d8c3a5521b098f68ae6c190a291455c /Swift/QtUI/EventViewer/EventDelegate.h | |
| parent | a23d903d67f05257f0e9376a212b83045ea768f1 (diff) | |
| download | swift-7af21fdd59af3b3112cff69996301605859af84c.zip swift-7af21fdd59af3b3112cff69996301605859af84c.tar.bz2 | |
Create notice events for incoming file-transfers
Test-Information:
Send a file from one Swift instance to another. The UX is similar to
that of a MUC invite, clicking the notice will bring the relevant chat
in front.
Change-Id: Ief3cd7371ae01b2b38b6d1af36189df961eacef4
Diffstat (limited to 'Swift/QtUI/EventViewer/EventDelegate.h')
| -rw-r--r-- | Swift/QtUI/EventViewer/EventDelegate.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Swift/QtUI/EventViewer/EventDelegate.h b/Swift/QtUI/EventViewer/EventDelegate.h index f5dd196..6ab96e4 100644 --- a/Swift/QtUI/EventViewer/EventDelegate.h +++ b/Swift/QtUI/EventViewer/EventDelegate.h | |||
| @@ -1,20 +1,20 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2010 Isode Limited. | 2 | * Copyright (c) 2010-2015 Isode Limited. |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * See the COPYING file for more information. | 4 | * See the COPYING file for more information. |
| 5 | */ | 5 | */ |
| 6 | 6 | ||
| 7 | #pragma once | 7 | #pragma once |
| 8 | 8 | ||
| 9 | #include <QStyledItemDelegate> | 9 | #include <QStyledItemDelegate> |
| 10 | 10 | ||
| 11 | #include "Swift/QtUI/Roster/DelegateCommons.h" | 11 | #include <Swift/QtUI/EventViewer/TwoLineDelegate.h> |
| 12 | #include "Swift/QtUI/EventViewer/TwoLineDelegate.h" | 12 | #include <Swift/QtUI/Roster/DelegateCommons.h> |
| 13 | 13 | ||
| 14 | namespace Swift { | 14 | namespace Swift { |
| 15 | enum EventType {MessageEventType, SubscriptionEventType, ErrorEventType, MUCInviteEventType}; | 15 | enum EventType {MessageEventType, SubscriptionEventType, ErrorEventType, MUCInviteEventType, IncomingFileTransferEventType}; |
| 16 | class EventDelegate : public QStyledItemDelegate { | 16 | class EventDelegate : public QStyledItemDelegate { |
| 17 | Q_OBJECT | 17 | Q_OBJECT |
| 18 | public: | 18 | public: |
| 19 | EventDelegate(); | 19 | EventDelegate(); |
| 20 | QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const; | 20 | QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const; |
| @@ -24,8 +24,9 @@ namespace Swift { | |||
| 24 | DelegateCommons common_; | 24 | DelegateCommons common_; |
| 25 | TwoLineDelegate messageDelegate_; | 25 | TwoLineDelegate messageDelegate_; |
| 26 | TwoLineDelegate subscriptionDelegate_; | 26 | TwoLineDelegate subscriptionDelegate_; |
| 27 | TwoLineDelegate errorDelegate_; | 27 | TwoLineDelegate errorDelegate_; |
| 28 | TwoLineDelegate mucInviteDelegate_; | 28 | TwoLineDelegate mucInviteDelegate_; |
| 29 | TwoLineDelegate incomingFileTransferDelegate_; | ||
| 29 | }; | 30 | }; |
| 30 | } | 31 | } |
| 31 | 32 | ||
Swift