1 /***************************************************************************
2 Copyright 2006 David Nolden <david.nolden.kdevelop@art-master.de>
3 ***************************************************************************/
5 /***************************************************************************
7 * This program is free software; you can redistribute it and/or modify *
8 * it under the terms of the GNU General Public License as published by *
9 * the Free Software Foundation; either version 2 of the License, or *
10 * (at your option) any later version. *
12 ***************************************************************************/
14 #ifndef MESSAGESHOWER_H
15 #define MESSAGESHOWER_H
18 class KDevTeamworkTextMessage
;
20 class KDevTeamworkUser
;
21 class InDocumentMessage
;
24 #include "ui_kdevteamwork_textmessage.h"
25 #include "ui_kdevteamwork_userinfo.h"
27 #include "lib/network/safesharedptr.h"
28 #include "kdevteamwork_helpers.h"
29 #include "safelogger.h"
30 #include "autoconstructpointer.h"
33 class MessageSerialization
;
35 class InDocumentMessageShowerData
;
38 class MessageInterface
;
39 typedef SafeSharedPtr
<MessageInterface
, MessageSerialization
> MessagePointer
;
42 using namespace Teamwork
;
44 class KDevTeamworkMessageShower
: public QObject
{
47 KDevTeamworkMessageShower( KDevTeamworkTextMessage
* msg
, QWidget
* widget
, KDevTeamwork
* teamwork
);
49 virtual void isReplyToButton();
50 virtual void menuButton();
51 virtual void historyButton();
52 virtual void userStateChanged();
53 virtual void messageUpdated( const MessagePointer
& msg
);
55 SafeSharedPtr
<KDevTeamworkTextMessage
> m_message
;
57 Ui_TextMessageShower m_widgetData
;
58 QPointer
<KDevTeamwork
> m_teamwork
;
60 virtual void fillData();
67 class KDevTeamworkUserInfoShower
: public QObject
{
70 KDevTeamworkUserInfoShower( KDevTeamworkUser
* user
, QWidget
* widget
, KDevTeamwork
* teamwork
);
72 virtual void menuButton();
73 virtual void historyButton();
74 virtual void userStateChanged();
80 SafeSharedPtr
< KDevTeamworkUser
> m_user
;
82 Ui_UserInfo m_widgetData
;
83 QPointer
<KDevTeamwork
> m_teamwork
;
86 class InDocumentMessageShower
: public KDevTeamworkMessageShower
, private SafeLogger
{
89 InDocumentMessageShower( InDocumentMessage
* msg
, QWidget
* widget
, KDevTeamwork
* teamwork
);
92 void contextClicked();
95 virtual void fillData();
98 AutoConstructPointer
<InDocumentMessageShowerData
> m_data
;
103 // kate: space-indent on; indent-width 2; tab-width 2; replace-tabs on