summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-06-01 08:48:42 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-06-01 09:24:28 (GMT)
commit2812bddd81f8a1b804c7460f4e14cd0aa393d129 (patch)
treed46294f35150c4f0f43deaf2d31fceaf945ae715 /UI/Qt/QtChatWindow.h
downloadswift-contrib-2812bddd81f8a1b804c7460f4e14cd0aa393d129.zip
swift-contrib-2812bddd81f8a1b804c7460f4e14cd0aa393d129.tar.bz2
Import.
Diffstat (limited to 'UI/Qt/QtChatWindow.h')
-rw-r--r--UI/Qt/QtChatWindow.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/UI/Qt/QtChatWindow.h b/UI/Qt/QtChatWindow.h
new file mode 100644
index 0000000..ef091e3
--- /dev/null
+++ b/UI/Qt/QtChatWindow.h
@@ -0,0 +1,56 @@
+#ifndef SWIFT_QtChatWindow_H
+#define SWIFT_QtChatWindow_H
+
+#include "Swiften/Controllers/ChatWindow.h"
+
+#include <QWidget>
+
+class QTextEdit;
+class QLineEdit;
+class QComboBox;
+
+namespace Swift {
+ class QtChatView;
+ class QtTreeWidget;
+ class QtTreeWidgetFactory;
+ class TreeWidget;
+ class QtChatWindow : public QWidget, public ChatWindow {
+ Q_OBJECT
+ public:
+ QtChatWindow(const QString &contact, QtTreeWidgetFactory* treeWidgetFactory);
+ void addMessage(const String &message, const String &senderName, bool senderIsSelf, const boost::optional<SecurityLabel>& label);
+ void addSystemMessage(const String& message);
+ void addErrorMessage(const String& errorMessage);
+ void show();
+ void setUnreadMessageCount(int count);
+ void convertToMUC();
+ TreeWidget *getTreeWidget();
+ void setAvailableSecurityLabels(const std::vector<SecurityLabel>& labels);
+ void setSecurityLabelsEnabled(bool enabled);
+ void setSecurityLabelsError();
+ SecurityLabel getSelectedSecurityLabel();
+
+ protected slots:
+ void qAppFocusChanged(QWidget* old, QWidget* now);
+ void closeEvent(QCloseEvent* event);
+
+ private slots:
+ void returnPressed();
+
+ private:
+ void updateTitleWithUnreadCount();
+
+ int unreadCount_;
+ QString contact_;
+ QtChatView *messageLog_;
+ QLineEdit* input_;
+ QComboBox *labelsWidget_;
+ QtTreeWidget *treeWidget_;
+ std::vector<SecurityLabel> availableLabels_;
+ bool previousMessageWasSelf_;
+ bool previousMessageWasSystem_;
+ QString previousSenderName_;
+ };
+}
+
+#endif