-//
-// Copyright (c) 2014 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Flora License, Version 1.0 (the License);
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://floralicense.org/license/
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an AS IS BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
#include <iostream>
{
public:
// PushButton Pressed
- typedef SignalV2< bool ( Button ) > PressedSignalV2;
+ typedef Signal< bool ( Button ) > PressedSignalType;
- PressedSignalV2& PressedSignal();
+ PressedSignalType& PressedSignal();
/**
* Default constructor.
/**
* @return the pressed signal.
*/
- Toolkit::TETButton::PressedSignalV2& PressedSignal();
+ Toolkit::TETButton::PressedSignalType& PressedSignal();
/**
* Callback called when an interrupt events is received.
*/
void OnButtonDown();
- Toolkit::TETButton::PressedSignalV2 mPressedSignal; ///< Signal emitted when the button is pressed.
+ Toolkit::TETButton::PressedSignalType mPressedSignal; ///< Signal emitted when the button is pressed.
};
} // namespace Internal
return Control::DownCast<TETButton, Internal::TETButton>(handle);
}
-TETButton::PressedSignalV2& TETButton::PressedSignal()
+TETButton::PressedSignalType& TETButton::PressedSignal()
{
TETButton button( *this );
DALI_ASSERT_ALWAYS( button );
return tetButton;
}
-Toolkit::TETButton::PressedSignalV2& TETButton::PressedSignal()
+Toolkit::TETButton::PressedSignalType& TETButton::PressedSignal()
{
return mPressedSignal;
}
DALI_TEST_EQUALS( "IMAGE_PATH_1", button.GetProperty( PushButton::PROPERTY_NORMAL_STATE_ACTOR ).GetValue( "image" ).GetValue( "filename" ).Get< std::string >(), TEST_LOCATION );
Property::Map map;
- map.push_back( Property::StringValuePair( "type", "ImageActor" ) );
+ map[ "type" ] = "ImageActor";
button.SetProperty( PushButton::PROPERTY_NORMAL_STATE_ACTOR, map );
DALI_TEST_EQUALS( "ImageActor", button.GetProperty( PushButton::PROPERTY_NORMAL_STATE_ACTOR ).GetValue( "type" ).Get< std::string >(), TEST_LOCATION );
DALI_TEST_EQUALS( "IMAGE_PATH_2", button.GetProperty( PushButton::PROPERTY_PRESSED_STATE_ACTOR ).GetValue( "image" ).GetValue( "filename" ).Get< std::string >(), TEST_LOCATION );
Property::Map map;
- map.push_back( Property::StringValuePair( "type", "Actor" ) );
+ map[ "type" ] = "Actor";
button.SetProperty( PushButton::PROPERTY_PRESSED_STATE_ACTOR, map );
DALI_TEST_EQUALS( "Actor", button.GetProperty( PushButton::PROPERTY_PRESSED_STATE_ACTOR ).GetValue( "type" ).Get< std::string >(), TEST_LOCATION );
DALI_TEST_EQUALS( "IMAGE_PATH_3", button.GetProperty( PushButton::PROPERTY_DIMMED_STATE_ACTOR ).GetValue( "image" ).GetValue( "filename" ).Get< std::string >(), TEST_LOCATION );
Property::Map map;
- map.push_back( Property::StringValuePair( "type", "Actor" ) );
+ map[ "type" ] = "Actor";
button.SetProperty( PushButton::PROPERTY_DIMMED_STATE_ACTOR, map );
DALI_TEST_EQUALS( "Actor", button.GetProperty( PushButton::PROPERTY_DIMMED_STATE_ACTOR ).GetValue( "type" ).Get< std::string >(), TEST_LOCATION );
DALI_TEST_EQUALS( "TextView", button.GetProperty( PushButton::PROPERTY_LABEL_ACTOR ).GetValue( "type" ).Get< std::string >(), TEST_LOCATION );
Property::Map map;
- map.push_back( Property::StringValuePair( "type", "Actor" ) );
+ map[ "type" ] = "Actor";
button.SetProperty( PushButton::PROPERTY_LABEL_ACTOR, map );
DALI_TEST_EQUALS( "Actor", button.GetProperty( PushButton::PROPERTY_LABEL_ACTOR ).GetValue( "type" ).Get< std::string >(), TEST_LOCATION );