X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=wt%2Fbbtk_wt_PKG%2Fsrc%2FbbwtRadioButton.cxx~;fp=wt%2Fbbtk_wt_PKG%2Fsrc%2FbbwtRadioButton.cxx~;h=0000000000000000000000000000000000000000;hb=5bdd6bc07e285c2dc485dd053aaee47356d8689b;hp=1361752eca508465b46eaa7c8060859c903e1532;hpb=430578713a572cd83e04ca0f65c6e34e87879cd6;p=creaWT.git diff --git a/wt/bbtk_wt_PKG/src/bbwtRadioButton.cxx~ b/wt/bbtk_wt_PKG/src/bbwtRadioButton.cxx~ deleted file mode 100644 index 1361752..0000000 --- a/wt/bbtk_wt_PKG/src/bbwtRadioButton.cxx~ +++ /dev/null @@ -1,184 +0,0 @@ -//===== -// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost) -//===== -#include "bbwtRadioButton.h" -#include "bbwtPackage.h" -#include - -namespace bbwt -{ - - class RadioButtonWidget : public Wt::WContainerWidget - { - public: - RadioButtonWidget( RadioButton* box, Wt::WContainerWidget *parent, - int In, - Wt::WString title, - std::vector lstIn ); - - ~RadioButtonWidget(); - - int GetValue(); - void OnRadioButton(); - - private: - RadioButton *mBox; - int MAX_RADIOBUTTON; - Wt::WRadioButton *mwtRadioButton[10]; - Wt::WButtonGroup *group; - }; - - - - //------------------------------------------------------------------------- - RadioButtonWidget::RadioButtonWidget( RadioButton* box, - Wt::WContainerWidget *parent, - int In, - Wt::WString title, - std::vector lstIn ) - : - Wt::WContainerWidget( parent) , - mBox(box) - { - Wt::WContainerWidget *panel = this; - MAX_RADIOBUTTON = lstIn.size(); - int i; - - - Wt::WGroupBox *cont = new Wt::WGroupBox(title); - group = new Wt::WButtonGroup(panel); - - - for (i=0;iaddButton(mwtRadioButton[i],i); - if (In==i) - { - mwtRadioButton[i]->setChecked(true); - } - else - { - mwtRadioButton[i]->setChecked(false); - } - mwtRadioButton[i]->checked().connect(this,&RadioButtonWidget::OnRadioButton); - } - else - { - mwtRadioButton[i]=NULL; - } - } - - panel->addWidget(cont); - - } - //------------------------------------------------------------------------- - - RadioButtonWidget::~RadioButtonWidget() - { - } - - //------------------------------------------------------------------------- - - int RadioButtonWidget::GetValue() - { - - return group->checkedId(); - } - - //-------------------------------------------------------------------------- - void RadioButtonWidget::OnRadioButton() - { - mBox->bbSetOutputOut( GetValue() ); - mBox->bbSetInputIn( GetValue() ); - mBox->bbSignalOutputModification("Out"); - } - - //-------------------------------------------------------------------------- - //------------------------------------------------------------------------- - //-------------------------------------------------------------------------- - //-------------------------------------------------------------------------- - -BBTK_ADD_BLACK_BOX_TO_PACKAGE(wt,RadioButton) -BBTK_BLACK_BOX_IMPLEMENTATION(RadioButton,bbtk::WtBlackBox); -//===== -// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost) -//===== -void RadioButton::Process() -{ - -} -//===== -// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost) -//===== -void RadioButton::CreateWidget(Wt::WContainerWidget* parent) -{ - - - std::vector lstIn; - lstIn.push_back( bbtk::std2wt(bbGetInputIn0()) ); - lstIn.push_back( bbtk::std2wt(bbGetInputIn1()) ); - lstIn.push_back( bbtk::std2wt(bbGetInputIn2()) ); - lstIn.push_back( bbtk::std2wt(bbGetInputIn3()) ); - lstIn.push_back( bbtk::std2wt(bbGetInputIn4()) ); - lstIn.push_back( bbtk::std2wt(bbGetInputIn5()) ); - lstIn.push_back( bbtk::std2wt(bbGetInputIn6()) ); - lstIn.push_back( bbtk::std2wt(bbGetInputIn7()) ); - lstIn.push_back( bbtk::std2wt(bbGetInputIn8()) ); - lstIn.push_back( bbtk::std2wt(bbGetInputIn9()) ); - - RadioButtonWidget *w = new RadioButtonWidget( - this, -// bbGetWxParent(), - parent, - bbGetInputIn() , - bbtk::std2wt(bbGetInputTitle()), - lstIn ); - - bbSetOutputOut( bbGetInputIn() ); - bbSetOutputWidget( w ); - - -} -//===== -// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost) -//===== -void RadioButton::bbUserSetDefaultValues() -{ - bbSetInputIn(0); - bbSetOutputOut( bbGetInputIn() ); - bbSetInputIn0(""); - bbSetInputIn1(""); - bbSetInputIn2(""); - bbSetInputIn3(""); - bbSetInputIn4(""); - bbSetInputIn5(""); - bbSetInputIn6(""); - bbSetInputIn7(""); - bbSetInputIn8(""); - bbSetInputIn9(""); -} -//===== -// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost) -//===== -void RadioButton::bbUserInitializeProcessing() -{ - -} -//===== -// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost) -//===== -void RadioButton::bbUserFinalizeProcessing() -{ - -} -} -// EO namespace bbwt - -