]> git.tdb.fi Git - xinema.git/blobdiff - remote/qml/pages/ChannelSelect.qml
Move non-page qml components to a separate subdirectory
[xinema.git] / remote / qml / pages / ChannelSelect.qml
diff --git a/remote/qml/pages/ChannelSelect.qml b/remote/qml/pages/ChannelSelect.qml
deleted file mode 100644 (file)
index 43c6cf7..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-import QtQuick 2.0
-import Sailfish.Silica 1.0
-
-ValueButton
-{
-       id: channelSelect
-
-       property var channels: null
-       property int currentChannel: -1
-       property bool _channelsAvailable: channels && channels.length
-       enabled: _channelsAvailable
-
-       value: (_channelsAvailable ? currentChannel>=0 ? (currentChannel+1)+": "+channels[currentChannel] : "0: (off)" : "(not available)")
-
-       onClicked:
-       {
-               if(_channelsAvailable)
-                       pageStack.push(selectDialog);
-       }
-
-       Component
-       {
-               id: selectDialog
-
-               Page
-               {
-                       id: page
-
-                       function selectChannel(index)
-                       {
-                               channelSelect.currentChannel = index;
-                               pageStack.pop();
-                       }
-
-                       SilicaFlickable
-                       {
-                               width: parent.width
-                               contentHeight: column.height
-
-                               Column
-                               {
-                                       id: column
-                                       width: parent.width
-                                       spacing: Theme.paddingLarge
-
-                                       PageHeader
-                                       {
-                                               id: header
-                                               title: channelSelect.label
-                                       }
-
-                                       ChannelItem
-                                       {
-                                               channelIndex: 0
-                                               channelName: "(off)"
-                                               down: channelSelect.currentChannel+1==channelIndex
-
-                                               onClicked: page.selectChannel(channelIndex-1);
-                                       }
-                                       Repeater
-                                       {
-                                               id: repeater
-                                               model: channelSelect.channels
-
-                                               ChannelItem
-                                               {
-                                                       channelIndex: index+1
-                                                       channelName: modelData
-                                                       down: channelSelect.currentChannel+1==channelIndex
-
-                                                       onClicked: page.selectChannel(channelIndex-1);
-                                               }
-                                       }
-                               }
-                       }
-               }
-       }
-}