Subversion Repositories SmartDukaan

Rev

Rev 323 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 323 Rev 346
Line 1... Line 1...
1
if vars().has_key('expSlide'):
1
if vars().has_key('expSlide'):
2
    print "expSlide=" + `expSlide`
2
    print "expSlide=" + `expSlide`
3
 
3
 
4
# Pick 2G and 3G Feature objects
4
# Pick 2G and 3G Feature objects
-
 
5
threeGFeature = None
-
 
6
v3Ghours = None
5
expandedFeatures = expSlide.getExpandedFeatures()
7
expandedFeatures = expSlide.getExpandedFeatures()
6
for expandedFeature in expandedFeatures:
8
for expandedFeature in expandedFeatures:
7
    label = expandedFeature.getFeatureDefinition().getLabel()
9
    label = expandedFeature.getFeatureDefinition().getLabel()
8
    if label == "2G":
10
    if label == "2G":
9
        twoGFeature = expandedFeature
11
        twoGFeature = expandedFeature
Line 19... Line 21...
19
v2Gparts = v2G.split()
21
v2Gparts = v2G.split()
20
 
22
 
21
# Take only hours
23
# Take only hours
22
v2Ghours = int(v2Gparts[0])
24
v2Ghours = int(v2Gparts[0])
23
print "v2Ghours=" + `v2Ghours`
25
print "v2Ghours=" + `v2Ghours`
24
        
-
 
25
threeGBullets = threeGFeature.getExpandedBullets()
-
 
26
 
26
 
27
# Is a single-value field
27
if threeGFeature is not None:        
28
threeGBullet = threeGBullets[0]
28
    threeGBullets = threeGFeature.getExpandedBullets()
29
v3G = threeGBullet.getValue()
-
 
30
print "v3G=" + `v3G`
-
 
31
v3Gparts = v3G.split()
-
 
32
 
29
 
-
 
30
    # Is a single-value field
-
 
31
    threeGBullet = threeGBullets[0]
-
 
32
    v3G = threeGBullet.getValue()
-
 
33
    print "v3G=" + `v3G`
-
 
34
    v3Gparts = v3G.split()
-
 
35
 
33
# Take only hours
36
    # Take only hours
34
v3Ghours = int(v3Gparts[0])
37
    v3Ghours = int(v3Gparts[0])
35
print "v3Ghours=" + `v3Ghours`
38
    print "v3Ghours=" + `v3Ghours`
36
 
39
 
37
# Rough values
40
# Rough values
38
# 2G High > 10, Medium > 5 else Low
41
# 2G High > 10, Medium > 5 else Low
39
# 3G High > 5, Medium > 3 else Low
42
# 3G High > 5, Medium > 3 else Low
40
 
43