[SCM] ktp-contact-applet packaging branch, master, updated. debian/15.12.1-1-966-gde83ac5
Maximiliano Curia
maxy at moszumanska.debian.org
Sat May 28 00:12:42 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-desktop-applets.git;a=commitdiff;h=82bfa47
The following commit has been merged in the master branch:
commit 82bfa47288c33a77df37eef255092a77c4e0b1b2
Author: Lasath Fernando <kde at lasath.org>
Date: Wed Nov 30 23:47:12 2011 +1100
Created a ConversationsModel class that contains a list of Active Conversations.
Changed plasmoid to display said list.
---
chat/org.kde.ktp-chat/contents/ui/ChatWidget.qml | 95 ++++++++++++++++++++++++
1 file changed, 95 insertions(+)
diff --git a/chat/org.kde.ktp-chat/contents/ui/ChatWidget.qml b/chat/org.kde.ktp-chat/contents/ui/ChatWidget.qml
new file mode 100644
index 0000000..71b0bfd
--- /dev/null
+++ b/chat/org.kde.ktp-chat/contents/ui/ChatWidget.qml
@@ -0,0 +1,95 @@
+import Qt 4.7
+import org.kde.telepathy.declarativeplugins 0.1
+import org.kde.plasma.core 0.1 as PlasmaCore
+import org.kde.plasma.graphicswidgets 0.1 as PlasmaWidgets
+
+Item {
+ id:main
+
+ function derp() {
+ console.log("deeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeerp!");
+ return true;
+ }
+
+ property Conversation conv
+
+ PlasmaWidgets.IconWidget {
+ id: title
+ text: conv.nick
+ icon: conv.avatar
+ anchors.top: parent.top
+ anchors.left: parent.left; anchors.right: parent.right
+// anchors.bottom: chatArea.top
+ height: 12
+ orientation: Qt.Horizontal
+ }
+
+ Item {
+ id:chatArea
+
+// anchors.top: parent.top
+ anchors.top: title.bottom
+ anchors.left: parent.left; anchors.right: parent.right
+ anchors.bottom: input.top
+ anchors.margins: 5
+
+ Rectangle {
+ anchors.fill: chatArea
+ }
+
+ ListView {
+ id: view
+
+ anchors.fill: parent
+ clip: true
+
+ delegate: TextDelegate {}
+ model: conv.model
+ ListView.onAdd: {
+ derp();
+ }
+ }
+
+ //used states here because it'll make a scrollbar (dis)appear later on
+ states: [
+ State {
+ name: "static"
+ },
+ State {
+ name: "auto-scrolling"
+ PropertyChanges {
+ target: view.model
+ restoreEntryValues: true
+ onRowsInserted: {
+ view.positionViewAtEnd();
+ }
+ }
+ }
+ ]
+
+ }
+
+ PlasmaWidgets.LineEdit {
+ id: input
+
+// anchors.top: view.bottom
+ anchors.left: parent.left; anchors.right: parent.right
+ anchors.bottom: parent.bottom
+
+ onReturnPressed: {
+ view.model.sendNewMessage(text);
+ text = "";
+ }
+ }
+
+ ConversationWatcher {
+ id:watcher
+ onNewConversation: {
+ console.log("New Convo!");
+ conv = con;
+// conv.model = con.model;
+// view.model.rowsInserted.connect(view.positionViewAtEnd);
+ chatArea.state = "auto-scrolling";
+ }
+ }
+}
\ No newline at end of file
--
ktp-contact-applet packaging
More information about the pkg-kde-commits
mailing list