Support SetLabel/GetLabel for wxRadioBox/wxRadioButton on wxQt.
This commit is contained in:
parent
7a0149dfcb
commit
afa4294ef1
4 changed files with 29 additions and 0 deletions
|
|
@ -79,6 +79,9 @@ public:
|
|||
virtual void SetSelection(int n) override;
|
||||
virtual int GetSelection() const override;
|
||||
|
||||
virtual void SetLabel(const wxString &label) override;
|
||||
virtual wxString GetLabel() const override;
|
||||
|
||||
virtual QWidget *GetHandle() const override;
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -35,6 +35,9 @@ public:
|
|||
virtual void SetValue(bool value) override;
|
||||
virtual bool GetValue() const override;
|
||||
|
||||
virtual void SetLabel(const wxString &label) override;
|
||||
virtual wxString GetLabel() const override;
|
||||
|
||||
virtual QWidget *GetHandle() const override;
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -365,3 +365,14 @@ QWidget *wxRadioBox::GetHandle() const
|
|||
return m_qtGroupBox;
|
||||
}
|
||||
|
||||
void wxRadioBox::SetLabel(const wxString& label)
|
||||
{
|
||||
wxControlBase::SetLabel( label );
|
||||
|
||||
m_qtGroupBox->setTitle( wxQtConvertString( label ) );
|
||||
}
|
||||
|
||||
wxString wxRadioBox::GetLabel() const
|
||||
{
|
||||
return wxQtConvertString( m_qtGroupBox->title() );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -164,3 +164,15 @@ QWidget *wxRadioButton::GetHandle() const
|
|||
{
|
||||
return m_qtRadioButton;
|
||||
}
|
||||
|
||||
wxString wxRadioButton::GetLabel() const
|
||||
{
|
||||
return wxQtConvertString( m_qtRadioButton->text() );
|
||||
}
|
||||
|
||||
void wxRadioButton::SetLabel(const wxString& label)
|
||||
{
|
||||
wxRadioButtonBase::SetLabel(label);
|
||||
|
||||
m_qtRadioButton->setText( wxQtConvertString(label) );
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue