src/hbwidgets/sliders/hbzoomslider_p.cpp
changeset 21 4633027730f5
parent 3 11d3954df52a
child 28 b7da29130b0e
equal deleted inserted replaced
7:923ff622b8b9 21:4633027730f5
   127      // create element because HbSlider will not create element for NULL Icon
   127      // create element because HbSlider will not create element for NULL Icon
   128     // and zoom slider Icon is set in style
   128     // and zoom slider Icon is set in style
   129 
   129 
   130     if ( !elementItemMap.contains(HbSlider::IncreaseElement) ) {
   130     if ( !elementItemMap.contains(HbSlider::IncreaseElement) ) {
   131         elementItemMap[HbSlider::IncreaseElement].item = 
   131         elementItemMap[HbSlider::IncreaseElement].item = 
   132             q->style( )->createPrimitive( HbStyle::P_SliderElement_increase, q);
   132             HbStylePrivate::createPrimitive( HbStylePrivate::P_SliderElement_increase, q);
   133         HbStyle::setItemName( elementItemMap[HbSlider::IncreaseElement].item, "increment-icon" );
   133         HbStyle::setItemName( elementItemMap[HbSlider::IncreaseElement].item, "increment-icon" );
   134         elementItemMap[HbSlider::IncreaseElement].type= HbStyle::P_SliderElement_increase;
   134         elementItemMap[HbSlider::IncreaseElement].type= HbStylePrivate::P_SliderElement_increase;
   135         elementItemMap[HbSlider::IncreaseElement].touchItem = 
   135         elementItemMap[HbSlider::IncreaseElement].touchItem = 
   136             q->style( )->createPrimitive( HbStyle::P_SliderElement_touchincrease,q );
   136             HbStylePrivate::createPrimitive( HbStylePrivate::P_SliderElement_touchincrease,q );
   137         HbStyle::setItemName( elementItemMap[HbSlider::IncreaseElement].touchItem, "increment-icon-toucharea" );
   137         HbStyle::setItemName( elementItemMap[HbSlider::IncreaseElement].touchItem, "increment-icon-toucharea" );
   138     }
   138     }
   139 
   139 
   140     if ( !elementItemMap.contains(HbSlider::DecreaseElement) ) {
   140     if ( !elementItemMap.contains(HbSlider::DecreaseElement) ) {
   141         elementItemMap[HbSlider::DecreaseElement].item = 
   141         elementItemMap[HbSlider::DecreaseElement].item = 
   142             q->style( )->createPrimitive( HbStyle::P_SliderElement_decrease, q);
   142             HbStylePrivate::createPrimitive( HbStylePrivate::P_SliderElement_decrease, q);
   143         elementItemMap[HbSlider::DecreaseElement].type = HbStyle::P_SliderElement_decrease;
   143         elementItemMap[HbSlider::DecreaseElement].type = HbStylePrivate::P_SliderElement_decrease;
   144         HbStyle::setItemName( elementItemMap[HbSlider::DecreaseElement].item, "decrement-icon" );
   144         HbStyle::setItemName( elementItemMap[HbSlider::DecreaseElement].item, "decrement-icon" );
   145         elementItemMap[HbSlider::DecreaseElement].touchItem = q->style( )->createPrimitive( HbStyle::P_SliderElement_touchdecrease,q ) ;
   145         elementItemMap[HbSlider::DecreaseElement].touchItem = HbStylePrivate::createPrimitive( HbStylePrivate::P_SliderElement_touchdecrease,q ) ;
   146         HbStyle::setItemName( elementItemMap[HbSlider::DecreaseElement].touchItem, "decrement-icon-toucharea" );
   146         HbStyle::setItemName( elementItemMap[HbSlider::DecreaseElement].touchItem, "decrement-icon-toucharea" );
   147     }
   147     }
   148 
   148 
   149     HbStyleOptionSlider option;
   149     HbStyleOptionSlider option;
   150     q->initStyleOption( &option );
   150     q->initStyleOption( &option );
   151     option.sliderElementIcon = icons.value( HbSlider::IncreaseElement ); 
   151     option.sliderElementIcon = icons.value( HbSlider::IncreaseElement ); 
   152     q->style( )->updatePrimitive(elementItemMap[HbSlider::IncreaseElement].item ,HbStyle::P_SliderElement_increase,&option );
   152     HbStylePrivate::updatePrimitive(elementItemMap[HbSlider::IncreaseElement].item ,HbStylePrivate::P_SliderElement_increase,&option );
   153     option.sliderElementIcon = icons.value( HbSlider::DecreaseElement ); 
   153     option.sliderElementIcon = icons.value( HbSlider::DecreaseElement ); 
   154     q->style( )->updatePrimitive(elementItemMap[HbSlider::DecreaseElement].item ,HbStyle::P_SliderElement_decrease,&option );
   154     HbStylePrivate::updatePrimitive(elementItemMap[HbSlider::DecreaseElement].item ,HbStylePrivate::P_SliderElement_decrease,&option );
   155     q->setFlags( QGraphicsItem::ItemIsFocusable );
   155     q->setFlags( QGraphicsItem::ItemIsFocusable );
   156     q->connect( q, SIGNAL( textClicked( ) ), q, SLOT( _q_resetToDefault( ) ) );
   156     q->connect( q, SIGNAL( textClicked( ) ), q, SLOT( _q_resetToDefault( ) ) );
   157     q->setProperty("changeincrementState" ,false);
   157     q->setProperty("changeincrementState" ,false);
   158     q->setProperty("changedecrementState" ,false);
   158     q->setProperty("changedecrementState" ,false);
   159     q->setProperty("state", "normal");
   159     q->setProperty("state", "normal");