[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:20:46 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-text-ui.git;a=commitdiff;h=8fa31fc

The following commit has been merged in the master branch:
commit 8fa31fca51fe5a371abc4430c55b051a82821a7a
Author: Lasath Fernando <kde at lasath.org>
Date:   Sat Nov 12 02:46:13 2011 +1100

    Implemented a basic Conversation class.
    Also changed MessageItem from a struct to a class.
---
 lib/CMakeLists.txt         |  2 ++
 lib/conversation-model.cpp |  3 ++-
 lib/conversation.cpp       | 50 ++++++++++++++++++++++++++++++++++++++++++++++
 lib/conversation.h         | 48 ++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 102 insertions(+), 1 deletion(-)

diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index acf7e41..8ddb0be 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -3,6 +3,7 @@ set(ktpchat_SRCS
         chat-window-style.cpp
         chat-window-style-manager.cpp
         conversation-model.cpp
+        conversation.cpp
         adium-theme-view.cpp
         adium-theme-header-info.cpp
         adium-theme-message-info.cpp
@@ -26,6 +27,7 @@ set(ktpchat_HDRS
     chat-window-style.h
     chat-window-style-manager.h
     conversation-model.h
+    conversation.h
 )
 
 set(ktpchat_PRETTY_HDRS
diff --git a/lib/conversation-model.cpp b/lib/conversation-model.cpp
index 569d608..025af1d 100644
--- a/lib/conversation-model.cpp
+++ b/lib/conversation-model.cpp
@@ -23,7 +23,8 @@
 #include <KDebug>
 #include <TelepathyQt4/ReceivedMessage>
 
-struct MessageItem {
+class MessageItem {
+public:
 	QString user;
 	QString text;
 	QDateTime time;
diff --git a/lib/conversation.cpp b/lib/conversation.cpp
new file mode 100644
index 0000000..e96fef6
--- /dev/null
+++ b/lib/conversation.cpp
@@ -0,0 +1,50 @@
+/*
+    <one line to give the library's name and an idea of what it does.>
+    Copyright (C) 2011  Lasath Fernando <kde at lasath.org>
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public
+    License along with this library; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+*/
+
+
+#include "conversation.h"
+
+#include "conversation-model.h"
+#include <TelepathyQt4/Account>
+
+class Conversation::ConversationPrivate {
+public:
+	ConversationModel* model;
+	Tp::AccountPtr account;
+};
+
+Conversation::Conversation(Tp::TextChannelPtr channel, Tp::AccountPtr account) :
+	d(new ConversationPrivate)
+{
+	d->model = new ConversationModel();
+	d->model->setTextChannel(channel);
+
+	d->account = account;
+}
+
+const ConversationModel* Conversation::model() const
+{
+	return d->model;
+}
+
+Conversation::~Conversation()
+{
+	delete d->model;
+}
+
diff --git a/lib/conversation.h b/lib/conversation.h
new file mode 100644
index 0000000..a485e27
--- /dev/null
+++ b/lib/conversation.h
@@ -0,0 +1,48 @@
+/*
+    <one line to give the library's name and an idea of what it does.>
+    Copyright (C) 2011  Lasath Fernando <kde at lasath.org>
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public
+    License along with this library; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+*/
+
+
+#ifndef CONVERSATION_H
+#define CONVERSATION_H
+
+#include <QObject>
+#include <TelepathyQt4/Types>
+#include "conversation-model.h"
+
+class ConversationModel;
+class Conversation : public QObject
+{
+Q_OBJECT
+Q_PROPERTY(const ConversationModel* model READ model NOTIFY modelChanged)
+
+public:
+    Conversation(Tp::TextChannelPtr channel, Tp::AccountPtr account);
+    virtual ~Conversation();
+
+	const ConversationModel* model() const;
+
+Q_SIGNALS:
+	void modelChanged(ConversationModel* newModel);
+
+private:
+	class ConversationPrivate;
+	ConversationPrivate *d;
+};
+
+#endif // CONVERSATION_H

-- 
ktp-text-ui packaging



More information about the pkg-kde-commits mailing list