Move the qml subdir into qmlui
authorManuel Nickschas <sputnick@quassel-irc.org>
Thu, 11 Aug 2011 21:16:29 +0000 (23:16 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Thu, 11 Aug 2011 21:16:29 +0000 (23:16 +0200)
Makes more sense to place the qml files under qmlui.

CMakeLists.txt
qml/CMakeLists.txt [deleted file]
qml/ChatView.qml [deleted file]
src/qmlui/CMakeLists.txt
src/qmlui/qml/ChatView.qml [new file with mode: 0644]
src/qmlui/qml/qml.qrc [moved from qml/qml.qrc with 100% similarity]

index 8eba7ab..2efc762 100644 (file)
@@ -421,5 +421,4 @@ add_subdirectory(data)
 add_subdirectory(icons)
 add_subdirectory(pics)
 add_subdirectory(po)
-add_subdirectory(qml)
 add_subdirectory(src)
diff --git a/qml/CMakeLists.txt b/qml/CMakeLists.txt
deleted file mode 100644 (file)
index 08a90fe..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-if(HAVE_QML)
-  set(CLIENT_RCS ${CLIENT_RCS} ../qml/qml.qrc PARENT_SCOPE)
-endif(HAVE_QML)
diff --git a/qml/ChatView.qml b/qml/ChatView.qml
deleted file mode 100644 (file)
index 141ccd6..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-import QtQuick 1.1
-// import Qt.components 1.0
-
-
-ListView {
-  id: flickable
-  anchors.fill: parent
-
-  Component {
-      id: msgDelegate
-      Item {
-        Row {
-          id: chatline
-          Text { text: timestamp; wrapMode: Text.NoWrap; width: 100 }
-          Text { text: sender; wrapMode: Text.NoWrap; width: 100 }
-          Text { text: contents; wrapMode: Text.Wrap; width: flickable.width-200}
-        }
-        height: chatline.height
-        ListView.onAdd: positionViewAtEnd()
-      }
-  }
-
-  model: msgModel
-
-  delegate: msgDelegate
-
-  Rectangle {
-    id: scrollbar
-    anchors.right: flickable.right
-    y: flickable.visibleArea.yPosition * flickable.height
-           width: 10
-           height: flickable.visibleArea.heightRatio * flickable.height
-           color: "black"
-  }
-}
index 7261277..ab6808c 100644 (file)
@@ -36,5 +36,7 @@ include_directories(${CMAKE_SOURCE_DIR}/src/common
                     ${CMAKE_SOURCE_DIR}/src/uisupport
                     ${CMAKE_CURRENT_BINARY_DIR})
 
+set(CLIENT_RCS ${CLIENT_RCS} qmlui/qml/qml.qrc PARENT_SCOPE)
+
 add_library(mod_qmlui STATIC ${SOURCES} ${SPSRC} ${MOC} ${DBUS} ${UI} ${HEADERS})
 add_dependencies(mod_qmlui mod_common mod_client mod_uisupport)
diff --git a/src/qmlui/qml/ChatView.qml b/src/qmlui/qml/ChatView.qml
new file mode 100644 (file)
index 0000000..6996873
--- /dev/null
@@ -0,0 +1,44 @@
+import QtQuick 1.0
+// import Qt.components 1.0
+
+Rectangle {
+  id: container
+
+  Component {
+      id: msgDelegate
+      Item {
+        id: msgDelegateItem
+        Row {
+          id: chatline
+          Text { text: timestamp; wrapMode: Text.NoWrap; width: 100 }
+          Text { text: sender; wrapMode: Text.NoWrap; width: 100 }
+          Text { text: contents; wrapMode: Text.Wrap; width: flickable.width-200}
+        }
+        height: chatline.height
+      }
+  }
+
+  ListView {
+    id: flickable
+    anchors.fill: parent
+
+
+    model: msgModel
+
+    delegate: msgDelegate
+
+    Connections {
+      target: msgModel
+      onRowsInserted: flickable.positionViewAtEnd();
+    }
+
+    Rectangle {
+      id: scrollbar
+      anchors.right: flickable.right
+      y: flickable.visibleArea.yPosition * flickable.height
+      width: 10
+      height: flickable.visibleArea.heightRatio * flickable.height
+      color: "black"
+    }
+  }
+}
similarity index 100%
rename from qml/qml.qrc
rename to src/qmlui/qml/qml.qrc