[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:16:00 UTC 2016


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

The following commit has been merged in the master branch:
commit d9785a93f1b5f84b2fcb0240c8598e198f989d0a
Author: David Edmundson <kde at davidedmundson.co.uk>
Date:   Tue Aug 3 00:41:07 2010 +0000

    Start on the mesasge view configure dialog
    
    
    svn path=/trunk/playground/network/telepathy-chat-handler/; revision=1158542
---
 CMakeLists.txt             |   3 +-
 config/CMakeLists.txt      |  24 +++++++
 config/chatwindowconfig.ui | 151 ++++++++++++++++++++++++++++-----------------
 config/main.cpp            |  11 ++++
 config/mainwindow.cpp      |  58 +++++++++++++++++
 config/mainwindow.h        |  25 ++++++++
 6 files changed, 215 insertions(+), 57 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 42508c9..315c445 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -24,4 +24,5 @@ include_directories (${KDE4_INCLUDES}
 )
 
 
-add_subdirectory(app)
\ No newline at end of file
+add_subdirectory(app)
+add_subdirectory(config)
\ No newline at end of file
diff --git a/config/CMakeLists.txt b/config/CMakeLists.txt
new file mode 100644
index 0000000..7f77347
--- /dev/null
+++ b/config/CMakeLists.txt
@@ -0,0 +1,24 @@
+# FIXME when the chat connection builds a lib correctly, don't do this weird horrible hack.
+
+include_directories(../lib/)
+
+set(telepathy_chat_config_SRCS
+        main.cpp
+        mainwindow.cpp
+        ../lib/chatwindowstyle.cpp
+        ../lib/chatview.cpp
+        ../lib/telepathychatmessageinfo.cpp
+        ../lib/telepathychatinfo.cpp
+)
+
+set(telepathy_chat_config_UI
+    ../lib/chatwindow.ui
+    chatwindowconfig.ui
+)
+
+kde4_add_ui_files(telepathy_chat_config_SRCS ${telepathy_chat_config_UI})
+
+kde4_add_executable(telepathy-chat-config ${telepathy_chat_config_SRCS})
+
+target_link_libraries(telepathy-chat-config ${KDE4_KDECORE_LIBS} ${KDE4_KDEUI_LIBS} ${QT_QTWEBKIT_LIBRARY} ${KDE4_KUTILS_LIBS} )
+
diff --git a/config/chatwindowconfig.ui b/config/chatwindowconfig.ui
index 5910928..29d4303 100644
--- a/config/chatwindowconfig.ui
+++ b/config/chatwindowconfig.ui
@@ -1,13 +1,13 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <ui version="4.0">
- <class>Dialog</class>
- <widget class="QDialog" name="Dialog">
+ <class>ChatWindowConfig</class>
+ <widget class="QDialog" name="ChatWindowConfig">
   <property name="geometry">
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>280</width>
-    <height>291</height>
+    <width>353</width>
+    <height>337</height>
    </rect>
   </property>
   <property name="windowTitle">
@@ -15,53 +15,96 @@
   </property>
   <layout class="QVBoxLayout" name="verticalLayout">
    <item>
-    <widget class="QDeclarativeView" name="declarativeView"/>
+    <widget class="ChatView" name="chatView" native="true">
+     <property name="minimumSize">
+      <size>
+       <width>0</width>
+       <height>130</height>
+      </size>
+     </property>
+    </widget>
    </item>
    <item>
-    <layout class="QGridLayout" name="gridLayout">
-     <item row="0" column="1">
-      <widget class="KComboBox" name="kcombobox"/>
+    <layout class="QHBoxLayout" name="horizontalLayout">
+     <item>
+      <layout class="QGridLayout" name="gridLayout">
+       <item row="0" column="1">
+        <widget class="KComboBox" name="kcombobox"/>
+       </item>
+       <item row="0" column="0">
+        <widget class="QLabel" name="label_3">
+         <property name="text">
+          <string>Message Style:</string>
+         </property>
+         <property name="alignment">
+          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+         </property>
+         <property name="buddy">
+          <cstring>kcombobox</cstring>
+         </property>
+        </widget>
+       </item>
+       <item row="1" column="1">
+        <widget class="KComboBox" name="kcombobox_2"/>
+       </item>
+       <item row="1" column="0">
+        <widget class="QLabel" name="label_4">
+         <property name="text">
+          <string>Variant:</string>
+         </property>
+         <property name="alignment">
+          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+         </property>
+         <property name="buddy">
+          <cstring>kcombobox_2</cstring>
+         </property>
+        </widget>
+       </item>
+       <item row="2" column="1">
+        <widget class="QCheckBox" name="checkBox">
+         <property name="text">
+          <string>Show User Icons</string>
+         </property>
+        </widget>
+       </item>
+       <item row="3" column="1">
+        <widget class="QCheckBox" name="checkBox_2">
+         <property name="text">
+          <string>Show Header</string>
+         </property>
+        </widget>
+       </item>
+       <item row="4" column="0">
+        <widget class="QLabel" name="label">
+         <property name="text">
+          <string>Select Font: </string>
+         </property>
+         <property name="alignment">
+          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+         </property>
+        </widget>
+       </item>
+       <item row="4" column="1">
+        <widget class="QLabel" name="label_2">
+         <property name="text">
+          <string>FIXME, KForntRequester Here</string>
+         </property>
+        </widget>
+       </item>
+      </layout>
      </item>
-     <item row="0" column="0">
-      <widget class="QLabel" name="label_3">
-       <property name="text">
-        <string>Message Style:</string>
+     <item>
+      <spacer name="horizontalSpacer">
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
        </property>
-      </widget>
-     </item>
-     <item row="1" column="1">
-      <widget class="KComboBox" name="kcombobox_2"/>
-     </item>
-     <item row="1" column="0">
-      <widget class="QLabel" name="label_4">
-       <property name="text">
-        <string>Variant:</string>
-       </property>
-      </widget>
-     </item>
-     <item row="2" column="1">
-      <widget class="QCheckBox" name="checkBox">
-       <property name="text">
-        <string>Show User Icons</string>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>40</width>
+         <height>20</height>
+        </size>
        </property>
-      </widget>
-     </item>
-     <item row="3" column="1">
-      <widget class="QCheckBox" name="checkBox_2">
-       <property name="text">
-        <string>Show Header</string>
-       </property>
-      </widget>
-     </item>
-     <item row="4" column="1">
-      <widget class="KFontRequester" name="kfontrequester"/>
-     </item>
-     <item row="4" column="0">
-      <widget class="QLabel" name="label">
-       <property name="text">
-        <string>Select Font: </string>
-       </property>
-      </widget>
+      </spacer>
      </item>
     </layout>
    </item>
@@ -92,19 +135,15 @@
  </widget>
  <customwidgets>
   <customwidget>
-   <class>KFontRequester</class>
-   <extends>QWidget</extends>
-   <header>kfontrequester.h</header>
-  </customwidget>
-  <customwidget>
    <class>KComboBox</class>
    <extends>QComboBox</extends>
    <header>kcombobox.h</header>
   </customwidget>
   <customwidget>
-   <class>QDeclarativeView</class>
-   <extends>QGraphicsView</extends>
-   <header>QtDeclarative/QDeclarativeView</header>
+   <class>ChatView</class>
+   <extends>QWidget</extends>
+   <header>chatview.h</header>
+   <container>1</container>
   </customwidget>
  </customwidgets>
  <resources/>
@@ -112,7 +151,7 @@
   <connection>
    <sender>buttonBox</sender>
    <signal>accepted()</signal>
-   <receiver>Dialog</receiver>
+   <receiver>ChatWindowConfig</receiver>
    <slot>accept()</slot>
    <hints>
     <hint type="sourcelabel">
@@ -128,7 +167,7 @@
   <connection>
    <sender>buttonBox</sender>
    <signal>rejected()</signal>
-   <receiver>Dialog</receiver>
+   <receiver>ChatWindowConfig</receiver>
    <slot>reject()</slot>
    <hints>
     <hint type="sourcelabel">
diff --git a/config/main.cpp b/config/main.cpp
new file mode 100644
index 0000000..9ae175b
--- /dev/null
+++ b/config/main.cpp
@@ -0,0 +1,11 @@
+#include <QtGui/QApplication>
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+    QApplication a(argc, argv);
+    MainWindow w;
+    w.show();
+
+    return a.exec();
+}
diff --git a/config/mainwindow.cpp b/config/mainwindow.cpp
new file mode 100644
index 0000000..7c01a4a
--- /dev/null
+++ b/config/mainwindow.cpp
@@ -0,0 +1,58 @@
+#include "mainwindow.h"
+#include "ui_chatwindowconfig.h"
+
+#include "telepathychatinfo.h"
+#include "telepathychatmessageinfo.h"
+
+MainWindow::MainWindow(QWidget *parent) :
+    QDialog(parent),
+    ui(new Ui::ChatWindowConfig)
+{
+    ui->setupUi(this);
+
+    //FIXME move all the demo chat code into a different file, as it will be quite long and in the way.
+
+    //set up a pretend config chat.
+    TelepathyChatInfo info;
+
+    info.setChatName("A demo chat");
+    info.setTimeOpened(QDateTime::currentDateTime());
+    info.setDestinationName("BobMarley at yahoo.com");
+    info.setSourceName("Jabber");
+    info.setDestinationDisplayName("Bob Marley");
+
+    ui->chatView->initialise(info);
+
+
+    //add a fake message
+    //in my head Bob Marley is quite a chatty friendly guy...
+
+    TelepathyChatMessageInfo message;
+    message.setMessage("Hello, how are things?");
+    message.setMessageDirection("rtl");
+    message.setSenderDisplayName("BobMarley at yahoo.com");
+    message.setSenderScreenName("Bob Marley");
+    message.setService("Jabber");
+    message.setTime(QDateTime::currentDateTime());
+
+
+    ui->chatView->addMessage(message);
+
+}
+
+MainWindow::~MainWindow()
+{
+    delete ui;
+}
+
+void MainWindow::changeEvent(QEvent *e)
+{/*
+    QDialog::changeEvent(e);
+    switch (e->type()) {
+    case QEvent::LanguageChange:
+        ui->retranslateUi(this);
+        break;
+    default:
+        break;
+    }*/
+}
diff --git a/config/mainwindow.h b/config/mainwindow.h
new file mode 100644
index 0000000..9c6dfb7
--- /dev/null
+++ b/config/mainwindow.h
@@ -0,0 +1,25 @@
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QDialog>
+
+namespace Ui {
+    class ChatWindowConfig;
+}
+
+class MainWindow : public QDialog
+{
+    Q_OBJECT
+
+public:
+    explicit MainWindow(QWidget *parent = 0);
+    ~MainWindow();
+
+protected:
+    void changeEvent(QEvent *e);
+
+private:
+    Ui::ChatWindowConfig *ui;
+};
+
+#endif // MAINWINDOW_H

-- 
ktp-text-ui packaging



More information about the pkg-kde-commits mailing list