[SCM] ktp-text-ui packaging branch, master, updated. debian/15.12.1-1-1918-gdf4b0ec
Maximiliano Curia
maxy at moszumanska.debian.org
Sat May 28 00:17:52 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-text-ui.git;a=commitdiff;h=937aa35
The following commit has been merged in the master branch:
commit 937aa354df3a7898a64b1bd9684ab26a6b4b0e19
Author: David Edmundson <kde at davidedmundson.co.uk>
Date: Wed Sep 22 16:10:40 2010 +0000
Prototype emitting signals from the library when an event (user typing
or a message received) occurs.
svn path=/trunk/playground/network/telepathy-chat-handler/; revision=1178279
---
lib/chatwindow.cpp | 11 +++++++++++
lib/chatwindow.h | 11 +++++++++++
2 files changed, 22 insertions(+)
diff --git a/lib/chatwindow.cpp b/lib/chatwindow.cpp
index 160f959..67cd48a 100644
--- a/lib/chatwindow.cpp
+++ b/lib/chatwindow.cpp
@@ -73,6 +73,11 @@ void ChatWindow::changeEvent(QEvent *e)
}
+QString ChatWindow::title()
+{
+ return "not implemented yet.";
+}
+
void ChatWindow::handleIncomingMessage(const Tp::ReceivedMessage &message)
{
@@ -85,7 +90,10 @@ void ChatWindow::handleIncomingMessage(const Tp::ReceivedMessage &message)
ui->chatArea->addMessage(messageInfo);
m_chatConnection->channel()->acknowledge(QList<Tp::ReceivedMessage>() << message);
+
+ Q_EMIT(SIGNAL(messageReceived()));
}
+ //if the window isn't ready, we don't acknowledge the mesage. We process them as soon as we are ready.
}
void ChatWindow::handleMessageSent(const Tp::Message &message, Tp::MessageSendingFlags, const QString&) /*Not sure what these other args are for*/
@@ -147,6 +155,9 @@ void ChatWindow::updateChatStatus(Tp::ContactPtr contact, ChannelChatState state
case ChannelChatStateComposing:
ui->statusLabel->setText(i18n("%1 is typing a message").arg(contact->alias()));
}
+
+ //FIXME work out if _any_ user is typing and emit contactIsTypingChanged();
+
}
diff --git a/lib/chatwindow.h b/lib/chatwindow.h
index 1a42c5c..6bdbaed 100644
--- a/lib/chatwindow.h
+++ b/lib/chatwindow.h
@@ -50,6 +50,10 @@ public:
explicit ChatWindow(ChatConnection* chat, QWidget *parent = 0);
~ChatWindow();
+
+ /** Returns the name of this chat window*/
+ QString title();
+
protected:
void changeEvent(QEvent *e);
@@ -77,8 +81,15 @@ protected slots:
signals:
+ /** Emitted whenever the title for the chat changes, normally the name of the contact or a topic*/
void titleChanged(QString title);
+ /** Emmited whenever a message is received in this channel*/
+ void messageReceived();
+
+ /** Emitted when another contact in the channel starts/stops typing (if supported by the protocol)*/
+ void userTypingChanged(bool);
+
private:
Ui::ChatWindow *ui;
ChatConnection* m_chatConnection;
--
ktp-text-ui packaging
More information about the pkg-kde-commits
mailing list