Advertisement
Guest User

Untitled

a guest
Aug 24th, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
QML 1.56 KB | None | 0 0
  1. import QtQuick 2.0
  2. import QuickFlux 1.0
  3. import Sailfish.Silica 1.0
  4. import "../../actions"
  5. import "../../stores"
  6.  
  7. Item {
  8.  
  9.     property string textForLabel
  10.  
  11.     property date eventDate
  12.  
  13.     height: Theme.itemSizeSmall
  14.  
  15.     Label {
  16.         id: textLabel
  17.         anchors {
  18.             top: parent.top
  19.             bottom: parent.bottom
  20.             left: parent.left
  21.             margins: Theme.paddingLarge
  22.         }
  23.         text: textForLabel
  24.         verticalAlignment: Text.AlignVCenter
  25.     }
  26.  
  27.     Label {
  28.         id: timeEventLabel
  29.         anchors {
  30.             top: parent.top
  31.             bottom: parent.bottom
  32.             left: textLabel.right
  33.             margins: Theme.paddingLarge
  34.         }
  35.         text: Qt.formatDateTime(eventDate, "hh:mm")
  36.         verticalAlignment: Text.AlignVCenter
  37.         color: Theme.highlightColor
  38.  
  39.         MouseArea {
  40.             anchors.fill: parent
  41.             onClicked: {
  42.                 AppActions.changeTimeEvent(eventDate, textForLabel);
  43.             }
  44.         }
  45.     }
  46.  
  47.     Label {
  48.         id: dateEventLabel
  49.         anchors {
  50.             top: parent.top
  51.             bottom: parent.bottom
  52.             left: timeEventLabel.right
  53.             margins: Theme.paddingLarge
  54.         }
  55.         text: Qt.formatDateTime(eventDate, "dd.MM.yyyy")
  56.         verticalAlignment: Text.AlignVCenter
  57.         color: Theme.highlightColor
  58.  
  59.         MouseArea {
  60.             anchors.fill: parent
  61.             onClicked: {
  62.                 AppActions.changeDateEvent(eventDate, textForLabel);
  63.             }
  64.         }
  65.     }
  66. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement