equal
deleted
inserted
replaced
833 AknsUtils::RegisterControlPosition( this ); |
833 AknsUtils::RegisterControlPosition( this ); |
834 } |
834 } |
835 |
835 |
836 EXPORT_C TInt CAknIndicatorContainer::CountComponentControls() const |
836 EXPORT_C TInt CAknIndicatorContainer::CountComponentControls() const |
837 { |
837 { |
838 return (iIndicatorsShown); |
838 TInt n = CountShownIndicator(); |
|
839 //__ASSERT_DEBUG ( n == iIndicatorsShown, User::Panic(_L( "indicatorshow"),n ) ); |
|
840 return n; |
|
841 } |
|
842 |
|
843 TInt CAknIndicatorContainer::CountShownIndicator() const |
|
844 { |
|
845 TInt count = iIndicators->Count(); |
|
846 TInt indicatorShown = 0; |
|
847 for ( TInt i = 0; i< count; i++ ) |
|
848 { |
|
849 if( iIndicators->At(i)->IndicatorState() && iIndicators->At( i )->Priority() != KIndicatorNotShown ) |
|
850 { |
|
851 indicatorShown++; |
|
852 } |
|
853 } |
|
854 return indicatorShown; |
839 } |
855 } |
840 |
856 |
841 |
857 |
842 EXPORT_C CCoeControl* CAknIndicatorContainer::ComponentControl(TInt aIndex) const |
858 EXPORT_C CCoeControl* CAknIndicatorContainer::ComponentControl(TInt aIndex) const |
843 { |
859 { |
861 return NULL; |
877 return NULL; |
862 } |
878 } |
863 } |
879 } |
864 |
880 |
865 |
881 |
866 EXPORT_C void CAknIndicatorContainer::Draw( const TRect& /*aRect*/ ) const |
882 EXPORT_C void CAknIndicatorContainer::Draw( const TRect& aRect ) const |
867 { |
883 { |
868 if ( iExtension->iStatusPane && |
884 if ( iExtension->iStatusPane && |
869 iExtension->iStatusPane->IsTransparent() ) |
885 iExtension->iStatusPane->IsTransparent() ) |
870 { |
886 { |
|
887 CWindowGc& gc = SystemGc(); |
|
888 TRgb rgb(TRgb::Color16MA(0)); |
|
889 gc.SetDrawMode(CGraphicsContext::EDrawModeWriteAlpha); |
|
890 gc.SetBrushStyle(CGraphicsContext::ESolidBrush); |
|
891 gc.SetBrushColor(rgb); |
|
892 gc.Clear(aRect); |
871 return; |
893 return; |
872 } |
894 } |
873 |
895 |
874 // Don't allow normal background drawing if |
896 // Don't allow normal background drawing if |
875 // background is already drawn with a background drawer. |
897 // background is already drawn with a background drawer. |
1189 if (count < 2) |
1211 if (count < 2) |
1190 { |
1212 { |
1191 return; |
1213 return; |
1192 } |
1214 } |
1193 |
1215 |
1194 CAknIndicator* temp; |
1216 // Bubble sorted |
1195 for(TInt ii = 1; ii < count; ii++) |
1217 for (TInt i = 0; i < ( count - 1 ); i++) |
1196 { |
1218 { |
1197 temp = iIndicators->At(ii); |
1219 TBool swaped = EFalse; |
1198 TInt tempPriority = temp->Priority(); |
1220 for (TInt j = count - 1; j > i; j--) |
1199 if (tempPriority >= 0) |
1221 { |
1200 { |
1222 if ( iIndicators->At( j )->Priority() |
1201 for(TInt jj = 0; jj <= ii; jj++) |
1223 < iIndicators->At( j - 1 )->Priority() ) |
1202 { |
1224 { |
1203 if (tempPriority < iIndicators->At(jj)->Priority()) |
1225 CAknIndicator* temp = iIndicators->At( j ); |
1204 { |
1226 iIndicators->Delete( j ); |
1205 iIndicators->Delete( ii ); |
1227 CleanupStack::PushL( temp ); |
1206 CleanupStack::PushL( temp ); |
1228 iIndicators->InsertL( j - 1, temp ); |
1207 iIndicators->InsertL( jj, temp ); |
1229 CleanupStack::Pop( temp ); |
1208 CleanupStack::Pop( temp ); |
1230 swaped = ETrue; |
1209 break; |
1231 } |
1210 } |
1232 } |
1211 else if ( jj == (ii-1) ) |
1233 if( !swaped ) |
1212 { |
1234 { |
1213 break; |
1235 break; |
1214 } |
1236 } |
1215 } |
1237 } |
1216 } |
1238 |
1217 } |
|
1218 } |
1239 } |
1219 |
1240 |
1220 |
1241 |
1221 TInt CAknIndicatorContainer::TickerCallback(TAny* aThis) |
1242 TInt CAknIndicatorContainer::TickerCallback(TAny* aThis) |
1222 { |
1243 { |
2971 } |
2992 } |
2972 case 4: |
2993 case 4: |
2973 { |
2994 { |
2974 if ( extendedFlatLayout ) |
2995 if ( extendedFlatLayout ) |
2975 { |
2996 { |
2976 indicatorLayout = |
2997 showIndicator = EFalse; |
2977 AknLayoutScalable_Avkon::indicator_nsta_pane_cp_g4( 0 ); |
|
2978 } |
2998 } |
2979 else |
2999 else |
2980 { |
3000 { |
2981 indicatorLayout = |
3001 indicatorLayout = |
2982 AknLayoutScalable_Avkon::uni_indicator_pane_g4( 1 ); |
3002 AknLayoutScalable_Avkon::uni_indicator_pane_g4( 1 ); |
2985 } |
3005 } |
2986 case 5: |
3006 case 5: |
2987 { |
3007 { |
2988 if ( extendedFlatLayout ) |
3008 if ( extendedFlatLayout ) |
2989 { |
3009 { |
2990 indicatorLayout = |
3010 showIndicator = EFalse; |
2991 AknLayoutScalable_Avkon::indicator_nsta_pane_cp_g5( 0 ); |
|
2992 } |
3011 } |
2993 else |
3012 else |
2994 { |
3013 { |
2995 indicatorLayout = |
3014 indicatorLayout = |
2996 AknLayoutScalable_Avkon::uni_indicator_pane_g5( 1 ); |
3015 AknLayoutScalable_Avkon::uni_indicator_pane_g5( 1 ); |
2999 } |
3018 } |
3000 case 6: |
3019 case 6: |
3001 { |
3020 { |
3002 if ( extendedFlatLayout ) |
3021 if ( extendedFlatLayout ) |
3003 { |
3022 { |
3004 indicatorLayout = |
3023 showIndicator = EFalse; |
3005 AknLayoutScalable_Avkon::indicator_nsta_pane_cp_g6( 0 ); |
|
3006 } |
3024 } |
3007 else |
3025 else |
3008 { |
3026 { |
3009 indicatorLayout = |
3027 indicatorLayout = |
3010 AknLayoutScalable_Avkon::uni_indicator_pane_g6( 1 ); |
3028 AknLayoutScalable_Avkon::uni_indicator_pane_g6( 1 ); |