Advertisement
Guest User

Untitled

a guest
Aug 24th, 2016
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
QML 2.07 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. import "../components"
  7.  
  8. Page {
  9.  
  10.     SilicaFlickable {
  11.         contentHeight: column.height
  12.         anchors.fill: parent
  13.  
  14.         PullDownMenu {
  15.             MenuItem {
  16.                 text: qsTr("Save")
  17.                 onClicked: AppActions.addNewEvent(start.startDate, finish.finishDate, eventName.text)
  18.             }
  19.         }
  20.  
  21.         VerticalScrollDecorator {}
  22.  
  23.         Column {
  24.             id: column
  25.             spacing: Theme.paddingLarge
  26.             width: parent.width
  27.             PageHeader { title: qsTr("New Event") }
  28.  
  29.             VerticalScrollDecorator {}
  30.  
  31.             TextField {
  32.                 id: eventName
  33.                 width: parent.width
  34.                 placeholderText: qsTr("Enter the name of the event")
  35.                 anchors {
  36.                     left: parent.left
  37.                     right: parent.right
  38.                 }
  39.                 EnterKey.onClicked: {
  40.                     parent.focus = true;
  41.                 }
  42.             }
  43.  
  44.             DateLabelComponent {
  45.                 id: start
  46.                 textForLabel: qsTr("Start")
  47.                 eventDate: InformationAboutEvent.startDateEvent
  48.                 anchors {
  49.                     left: parent.left
  50.                     right: parent.right
  51.                 }
  52.             }
  53.  
  54.             DateLabelComponent {
  55.                 id: finish
  56.                 textForLabel: qsTr("Finish")
  57.                 eventDate: InformationAboutEvent.finishDateEvent
  58.                 anchors {
  59.                     left: parent.left
  60.                     right: parent.right
  61.                 }
  62.             }
  63.  
  64.             Button {
  65.                 anchors {
  66.                     left: parent.left
  67.                     right: parent.right
  68.                     margins: Theme.paddingLarge
  69.                 }
  70.                 text: qsTr("Save")
  71.                 onClicked: AppActions.addNewEvent(start.eventDate, finish.eventDate, eventName.text);
  72.             }
  73.         }
  74.     }
  75. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement