Renamed WX_UNIT_BINDER to UNIT_BINDER and moved to common/widgets
WX_ prefix should reserved for classes provieded by wxWidgets.
This commit is contained in:
parent
84e360dd0d
commit
579d3f478d
|
@ -178,6 +178,7 @@ set( COMMON_WIDGET_SRCS
|
|||
widgets/footprint_select_widget.cpp
|
||||
widgets/footprint_choice.cpp
|
||||
widgets/indicator_icon.cpp
|
||||
widgets/unit_binder.cpp
|
||||
)
|
||||
|
||||
set( COMMON_PAGE_LAYOUT_SRCS
|
||||
|
@ -293,7 +294,6 @@ set( COMMON_SRCS
|
|||
worksheet.cpp
|
||||
wxwineda.cpp
|
||||
wxdataviewctrl_helpers.cpp
|
||||
wx_unit_binder.cpp
|
||||
wx_status_popup.cpp
|
||||
xnode.cpp
|
||||
zoom.cpp
|
||||
|
|
|
@ -29,9 +29,9 @@
|
|||
#include <base_units.h>
|
||||
#include <wx/valnum.h>
|
||||
|
||||
#include "wx_unit_binder.h"
|
||||
#include "widgets/unit_binder.h"
|
||||
|
||||
WX_UNIT_BINDER::WX_UNIT_BINDER( wxWindow* aParent, wxTextEntry* aTextInput,
|
||||
UNIT_BINDER::UNIT_BINDER( wxWindow* aParent, wxTextEntry* aTextInput,
|
||||
wxStaticText* aUnitLabel, wxSpinButton* aSpinButton ) :
|
||||
m_textEntry( aTextInput ),
|
||||
m_unitLabel( aUnitLabel ),
|
||||
|
@ -46,12 +46,12 @@ WX_UNIT_BINDER::WX_UNIT_BINDER( wxWindow* aParent, wxTextEntry* aTextInput,
|
|||
}
|
||||
|
||||
|
||||
WX_UNIT_BINDER::~WX_UNIT_BINDER()
|
||||
UNIT_BINDER::~UNIT_BINDER()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void WX_UNIT_BINDER::SetValue( int aValue )
|
||||
void UNIT_BINDER::SetValue( int aValue )
|
||||
{
|
||||
wxString s = StringFromValue( m_units, aValue, false );
|
||||
|
||||
|
@ -61,7 +61,7 @@ void WX_UNIT_BINDER::SetValue( int aValue )
|
|||
}
|
||||
|
||||
|
||||
int WX_UNIT_BINDER::GetValue() const
|
||||
int UNIT_BINDER::GetValue() const
|
||||
{
|
||||
wxString s = m_textEntry->GetValue();
|
||||
|
||||
|
@ -69,7 +69,7 @@ int WX_UNIT_BINDER::GetValue() const
|
|||
}
|
||||
|
||||
|
||||
bool WX_UNIT_BINDER::Valid() const
|
||||
bool UNIT_BINDER::Valid() const
|
||||
{
|
||||
double dummy;
|
||||
|
||||
|
@ -77,7 +77,7 @@ bool WX_UNIT_BINDER::Valid() const
|
|||
}
|
||||
|
||||
|
||||
void WX_UNIT_BINDER::Enable( bool aEnable )
|
||||
void UNIT_BINDER::Enable( bool aEnable )
|
||||
{
|
||||
wxWindow* wxWin = dynamic_cast<wxWindow*>( m_textEntry );
|
||||
wxASSERT( wxWin );
|
|
@ -22,8 +22,8 @@
|
|||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#ifndef __WX_UNIT_BINDER_H_
|
||||
#define __WX_UNIT_BINDER_H_
|
||||
#ifndef __UNIT_BINDER_H_
|
||||
#define __UNIT_BINDER_H_
|
||||
|
||||
#include <common.h>
|
||||
#include <wx/spinbutt.h>
|
||||
|
@ -32,7 +32,7 @@ class wxTextEntry;
|
|||
class wxSpinButton;
|
||||
class wxStaticText;
|
||||
|
||||
class WX_UNIT_BINDER
|
||||
class UNIT_BINDER
|
||||
{
|
||||
public:
|
||||
|
||||
|
@ -43,9 +43,9 @@ public:
|
|||
* @param aUnitLabel is the units label displayed next to the text field.
|
||||
* @param aSpinButton is an optional spin button (for adjusting the input value)
|
||||
*/
|
||||
WX_UNIT_BINDER( wxWindow* aParent, wxTextEntry* aTextInput, wxStaticText* aUnitLabel, wxSpinButton* aSpinButton = NULL );
|
||||
UNIT_BINDER( wxWindow* aParent, wxTextEntry* aTextInput, wxStaticText* aUnitLabel, wxSpinButton* aSpinButton = NULL );
|
||||
|
||||
virtual ~WX_UNIT_BINDER();
|
||||
virtual ~UNIT_BINDER();
|
||||
|
||||
/**
|
||||
* Function SetValue
|
||||
|
@ -94,4 +94,4 @@ protected:
|
|||
static const wxString DEFAULT_VALUE;
|
||||
};
|
||||
|
||||
#endif /* __WX_UNIT_BINDER_H_ */
|
||||
#endif /* __UNIT_BINDER_H_ */
|
|
@ -26,7 +26,7 @@
|
|||
#ifndef __dialog_diff_pair_dimensions_settings__
|
||||
#define __dialog_diff_pair_dimensions_settings__
|
||||
|
||||
#include <wx_unit_binder.h>
|
||||
#include <widgets/unit_binder.h>
|
||||
|
||||
#include "dialog_pns_diff_pair_dimensions_base.h"
|
||||
|
||||
|
@ -47,9 +47,9 @@ private:
|
|||
virtual void OnOkClick( wxCommandEvent& aEvent ) override;
|
||||
virtual void OnViaTraceGapEqualCheck( wxCommandEvent& event ) override;
|
||||
|
||||
WX_UNIT_BINDER m_traceWidth;
|
||||
WX_UNIT_BINDER m_traceGap;
|
||||
WX_UNIT_BINDER m_viaGap;
|
||||
UNIT_BINDER m_traceWidth;
|
||||
UNIT_BINDER m_traceGap;
|
||||
UNIT_BINDER m_viaGap;
|
||||
|
||||
PNS::SIZES_SETTINGS& m_sizes;
|
||||
};
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
#include "dialog_pns_length_tuning_settings_base.h"
|
||||
|
||||
#include <wx_unit_binder.h>
|
||||
#include <widgets/unit_binder.h>
|
||||
|
||||
#include <router/pns_router.h>
|
||||
|
||||
|
@ -46,10 +46,10 @@ public:
|
|||
virtual void OnOkClick( wxCommandEvent& aEvent ) override;
|
||||
|
||||
private:
|
||||
WX_UNIT_BINDER m_minAmpl;
|
||||
WX_UNIT_BINDER m_maxAmpl;
|
||||
WX_UNIT_BINDER m_spacing;
|
||||
WX_UNIT_BINDER m_targetLength;
|
||||
UNIT_BINDER m_minAmpl;
|
||||
UNIT_BINDER m_maxAmpl;
|
||||
UNIT_BINDER m_spacing;
|
||||
UNIT_BINDER m_targetLength;
|
||||
|
||||
PNS::MEANDER_SETTINGS& m_settings;
|
||||
PNS::ROUTER_MODE m_mode;
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
*/
|
||||
|
||||
#include <dialogs/dialog_track_via_properties_base.h>
|
||||
#include <wx_unit_binder.h>
|
||||
#include <widgets/unit_binder.h>
|
||||
#include <core/optional.h>
|
||||
#include <layers_id_colors_and_visibility.h>
|
||||
|
||||
|
@ -63,7 +63,7 @@ private:
|
|||
|
||||
///> Sets wxTextEntry to the value stored in OPT<T> or "<...>" if it is not available.
|
||||
template<typename T>
|
||||
void setCommonVal( const OPT<T>& aVal, wxTextEntry* aTxtEntry, WX_UNIT_BINDER& aBinder )
|
||||
void setCommonVal( const OPT<T>& aVal, wxTextEntry* aTxtEntry, UNIT_BINDER& aBinder )
|
||||
{
|
||||
if( aVal )
|
||||
aBinder.SetValue( *aVal );
|
||||
|
@ -74,12 +74,12 @@ private:
|
|||
///> Selected items to be modified.
|
||||
const SELECTION& m_items;
|
||||
|
||||
WX_UNIT_BINDER m_trackStartX, m_trackStartY;
|
||||
WX_UNIT_BINDER m_trackEndX, m_trackEndY;
|
||||
WX_UNIT_BINDER m_trackWidth;
|
||||
UNIT_BINDER m_trackStartX, m_trackStartY;
|
||||
UNIT_BINDER m_trackEndX, m_trackEndY;
|
||||
UNIT_BINDER m_trackWidth;
|
||||
|
||||
WX_UNIT_BINDER m_viaX, m_viaY;
|
||||
WX_UNIT_BINDER m_viaDiameter, m_viaDrill;
|
||||
UNIT_BINDER m_viaX, m_viaY;
|
||||
UNIT_BINDER m_viaDiameter, m_viaDrill;
|
||||
|
||||
///> Flag that determines if the dialog displays track properties.
|
||||
bool m_tracks;
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#ifndef __dialog_track_via_size__
|
||||
#define __dialog_track_via_size__
|
||||
|
||||
#include <wx_unit_binder.h>
|
||||
#include <widgets/unit_binder.h>
|
||||
|
||||
#include "dialog_track_via_size_base.h"
|
||||
|
||||
|
@ -39,9 +39,9 @@ public:
|
|||
DIALOG_TRACK_VIA_SIZE( wxWindow* aParent, BOARD_DESIGN_SETTINGS& aSettings );
|
||||
|
||||
protected:
|
||||
WX_UNIT_BINDER m_trackWidth;
|
||||
WX_UNIT_BINDER m_viaDiameter;
|
||||
WX_UNIT_BINDER m_viaDrill;
|
||||
UNIT_BINDER m_trackWidth;
|
||||
UNIT_BINDER m_viaDiameter;
|
||||
UNIT_BINDER m_viaDrill;
|
||||
|
||||
// Routings settings that are modified by the dialog.
|
||||
BOARD_DESIGN_SETTINGS& m_settings;
|
||||
|
|
Loading…
Reference in New Issue