X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=examples%2Fstyling%2Fstyling-application.cpp;h=ff8875075f5dfa7ee681dd39b9334a22dc3b6f23;hb=a832af2813558a32f0a18747f3e6134ff6f6f301;hp=4a6c8ea21819d686a1fddf46e9038f6ad7d2737e;hpb=214f363041053a01ead590d0527dc6c08f7fe961;p=platform%2Fcore%2Fuifw%2Fdali-demo.git diff --git a/examples/styling/styling-application.cpp b/examples/styling/styling-application.cpp index 4a6c8ea..ff88750 100644 --- a/examples/styling/styling-application.cpp +++ b/examples/styling/styling-application.cpp @@ -24,7 +24,6 @@ // External includes #include -//#include #include #include "image-channel-control.h" #include @@ -177,7 +176,7 @@ void StylingApplication::Create( Application& application ) for( int i=0; i<3; ++i ) { std::ostringstream thumbnailName; thumbnailName << "thumbnail" << i+1; - ImageView image = ImageView::New( ResourceImage::New( images[i] ) ); + ImageView image = ImageView::New( images[i] ); image.SetName( thumbnailName.str() ); image.SetSize( DP(RADIO_LABEL_THUMBNAIL_SIZE), DP(RADIO_LABEL_THUMBNAIL_SIZE) ); @@ -212,7 +211,7 @@ void StylingApplication::Create( Application& application ) mIcc1.SetSizeScalePolicy( SizeScalePolicy::FIT_WITH_ASPECT_RATIO ); mIcc1.SetParentOrigin( ParentOrigin::CENTER ); mIcc1.SetVisibility( true ); - + mImagePlacement.Add( mIcc1 ); mIcc2 = ImageChannelControl::New( BIG_IMAGE_2 ); @@ -309,7 +308,7 @@ void StylingApplication::Create( Application& application ) } mResetButton = PushButton::New(); - mResetButton.SetLabelText( "Reset" ); + mResetButton.SetProperty( Toolkit::Button::Property::LABEL, "Reset" ); mResetButton.SetName("ResetButton"); mResetButton.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS ); mResetButton.ClickedSignal().Connect( this, &StylingApplication::OnResetClicked ); @@ -349,9 +348,9 @@ void StylingApplication::Create( Application& application ) mThemeButtons[i].ClickedSignal().Connect( this, &StylingApplication::OnThemeButtonClicked ); themeButtonLayout.AddChild( mThemeButtons[i], TableView::CellPosition( 0, 1+i ) ); } - mThemeButtons[0].SetLabelText( "Lite" ); // Lightweight changes on top of Dali - mThemeButtons[1].SetLabelText( "App1" ); // Different application style - mThemeButtons[2].SetLabelText( "App2" ); + mThemeButtons[0].SetProperty( Toolkit::Button::Property::LABEL, "Lite" ); // Lightweight changes on top of Dali + mThemeButtons[1].SetProperty( Toolkit::Button::Property::LABEL, "App1" ); // Different application style + mThemeButtons[2].SetProperty( Toolkit::Button::Property::LABEL, "App2" ); contentLayout.Add( themeButtonLayout ); } @@ -438,7 +437,7 @@ Popup StylingApplication::CreateResetPopup() PushButton okayButton = PushButton::New(); okayButton.SetName( POPUP_CONTROL_OK_NAME ); okayButton.SetStyleName( POPUP_CONTROL_OK_NAME ); - okayButton.SetLabelText( "Ok!" ); + okayButton.SetProperty( Toolkit::Button::Property::LABEL, "Ok!" ); okayButton.ClickedSignal().Connect( this, &StylingApplication::OnReset ); okayButton.SetParentOrigin( ParentOrigin::CENTER ); okayButton.SetAnchorPoint( AnchorPoint::CENTER ); @@ -448,7 +447,7 @@ Popup StylingApplication::CreateResetPopup() PushButton cancelButton = PushButton::New(); cancelButton.SetName( POPUP_CONTROL_CANCEL_NAME ); cancelButton.SetStyleName( POPUP_CONTROL_CANCEL_NAME ); - cancelButton.SetLabelText( "Cancel" ); + cancelButton.SetProperty( Toolkit::Button::Property::LABEL, "Cancel" ); cancelButton.ClickedSignal().Connect( this, &StylingApplication::OnResetCancelled ); cancelButton.SetParentOrigin( ParentOrigin::CENTER ); cancelButton.SetAnchorPoint( AnchorPoint::CENTER ); @@ -484,20 +483,20 @@ bool StylingApplication::OnButtonStateChange( Button button ) // Todo: save / restore slider states per image - if( button.GetProperty( Toolkit::Button::Property::SELECTED ).Get() ) + if( button.GetProperty(Button::Property::SELECTED) ) { ImageChannelControl prevIcc = mImageChannelControl; - if( mRadioButtons[0].GetProperty( Toolkit::Button::Property::SELECTED ).Get() ) + if( mRadioButtons[0].GetProperty(Button::Property::SELECTED) ) { mImageChannelControl = mIcc1; } - else if( mRadioButtons[1].GetProperty( Toolkit::Button::Property::SELECTED ).Get() ) + else if( mRadioButtons[1].GetProperty(Button::Property::SELECTED) ) { mImageChannelControl = mIcc2; } - else if( mRadioButtons[2].GetProperty( Toolkit::Button::Property::SELECTED ).Get() ) + else if( mRadioButtons[2].GetProperty(Button::Property::SELECTED) ) { mImageChannelControl = mIcc3; } @@ -523,7 +522,7 @@ bool StylingApplication::OnCheckButtonChange( Button button ) { int channel = button.GetProperty( index ); float value = mChannelSliders[channel].GetProperty( Slider::Property::VALUE ); - if( !button.IsSelected() ) + if( !button.GetProperty(Button::Property::SELECTED) ) { // "Turn off" the channel's contribution value = 0.0f; @@ -600,7 +599,7 @@ bool StylingApplication::OnSliderChanged( Slider slider, float value ) if( index != Property::INVALID_INDEX ) { int channel = slider.GetProperty( index ); - if( mCheckButtons[channel].IsSelected() ) + if( mCheckButtons[channel].GetProperty(Button::Property::SELECTED) ) { Property::Index channelIndex = GetChannelProperty( channel ); mImageChannelControl.SetProperty(channelIndex, value/100.0f);