99 } |
99 } |
100 break; |
100 break; |
101 case Qt::DisplayRole: |
101 case Qt::DisplayRole: |
102 { |
102 { |
103 QStringList displayText; |
103 QStringList displayText; |
104 QStringList adressDetail = mProxyModel->data(proxyModelIndex,Qt::DisplayRole).toStringList(); |
104 QStringList adressDetail = mProxyModel->data(proxyModelIndex,Qt::DisplayRole). |
|
105 toStringList(); |
105 QString displayString; |
106 QString displayString; |
106 if(!adressDetail[0].isEmpty()) |
107 if(!adressDetail[0].isEmpty()) |
107 { |
108 { |
108 displayString = adressDetail[0]+KSeparator+KSpace+adressDetail[1]; |
109 displayString = adressDetail[0]+KSpace+KTitleSeparator+KSpace+ |
|
110 adressDetail[1]+KSpace+KSeparator+adressDetail[2]; |
|
111 } |
|
112 else if (!adressDetail[1].isEmpty()) |
|
113 { |
|
114 displayString = adressDetail[1]+KSpace+KSeparator+adressDetail[2]; |
109 } |
115 } |
110 else |
116 else |
111 { |
117 { |
112 displayString = adressDetail[1]; |
118 displayString = adressDetail[2]; |
113 } |
119 } |
114 QString text(""); |
120 QString text(""); |
115 displayText <<displayString<<text; |
121 displayText <<displayString<<text; |
116 returnValue = displayText; |
122 returnValue = displayText; |
117 break; |
123 break; |
133 QBrush brush(Qt::black,Qt::SolidPattern); |
139 QBrush brush(Qt::black,Qt::SolidPattern); |
134 QPainter painter; |
140 QPainter painter; |
135 painter.begin(&mapPixmap); |
141 painter.begin(&mapPixmap); |
136 HbIcon adressTypeIcon(adressType); |
142 HbIcon adressTypeIcon(adressType); |
137 //draw the adressType Icon over mapTile Icon |
143 //draw the adressType Icon over mapTile Icon |
138 adressTypeIcon.paint(&painter,QRectF((mapPixmap.width()-adressTypeIcon.width()),0,adressTypeIcon.width(),adressTypeIcon.height())); |
144 adressTypeIcon.paint(&painter,QRectF((mapPixmap.width()-adressTypeIcon.width()), |
|
145 0,adressTypeIcon.width(),adressTypeIcon.height())); |
139 painter.fillRect(QRect(0,0,mapWidth,MAPSTROKE),brush); |
146 painter.fillRect(QRect(0,0,mapWidth,MAPSTROKE),brush); |
140 painter.fillRect(QRect(0,mapHeight-MAPSTROKE,mapWidth,(mapHeight-MAPSTROKE)),brush); |
147 painter.fillRect(QRect(0,mapHeight-MAPSTROKE,mapWidth, |
|
148 (mapHeight-MAPSTROKE)),brush); |
141 painter.fillRect(QRect(0,0,MAPSTROKE,mapPixmap.height()),brush); |
149 painter.fillRect(QRect(0,0,MAPSTROKE,mapPixmap.height()),brush); |
142 painter.fillRect(QRect((mapWidth-MAPSTROKE),0,mapWidth,mapHeight),brush); |
150 painter.fillRect(QRect((mapWidth-MAPSTROKE),0,mapWidth,mapHeight),brush); |
143 painter.end(); |
151 painter.end(); |
144 QIcon landscape( mapPixmap ); |
152 QIcon landscape( mapPixmap ); |
145 HbIcon landscapeIcon(landscape); |
153 HbIcon landscapeIcon(landscape); |