diff options
author | Joe Robinson <joe@lc8n.com> | 2017-04-15 16:08:40 +0200 |
---|---|---|
committer | Joe Robinson <joe@lc8n.com> | 2017-04-15 16:08:40 +0200 |
commit | 166a8206a3747628182a97acbc25bf393e78eac9 (patch) | |
tree | 7725fbfd060ed4ac0e6ec698ab2eb20199b699b5 /main.qml | |
parent | cb1429328b11e1acef99e4c5730e55e3384b19fd (diff) |
Handle joining of channels, tab UI, probably some other things
Diffstat (limited to 'main.qml')
-rw-r--r-- | main.qml | 20 |
1 files changed, 11 insertions, 9 deletions
@@ -27,18 +27,20 @@ ApplicationWindow { id: channel_tabs objectName: "channel_tabs" TabButton { - text: "a" + objectName: "channel-status" + text: "status" } - function add_channel(channel){ + function add_channel(channel) { var newTab = tabButton.createObject(channel_tabs, {"text": channel}) - channel_tabs.addItem(newTab) - var newChannel = Qt.createComponent("Page1.qml").createObject(swipeView, {"objectName": "channel"+channel}) - + channel_tabs.insertItem(channel_tabs.count, newTab) + var newChannel = Qt.createComponent("IrcChannel.qml").createObject(swipeView, {"objectName": "channel-"+channel}) + channel_tabs.currentIndex = channel_tabs.count-1 + for (var i = 0; i < newChannel.children.length; ++i) { + if (newChannel.children[i].objectName === "input") { + newChannel.children[i].focus = true + } + } } - - - } - } |