~josephjamesmills/+junk/americanFootball_api_stuff

« back to all changes in this revision

Viewing changes to Models/madden/FavTeamModel.qml

  • Committer: Joseph Mills
  • Date: 2013-12-15 15:25:28 UTC
  • Revision ID: josephjamesmills@gmail.com-20131215152528-vke40bcaabivhpm9
for dude to pull stuff out

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import QtQuick 2.0
 
2
import "../../Api/madden"
 
3
import QtQuick.Window 2.0
 
4
Rectangle {
 
5
    id:md
 
6
    width: Screen.width
 
7
    height: Screen.height
 
8
    color: "#22000000"
 
9
    property string namearoo: ""
 
10
 
 
11
    Behavior on color{ColorAnimation { duration: 800 }}
 
12
    Text {
 
13
        id: headerTxt
 
14
        text: qsTr("Please Pick A Team")
 
15
        styleColor:  "black"
 
16
        style: Text.Raised
 
17
        color: "white"
 
18
        font{
 
19
            bold: true
 
20
            italic: true
 
21
            family: "Arial Black"
 
22
            pixelSize: parent.height / 12
 
23
        }
 
24
    }
 
25
    ListView{
 
26
        width: parent.width
 
27
        height: parent.height
 
28
        orientation: ListView.Horizontal
 
29
        spacing: 20
 
30
        cacheBuffer: 1000
 
31
        contentHeight: 24
 
32
        contentWidth: 5
 
33
        anchors.top: headerTxt.bottom
 
34
        model: TeamsESPN{}
 
35
        delegate: Item {
 
36
            id: del
 
37
            property string c: teamColor
 
38
            width: md.width / 4
 
39
            height: md.height / 4
 
40
            Rectangle{
 
41
                width: md.width / 4
 
42
                height: md.height / 4
 
43
                color: "#50"+teamColor
 
44
                radius: 5
 
45
                border{
 
46
                    color: Qt.lighter("#22"+teamColor , 1.9)
 
47
                    width: 20
 
48
                }
 
49
                MouseArea{
 
50
                    anchors.fill: parent
 
51
                    hoverEnabled: true
 
52
                    onEntered:{
 
53
                        md.color = "#77"+teamColor;
 
54
                        md.namearoo = nickName
 
55
                    }
 
56
                    onExited:{
 
57
                        md.color = "#66"+teamColor;
 
58
                        md.namearoo  = ""
 
59
                    }
 
60
                }
 
61
                Image {
 
62
                    id: icons
 
63
                    source: "../../Artwork/teams/"+abbreviation+".png"  // "http://a1.espncdn.com/prod/assets/clubhouses/2010/nfl/bg_elements/teamlogos/"+abbreviation+".png"
 
64
                    anchors.centerIn: parent
 
65
                }
 
66
 
 
67
                Text {
 
68
                    id: nick
 
69
                    text: teamName
 
70
                    styleColor:  teamColor
 
71
                    style: Text.Raised
 
72
                    color: "white"
 
73
                    font{
 
74
                        bold: true
 
75
                        italic: true
 
76
                        family: "Arial Black"
 
77
                        pixelSize: parent.height / 4
 
78
                    }
 
79
                    anchors.horizontalCenter: parent.horizontalCenter
 
80
                    anchors.bottom: parent.bottom
 
81
                }
 
82
 
 
83
                Text {
 
84
                    text: location
 
85
                    styleColor:  teamColor
 
86
                    style: Text.Raised
 
87
                    color: "white"
 
88
                    font{
 
89
                        bold: true
 
90
                        italic: true
 
91
                        family: "Arial Black"
 
92
                        pixelSize: parent.height / 6
 
93
                    }
 
94
                    anchors.horizontalCenter: parent.horizontalCenter
 
95
                    anchors.top: parent.top
 
96
                }
 
97
            }
 
98
        }
 
99
    }
 
100
 
 
101
    Rectangle{
 
102
        width: md.width / 1.2
 
103
        height: md.height / 1.6
 
104
        color: Qt.darker(md.color,1.5)
 
105
        radius: 5
 
106
        border{
 
107
            color: Qt.lighter(md.color , 1.6)
 
108
            width: 10
 
109
        }
 
110
        anchors{
 
111
            horizontalCenter: parent.horizontalCenter
 
112
            bottom: parent.bottom
 
113
        }
 
114
//    ListView{
 
115
//        width: md.width / 1.2
 
116
//        height: md.height / 1.6
 
117
////        orientation: ListView.Horizontal
 
118
//        spacing: 20
 
119
//        cacheBuffer: 1000
 
120
//        contentHeight: 24
 
121
//        contentWidth: 5
 
122
//        model: TeamsESPN{}
 
123
// delegate: Item{
 
124
//     width: md.width / 1.2
 
125
//     height: md.height / 1.6
 
126
     Text {
 
127
         id: na
 
128
         text: md.namearoo
 
129
         styleColor:  md.color
 
130
         style: Text.Raised
 
131
         color: "white"
 
132
         font{
 
133
             bold: true
 
134
             italic: true
 
135
             family: "Arial Black"
 
136
             pixelSize: parent.height / 6
 
137
         }
 
138
         anchors{
 
139
              horizontalCenter: parent.horizontalCenter
 
140
              top: parent.top
 
141
     }
 
142
//     Behavior on text{NumberAnimation{duration: 800}}
 
143
 
 
144
 }
 
145
}
 
146
    }
 
147
 
 
148
 
 
149
 
 
150
 
 
151
//    }
 
152
//}