2014-08-24 01:50:11 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: wx/qt/radiobox.h
|
|
|
|
// Author: Peter Most, Mariano Reingart
|
|
|
|
// Copyright: (c) 2010 wxWidgets dev team
|
|
|
|
// Licence: wxWindows licence
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_QT_RADIOBOX_H_
|
|
|
|
#define _WX_QT_RADIOBOX_H_
|
|
|
|
|
2016-08-25 15:56:00 +00:00
|
|
|
class QGroupBox;
|
|
|
|
class QButtonGroup;
|
2019-01-11 14:39:54 +00:00
|
|
|
class QGridLayout;
|
2014-08-24 01:50:11 +00:00
|
|
|
|
|
|
|
class WXDLLIMPEXP_CORE wxRadioBox : public wxControl, public wxRadioBoxBase
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
wxRadioBox();
|
|
|
|
|
|
|
|
wxRadioBox(wxWindow *parent,
|
|
|
|
wxWindowID id,
|
|
|
|
const wxString& title,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
int n = 0, const wxString choices[] = NULL,
|
|
|
|
int majorDim = 0,
|
|
|
|
long style = wxRA_SPECIFY_COLS,
|
|
|
|
const wxValidator& val = wxDefaultValidator,
|
|
|
|
const wxString& name = wxRadioBoxNameStr);
|
|
|
|
|
|
|
|
wxRadioBox(wxWindow *parent,
|
|
|
|
wxWindowID id,
|
|
|
|
const wxString& title,
|
|
|
|
const wxPoint& pos,
|
|
|
|
const wxSize& size,
|
|
|
|
const wxArrayString& choices,
|
|
|
|
int majorDim = 0,
|
|
|
|
long style = wxRA_SPECIFY_COLS,
|
|
|
|
const wxValidator& val = wxDefaultValidator,
|
|
|
|
const wxString& name = wxRadioBoxNameStr);
|
|
|
|
|
|
|
|
bool Create(wxWindow *parent,
|
|
|
|
wxWindowID id,
|
|
|
|
const wxString& title,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
int n = 0, const wxString choices[] = NULL,
|
|
|
|
int majorDim = 0,
|
|
|
|
long style = wxRA_SPECIFY_COLS,
|
|
|
|
const wxValidator& val = wxDefaultValidator,
|
|
|
|
const wxString& name = wxRadioBoxNameStr);
|
|
|
|
|
|
|
|
bool Create(wxWindow *parent,
|
|
|
|
wxWindowID id,
|
|
|
|
const wxString& title,
|
|
|
|
const wxPoint& pos,
|
|
|
|
const wxSize& size,
|
|
|
|
const wxArrayString& choices,
|
|
|
|
int majorDim = 0,
|
|
|
|
long style = wxRA_SPECIFY_COLS,
|
|
|
|
const wxValidator& val = wxDefaultValidator,
|
|
|
|
const wxString& name = wxRadioBoxNameStr);
|
|
|
|
|
|
|
|
using wxWindowBase::Show;
|
|
|
|
using wxWindowBase::Enable;
|
|
|
|
using wxRadioBoxBase::GetDefaultBorder;
|
|
|
|
|
2018-12-10 11:23:50 +00:00
|
|
|
virtual bool Enable(unsigned int n, bool enable = true) wxOVERRIDE;
|
|
|
|
virtual bool Enable(bool enable = true) wxOVERRIDE;
|
|
|
|
virtual bool Show(unsigned int n, bool show = true) wxOVERRIDE;
|
2018-12-10 14:11:37 +00:00
|
|
|
virtual bool Show(bool show = true) wxOVERRIDE;
|
2018-12-10 11:23:50 +00:00
|
|
|
virtual bool IsItemEnabled(unsigned int n) const wxOVERRIDE;
|
|
|
|
virtual bool IsItemShown(unsigned int n) const wxOVERRIDE;
|
2014-08-24 01:50:11 +00:00
|
|
|
|
2019-04-05 18:08:53 +00:00
|
|
|
virtual unsigned int GetCount() const wxOVERRIDE;
|
|
|
|
virtual wxString GetString(unsigned int n) const wxOVERRIDE;
|
|
|
|
virtual void SetString(unsigned int n, const wxString& s) wxOVERRIDE;
|
2014-08-24 01:50:11 +00:00
|
|
|
|
2019-04-05 18:08:53 +00:00
|
|
|
virtual void SetSelection(int n) wxOVERRIDE;
|
|
|
|
virtual int GetSelection() const wxOVERRIDE;
|
2014-08-24 01:50:11 +00:00
|
|
|
|
2019-04-05 18:08:53 +00:00
|
|
|
virtual QWidget *GetHandle() const wxOVERRIDE;
|
2014-08-24 01:50:11 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
// The 'visual' group box:
|
|
|
|
QGroupBox *m_qtGroupBox;
|
|
|
|
|
|
|
|
// Handles the mutual exclusion of buttons:
|
|
|
|
QButtonGroup *m_qtButtonGroup;
|
|
|
|
|
|
|
|
// Autofit layout for buttons (either vert. or horiz.):
|
2019-01-11 14:39:54 +00:00
|
|
|
QGridLayout *m_qtGridLayout;
|
2014-08-24 01:50:11 +00:00
|
|
|
|
2015-04-23 11:49:01 +00:00
|
|
|
wxDECLARE_DYNAMIC_CLASS(wxRadioBox);
|
2014-08-24 01:50:11 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _WX_QT_RADIOBOX_H_
|