summaryrefstree
path: root/usr/bin/qml/Reminder/Reminder_EvtDetail.qml
blob: d670881ab4d3736f10816d3ad13de41a96e8dc4f (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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
import QtQuick 2.0

import "../com/neusoft/auto/widgets"
import "coordinate.js" as CONFIG
import "../windowsList.js" as WindowsList
import "../layoutList.js" as Layout
import Label 2.0



HMIWindow {
    id:reminder_root

    Component.onCompleted:
    {
        console.log("***********************************reminder_root onCompleted***********************************")
        windowID = WindowsList.RMD_EVT_DETAIL
    }

    onVisibleChanged:
    {
        bMainWindow = false;
    }

    onMaxWindow :{
        console.log("***********************************onMaxWindow***********************************")
        reminderCtrl.isEvtDetailPageFulSrc = bMaxWindow;
    }

    onMinWindow :{
        console.log("***********************************onMinWindow***********************************")
        reminderCtrl.isEvtDetailPageFulSrc = bMaxWindow;
    }

    Item
    {
        id: reminder_window
        width: 740
        height: 760
        onVisibleChanged:
        {
            if(visible)
            {
                console.log("[HMIReminder_EvtDetail][reminder_root][onVisibleChanged]-->" + visible)
            }
            else
            {
                reminderCtrl.isEvtDetailPageFulSrc = false;
                console.log("[HMIReminder_EvtDetail][reminder_root][onVisibleChanged]-->" + visible)
            }
        }
        Component.onCompleted:
        {
            console.log("[HMIReminder_EvtDetail][reminder_root][Component.onCompleted]-->" + Qt.formatTime(new Date(), "ss:zzz"))
        }
    }


    Image
    {
        id:evtTitleBg
        visible: true
        x:14-CONFIG.HMIWINDOW_LAY_XY[0]
        y:150-CONFIG.HMIWINDOW_LAY_XY[1]
        width: 700
        height: 40
        HMILabel
        {
            id: evtTitleLable
            anchors.fill: parent
            anchors.leftMargin: 20
            horizontalAlignment: Label.AlignLeft
            verticalAlignment: Label.AlignTop
            font.pixelSize: CONFIG.REMINDER_LABEL_FONT_SIZE
            text:mEvtManage.selEvtTitleInEvtListOfShowing
            color:CONFIG.REMINDER_BTN_LABEL_FONT_COLOR
        }
    }

    Image
    {
        id:evtContentBg
        visible: true
        x:14-CONFIG.HMIWINDOW_LAY_XY[0]
        y:190-CONFIG.HMIWINDOW_LAY_XY[1]
        width: 700
        height: reminderCtrl.isEvtDetailPageFulSrc?630:246
        source: reminderCtrl.isEvtDetailPageFulSrc?"qrc:MATERIAL/MATERIAL_M8X_POPUP_BK_524"+ bgImageStyle:"qrc:MATERIAL/MATERIAL_M8X_POPUP_BK_254"+ bgImageStyle
        HMILabel
        {
            id: evtContentLable
            anchors.fill: parent
            anchors.leftMargin: 20
            anchors.topMargin: 10
            horizontalAlignment: Label.AlignLeft
            verticalAlignment: Label.AlignTop
            font.pixelSize: CONFIG.REMINDER_BTN_FONT_SIZE
            text:mEvtManage.selEvtContentInEvtListOfShowing
            color:CONFIG.REMINDER_BTN_LABEL_FONT_COLOR
        }
    }


    Item
    {
        id:toolBoxBg
        x: CONFIG.TOOL_BOX_LAY_XY[0]-CONFIG.HMIWINDOW_LAY_XY[0]
        y: reminderCtrl.isEvtDetailPageFulSrc?(CONFIG.TOOL_BOX_LAY_XY[2]-CONFIG.HMIWINDOW_LAY_XY[1]):(CONFIG.TOOL_BOX_LAY_XY[1]-CONFIG.HMIWINDOW_LAY_XY[1])
        width: CONFIG.TOOL_BOX_WIDTH
        height: CONFIG.TOOL_BOX_HEIGTH

        HMIButton
        {
            id: btnEdit
            x:CONFIG.ONE_BTN_LAY_XY[0]
            y:CONFIG.ONE_BTN_LAY_XY[1]
            btnImg: btnEdit.pressed ? "qrc:MATERIAL/MATERIAL_M8X_FUNCTION_BUTTON_3_P"+ bgImageStyle : "qrc:MATERIAL/MATERIAL_M8X_FUNCTION_BUTTON_3"+ bgImageStyle

            HMILabel
            {
                id: editLable
                anchors.fill: parent
                anchors.horizontalCenter: parent.horizontalCenter
                anchors.verticalCenter: parent.verticalCenter
                font.pixelSize: CONFIG.REMINDER_BTN_FONT_SIZE
                text:qsTr("edit") + systemCtrl.emptyString
                color:CONFIG.REMINDER_BTN_LABEL_FONT_COLOR
            }

            onClicked:
            {
                console.log("[HMIReminder_EvtDetail][btnEdit][onClicked]")
                if(mEvtManage.GetCntOfEvtListOfSelectedDate() > 0)
                {
                    mEvtManage.is_newEvtQMLOperIsAdd_notEdit = false;
                    ScreenManager.changeForm(Layout.FM_OPEN,WindowsList.RMD_NEW_EVT)
                }

            }
        }

        HMIButton
        {
            id: btnDel
            x: CONFIG.TWO_BTN_LAY_XY[0]
            y: CONFIG.TWO_BTN_LAY_XY[1]
            btnImg: btnDel.pressed ? "qrc:MATERIAL/MATERIAL_M8X_FUNCTION_BUTTON_3_P"+ bgImageStyle : "qrc:MATERIAL/MATERIAL_M8X_FUNCTION_BUTTON_3"+ bgImageStyle


            HMILabel
            {
                id: delLable
                width: parent.width
                height: parent.height
                anchors.horizontalCenter: parent.horizontalCenter
                anchors.verticalCenter: parent.verticalCenter
                font.pixelSize: CONFIG.REMINDER_BTN_FONT_SIZE
                text:qsTr("delete") + systemCtrl.emptyString
                color:CONFIG.REMINDER_BTN_LABEL_FONT_COLOR
            }

            onClicked:
            {
                console.log("[HMIReminder_EvtDetail][btnDel][onClicked]")
                if(mEvtManage.GetCntOfEvtListOfSelectedDate() > 0)
                {
                    mEvtManage.delEvtFromDB(mEvtManage.getSelEvtInEvtListOfShowingMonth())
                    ScreenManager.changeForm(Layout.FM_OPEN,WindowsList.RMD_MAIN)
                }
            }
        }

    }

}