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=e58f1c5c7a61f72fa2b05fba47550f5334b4f1c6;hb=1d82abb8a1a514ce0af63004706135fb7883f89b;hpb=306d2f61a1b64179e801fa8a0bb2bd7b4e9dd682 diff --git a/dali-toolkit/public-api/controls/buttons/radio-button.cpp b/dali-toolkit/public-api/controls/buttons/radio-button.cpp index e58f1c5..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) 2014 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) +: 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::operator=(RadioButton&& rhs) = default; RadioButton::RadioButton(Dali::Internal::CustomActor* internal) - : Button(internal) +: Button(internal) { - VerifyCustomActorPointer( internal ); + VerifyCustomActorPointer(internal); } RadioButton::~RadioButton() @@ -71,50 +63,13 @@ RadioButton 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 = Internal::RadioButton::New(); - radioButton.SetLabel(label); + radioButton.SetProperty(Toolkit::Button::Property::LABEL, label); return radioButton; } RadioButton RadioButton::DownCast(BaseHandle handle) { - return Control::DownCast( handle ); -} - -void RadioButton::SetLabel(const std::string& label) -{ - Dali::Toolkit::GetImplementation(*this).SetLabel(label); -} - -void RadioButton::SetLabel(Actor label) -{ - Dali::Toolkit::GetImplementation(*this).SetLabel(label); -} - -Actor RadioButton::GetLabel() const -{ - return Dali::Toolkit::GetImplementation(*this).GetLabel(); -} - -void RadioButton::SetSelected(bool selected) -{ - Dali::Toolkit::GetImplementation(*this).SetSelected(selected); -} - -bool RadioButton::IsSelected()const -{ - return Dali::Toolkit::GetImplementation(*this).IsSelected(); -} - -void RadioButton::ToggleState() -{ - Dali::Toolkit::GetImplementation(*this).ToggleState(); + return Control::DownCast(handle); } } // namespace Toolkit