Makes more sense to place the qml files under qmlui.
add_subdirectory(icons)
add_subdirectory(pics)
add_subdirectory(po)
add_subdirectory(icons)
add_subdirectory(pics)
add_subdirectory(po)
+++ /dev/null
-if(HAVE_QML)
- set(CLIENT_RCS ${CLIENT_RCS} ../qml/qml.qrc PARENT_SCOPE)
-endif(HAVE_QML)
+++ /dev/null
-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"
- }
-}
${CMAKE_SOURCE_DIR}/src/uisupport
${CMAKE_CURRENT_BINARY_DIR})
${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)
add_library(mod_qmlui STATIC ${SOURCES} ${SPSRC} ${MOC} ${DBUS} ${UI} ${HEADERS})
add_dependencies(mod_qmlui mod_common mod_client mod_uisupport)
--- /dev/null
+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"
+ }
+ }
+}