~pkunal-parmar/ubuntu-calendar-app/Minor-Performance

400.1.1 by mihirsoni-123
Added copyright header comments in all the pages
1
/*
400.1.2 by mihirsoni-123
updated copyright year
2
 * Copyright (C) 2013-2014 Canonical Ltd
400.1.1 by mihirsoni-123
Added copyright header comments in all the pages
3
 *
4
 * This file is part of Ubuntu Calendar App
5
 *
6
 * Ubuntu Calendar App is free software: you can redistribute it and/or modify
7
 * it under the terms of the GNU General Public License version 3 as
8
 * published by the Free Software Foundation.
9
 *
10
 * Ubuntu Calendar App is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 * GNU General Public License for more details.
14
 *
15
 * You should have received a copy of the GNU General Public License
16
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
 */
455.4.3 by Nekhelesh Ramananthan
Tweaked TimeLineHeader.qml
18
19
import QtQuick 2.3
422.5.1 by Akiva Avraham
Upgraded component library imports
20
import Ubuntu.Components 1.1
191.4.1 by Kunal Parmar
Applying changes
21
import "ViewType.js" as ViewType
96.2.1 by Kunal Parmar
initial version
22
114.2.1 by Kunal Parmar
dayview weekview transition added
23
PathViewBase {
24
    id: header
96.2.1 by Kunal Parmar
initial version
25
191.4.1 by Kunal Parmar
Applying changes
26
    property int type: ViewType.ViewTypeWeek
114.2.1 by Kunal Parmar
dayview weekview transition added
27
28
    interactive: false
29
    model:3
30
455.4.3 by Nekhelesh Ramananthan
Tweaked TimeLineHeader.qml
31
    height: units.gu(4)
96.2.1 by Kunal Parmar
initial version
32
    width: parent.width
96.2.2 by Kunal Parmar
final weekview and dayview
33
114.2.1 by Kunal Parmar
dayview weekview transition added
34
    property var date;
489.2.1 by Kunal Parmar
Dayview like iOS
35
    property var currentDay;
114.2.1 by Kunal Parmar
dayview weekview transition added
36
221.2.1 by Jason Gerlowski
Clicking on a day in 'Week' tab brings up that day in 'Day' tab
37
    signal dateSelected(var date);
38
114.2.1 by Kunal Parmar
dayview weekview transition added
39
    delegate: TimeLineHeaderComponent{
114.2.3 by Kunal Parmar
dayview header changed
40
        type: header.type
41
42
        isCurrentItem: index == header.currentIndex
489.2.1 by Kunal Parmar
Dayview like iOS
43
        currentDay: header.currentDay
44
45
        width: parent.width
46
47
        startDay: date.addDays(7*header.indexType(index))
114.2.1 by Kunal Parmar
dayview weekview transition added
48
221.2.1 by Jason Gerlowski
Clicking on a day in 'Week' tab brings up that day in 'Day' tab
49
        onDateSelected: {
50
            header.dateSelected(date);
51
        }
96.2.1 by Kunal Parmar
initial version
52
    }
53
}
96.2.2 by Kunal Parmar
final weekview and dayview
54