X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Fpublic-api%2Fcontrols%2Fbuttons%2Fradio-button.cpp;h=6030031cdffcc68a8b6ac2fac366bd12b3c9ceab;hp=b43523d79d269510113e5f5a071e9948297324e4;hb=1d82abb8a1a514ce0af63004706135fb7883f89b;hpb=68106e2cbb8541c18a77f39770ea7759f44e02a0 diff --git a/dali-toolkit/public-api/controls/buttons/radio-button.cpp b/dali-toolkit/public-api/controls/buttons/radio-button.cpp index b43523d..6030031 100644 --- a/dali-toolkit/public-api/controls/buttons/radio-button.cpp +++ b/dali-toolkit/public-api/controls/buttons/radio-button.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 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. @@ -25,38 +25,30 @@ namespace Dali { - namespace Toolkit { - RadioButton::RadioButton() - : Button() +: Button() { } -RadioButton::RadioButton( Internal::RadioButton& implementation ) - : Button( implementation ) +RadioButton::RadioButton(Internal::RadioButton& implementation) +: Button(implementation) { } -RadioButton::RadioButton( const RadioButton& radioButton ) - : Button( radioButton ) -{ -} +RadioButton::RadioButton(const RadioButton& radioButton) = default; -RadioButton& RadioButton::operator=( const RadioButton& radioButton ) -{ - if( &radioButton != this ) - { - Button::operator=( radioButton ); - } - return *this; -} +RadioButton::RadioButton(RadioButton&& rhs) = default; + +RadioButton& RadioButton::operator=(const RadioButton& radioButton) = default; -RadioButton::RadioButton( Dali::Internal::CustomActor* internal ) - : Button( internal ) +RadioButton& RadioButton::operator=(RadioButton&& rhs) = default; + +RadioButton::RadioButton(Dali::Internal::CustomActor* internal) +: Button(internal) { - VerifyCustomActorPointer( internal ); + VerifyCustomActorPointer(internal); } RadioButton::~RadioButton() @@ -68,23 +60,16 @@ RadioButton RadioButton::New() return Internal::RadioButton::New(); } -RadioButton RadioButton::New( const std::string& label ) -{ - RadioButton radioButton = Internal::RadioButton::New(); - radioButton.SetLabel( label ); - return radioButton; -} - -RadioButton RadioButton::New( Actor label ) +RadioButton RadioButton::New(const std::string& label) { RadioButton radioButton = Internal::RadioButton::New(); - radioButton.SetLabel( label ); + radioButton.SetProperty(Toolkit::Button::Property::LABEL, label); return radioButton; } -RadioButton RadioButton::DownCast( BaseHandle handle ) +RadioButton RadioButton::DownCast(BaseHandle handle) { - return Control::DownCast( handle ); + return Control::DownCast(handle); } } // namespace Toolkit