summaryrefstree
path: root/usr/bin/qml/Reminder/HMIDateItem.qml
blob: f6a7fb57e36679bfd70255aebd786d33bd9acaf3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
/*
*   Copyright (C) 2013 by Neusoft
*   Author : Wang Qi <qi.wang-neu@neusoft.com>
*
*/

/**
 * A Date Item in HMICalendar with optional solarDate label,lunarDate label and icon .
 */

import QtQuick 2.0
//import QtQuick.Controls 1.1
import "../com/neusoft/auto/widgets"
import "coordinate.js" as CONFIG

HMIMouseArea{
    property double expanctnum: 1.25
    id: dateItem                //button
    width: 120                //dateImg.width
    height: 110                   //dateImg.height

//    /**
//     * type:int
//     * This property is index of the dateItem
//     */
//    property var index
    property alias datebuttonpressed: dateItem.pressed
    property alias hasEvt: hasEvtImg.visible
	property alias isInShowingMon: dateIcon.visible
    /**
     * type:bool
     * This property holds if the soalrDate/lunarDate label for dateItem will be displayed or not.
     */
    property alias solarLabel: solarDateLabel.visible
    property alias lunarLable: lunarDateLabel.visible
    property alias lunarLable2: lunarDateLabel2.visible		//ADD FOR DOUBLE LUNAR TEXT 20170720
    /**
     * type:string
     * This property holds the text label for the dateItem.
     */
    property alias solarlabelText: solarDateLabel.text
    property alias lunarlabelText: lunarDateLabel.text
    property alias lunarlabelText2: lunarDateLabel2.text		//ADD FOR DOUBLE LUNAR TEXT 20170720
    /**
     * type:color
     * This property holds the the color of text label for dateItem.
     */
    property alias solarLabelColor: solarDateLabel.color
    property alias lunarLabelColor: lunarDateLabel.color
    property alias lunarLabel2Color: lunarDateLabel2.color		//ADD FOR DOUBLE LUNAR TEXT 20170720
    /**
     * type:real
     * This property holds the font.pointsize of text label for the dateItem.
     */
    property alias solarLabelSize: solarDateLabel.font.pixelSize
    property alias lunarLabelSize: lunarDateLabel.font.pixelSize
    property alias lunarLabelSize2: lunarDateLabel2.font.pixelSize		//ADD FOR DOUBLE LUNAR TEXT 20170720

    property alias solarLabelPixelSize : solarDateLabel.font.pixelSize
    property alias lunarLabelPixelSize : lunarDateLabel.font.pixelSize
    /**
     * type:bool
     * This property holds whether the font weight of the text label for the dateItem is bold.
     */
    property alias solarLabelBold: solarDateLabel.font.bold
    property alias lunarLabelBold: lunarDateLabel.font.bold
    /**
     * type:string
     * This property holds the source url for the dateItem's background image.
     *
     * The default value is an empty url, which displays no background image.
     */
    property alias solarLabelStyle:     solarDateLabel.font.family
    property alias luanrLabelStyle:     lunarDateLabel.font.family
    property alias itemImg: dateImg.source           //buttonImg.source
    /**
     * type:string
     *
     * This property holds the source url for the dateItem's icon.
     * It can be any image from any protocol supported by the Image element
     *
     * The default value is an empty url, which displays no icon.
     */
    property alias itemIcon: dateImg.source

    property alias dateItemImgOpacity: dateImg.opacity

    property string bgImageStyle: systemCtrl.style

    /**
     * type:bool wsl 2015.12.29
     * This property holds if the soalrDate/lunarDate label for bBeep = true or bBeep = false.
     */
    property alias isBeep: dateItem.bBeep


	Item {
        id: dateIcon        //buttonImg
        x: 0
        y: 0
        width:120
        height: 110
        Image {
            id: dateImg
            anchors.fill: parent
        }
    }

    Item {
            id: hasEvtImg        //buttonImg
            x: 0
            y: 30
            width:98
            height: 20
            Image{
                anchors.fill: parent
                source: ""//CONFIG.HAS_EVT_IMG+bgImageStyle
            }
    }
	

    Column
    {
        id:dateLabelLayout

        width: parent.width
        anchors.centerIn: parent
//
        HMILabel
        {

            id: solarDateLabel
            width: parent.width
           // anchors.left: parent.left
           // anchors.right: parent.right
            wrapMode: Text.AlignHCenter
        }

        Item
        {
            id:item
            width: parent.width
            height: 1
        }

        HMILabel
        {
            id: lunarDateLabel
            width: parent.width
           // anchors.left: parent.left
            //anchors.right: parent.right
            wrapMode: Text.AlignHCenter
        }
    }
//ADD FOR DOUBLE LUNAR TEXT 20170720 START
    HMILabel
    {
        id: lunarDateLabel2
        width: parent.width
        height:20
        y:87
    }
//ADD FOR DOUBLE LUNAR TEXT 20170720 END
}