Don't keep compiling/run if something failed.
[kdevelopdvcssupport.git] / plugins / teamwork / kdevteamwork_messageshower.h
blob2264f67898fc4f6c4de5d1a1027628a991227af6
1 /***************************************************************************
2 Copyright 2006 David Nolden <david.nolden.kdevelop@art-master.de>
3 ***************************************************************************/
5 /***************************************************************************
6 * *
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. *
11 * *
12 ***************************************************************************/
14 #ifndef MESSAGESHOWER_H
15 #define MESSAGESHOWER_H
17 class QWidget;
18 class KDevTeamworkTextMessage;
19 class KDevTeamwork;
20 class KDevTeamworkUser;
21 class InDocumentMessage;
23 #include <QObject>
24 #include "ui_kdevteamwork_textmessage.h"
25 #include "ui_kdevteamwork_userinfo.h"
26 #include <QPointer>
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;
37 namespace Teamwork {
38 class MessageInterface;
39 typedef SafeSharedPtr<MessageInterface, MessageSerialization> MessagePointer;
42 using namespace Teamwork;
44 class KDevTeamworkMessageShower : public QObject {
45 Q_OBJECT
46 public:
47 KDevTeamworkMessageShower( KDevTeamworkTextMessage* msg, QWidget* widget, KDevTeamwork* teamwork );
48 public slots:
49 virtual void isReplyToButton();
50 virtual void menuButton();
51 virtual void historyButton();
52 virtual void userStateChanged();
53 virtual void messageUpdated( const MessagePointer& msg );
54 protected:
55 SafeSharedPtr<KDevTeamworkTextMessage> m_message;
56 QWidget* m_widget;
57 Ui_TextMessageShower m_widgetData;
58 QPointer<KDevTeamwork> m_teamwork;
60 virtual void fillData();
62 private:
63 void fill();
67 class KDevTeamworkUserInfoShower : public QObject {
68 Q_OBJECT
69 public:
70 KDevTeamworkUserInfoShower( KDevTeamworkUser* user, QWidget* widget, KDevTeamwork* teamwork );
71 public slots:
72 virtual void menuButton();
73 virtual void historyButton();
74 virtual void userStateChanged();
75 private:
76 void setIp();
77 void setStatus();
78 void setIcon();
80 SafeSharedPtr< KDevTeamworkUser > m_user;
81 QWidget* m_widget;
82 Ui_UserInfo m_widgetData;
83 QPointer<KDevTeamwork> m_teamwork;
86 class InDocumentMessageShower : public KDevTeamworkMessageShower, private SafeLogger {
87 Q_OBJECT
88 public:
89 InDocumentMessageShower( InDocumentMessage* msg, QWidget* widget, KDevTeamwork* teamwork );
90 public slots:
91 void fileClicked();
92 void contextClicked();
93 protected:
95 virtual void fillData();
96 private:
97 void fill();
98 AutoConstructPointer<InDocumentMessageShowerData> m_data;
101 #endif
103 // kate: space-indent on; indent-width 2; tab-width 2; replace-tabs on