Advertisement
Guest User

Untitled

a guest
Jul 19th, 2018
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
QML 3.19 KB | None | 0 0
  1. import QtQuick 2.6
  2.  
  3. import wesual.Stage   1.0
  4. import wesual.Touch 1.0
  5.  
  6. Rectangle {
  7.     id : homeScreen
  8.  
  9.     implicitWidth  : parent.width
  10.     implicitHeight : parent.height
  11.  
  12.     Image {
  13.         id : logo
  14.  
  15.         anchors {
  16.             horizontalCenter : parent.horizontalCenter
  17.             top : parent.top
  18.             topMargin : 52
  19.         }
  20.  
  21.         visible : !keyboardOverlay.visible
  22.  
  23.         source : "ambuLogoSmall.png"
  24.     }
  25.  
  26.     Rectangle {
  27.         id : searchBar
  28.  
  29.         anchors {
  30.             horizontalCenter : parent.horizontalCenter
  31.             top : logo.bottom
  32.             topMargin : 35
  33.         }
  34.  
  35.         width  : 758
  36.         height : 72
  37.         radius : 10
  38.  
  39.         border.width : 2
  40.         border.color : "#afca0b"
  41.  
  42.         visible : !keyboardOverlay.visible
  43.         enabled : !keyboardOverlay.visible
  44.  
  45.         TapArea {
  46.             id : searchBarTapArea
  47.  
  48.             anchors.fill : parent
  49.             mouseEnabled : true
  50.  
  51.             onTap : {
  52.                 keyboardOverlay.visible = true;
  53.                 keyboardOverlay.enabled = true;
  54.             }
  55.         }
  56.  
  57.         Text {
  58.             id : searchInput
  59.  
  60.             anchors {
  61.                 left   : parent.left
  62.                 verticalCenter : parent.verticalCenter
  63.                 leftMargin : 25
  64.             }
  65.  
  66.             color  : "#706f6f"
  67.             width  : 640
  68.  
  69.             text : "Nach Namen suchen ..."
  70.  
  71.             font.pixelSize : 32
  72.             font.family : "Lucida Sans Unicode"
  73.         }
  74.  
  75.         Item {
  76.             id : searchBarButton
  77.  
  78.             anchors {
  79.                 left : searchInput.right
  80.                 right : parent.right
  81.                 top   : parent.top
  82.                 bottom : parent.bottom
  83.             }
  84.  
  85.             Image {
  86.                 id : searchBarIcon
  87.  
  88.                 anchors.centerIn : parent
  89.  
  90.                 source : "SearchThin.png"
  91.             }
  92.         }
  93.     }
  94.  
  95.     Text {
  96.         id : professionLabel
  97.  
  98.         anchors {
  99.             top : searchBar.bottom
  100.             horizontalCenter : parent.horizontalCenter
  101.             topMargin : 10
  102.         }
  103.  
  104.         color : "#706f6f"
  105.  
  106.         text : "Fachgebiete"
  107.         font.pixelSize : 60
  108.         font.family : "Lucida Sans Unicode"
  109.         font.capitalization: Font.AllUppercase
  110.     }
  111.  
  112.     HorizontalFlow {
  113.         id : professionFlow
  114.  
  115.         horizonalSpacing : 9
  116.         verticalSpacing : 85
  117.         horizontalAlignment : Qt.AlignHCenter
  118.  
  119.         anchors {
  120.             top : professionLabel.bottom
  121.             left : parent.left
  122.             right : parent.right
  123.             bottom : parent.bottom
  124.             topMargin   : 10
  125.             leftMargin  : 9
  126.             rightMargin : 9
  127.         }
  128.  
  129.         Repeater {
  130.             model : portrait_.professions
  131.             delegate : ProfessionDelegate {
  132.                 onTapped : {
  133.                     portrait_.activeProfession = portrait_.professions[index]
  134.                     portrait_.buildDocList();
  135.                 }
  136.             }
  137.         }
  138.     }
  139.  
  140.     VirtualKeyboardOverlay {
  141.         id : keyboardOverlay
  142.  
  143.         anchors.fill : parent
  144.         z : 10
  145.  
  146.         visible : false
  147.     }
  148. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement