Commit afdf5258 authored by brian.'s avatar brian. Committed by jean-pierre charras
Browse files

Commit patch from Brian Sidebotham (Bus width value option)

parent 76765f22
Loading
Loading
Loading
Loading
+9 −0
Original line number Original line Diff line number Diff line
@@ -37,6 +37,15 @@ DIALOG_EESCHEMA_OPTIONS::DIALOG_EESCHEMA_OPTIONS( wxWindow* parent ) :
{
{
    m_choiceUnits->SetFocus();
    m_choiceUnits->SetFocus();
    m_sdbSizer1OK->SetDefault();
    m_sdbSizer1OK->SetDefault();

#if defined (KICAD_GOST)

    /* The GOST standard pre-defines certain schematic attributes that cannot be changed */

    m_spinBusWidth->Enable(false);

#endif

}
}




+28 −52
Original line number Original line Diff line number Diff line
@@ -41,44 +41,43 @@ public:
    void SetUnits( const wxArrayString& units, int select = 0 );
    void SetUnits( const wxArrayString& units, int select = 0 );
    int GetUnitsSelection( void ) { return m_choiceUnits->GetSelection(); }
    int GetUnitsSelection( void ) { return m_choiceUnits->GetSelection(); }


    void SetGridSelection( int select )
    void SetGridSelection( int select ) { m_choiceGridSize->SetSelection( select ); }
    {
        m_choiceGridSize->SetSelection( select );
    }
    int GetGridSelection( void ) { return m_choiceGridSize->GetSelection(); }
    int GetGridSelection( void ) { return m_choiceGridSize->GetSelection(); }
    void SetGridSizes( const GRIDS& grid_sizes, int grid_id );
    void SetGridSizes( const GRIDS& grid_sizes, int grid_id );


    void SetLineWidth( int line_width )
    void SetBusWidth( int aWidth )
    {
    {
        m_spinLineWidth->SetValue( line_width );
#if defined( KICAD_GOST )
        m_spinBusWidth->SetValue( GOST_BUS_WIDTH );
#else
        m_spinBusWidth->SetValue( aWidth );
#endif
    }
    }
    int GetLineWidth( void ) { return m_spinLineWidth->GetValue(); }


    void SetTextSize( int text_size )
    int GetBusWidth( void )
    {
    {
        m_spinTextSize->SetValue( text_size );
#if defined( KICAD_GOST )
        return GOST_BUS_WIDTH;
#else
        return m_spinBusWidth->GetValue();
#endif
    }
    }

    void SetLineWidth( int aWidth ) { m_spinLineWidth->SetValue( aWidth ); }
    int GetLineWidth( void ) { return m_spinLineWidth->GetValue(); }

    void SetTextSize( int text_size ) { m_spinTextSize->SetValue( text_size ); }
    int GetTextSize( void ) { return m_spinTextSize->GetValue(); }
    int GetTextSize( void ) { return m_spinTextSize->GetValue(); }


    void SetRepeatHorizontal( int displacement )
    void SetRepeatHorizontal( int displacement )
    {
    {
        m_spinRepeatHorizontal->SetValue( displacement );
        m_spinRepeatHorizontal->SetValue( displacement );
    }
    }
    int GetRepeatHorizontal( void )
    int GetRepeatHorizontal( void ) { return m_spinRepeatHorizontal->GetValue(); }
    {
    void SetRepeatVertical( int displacement ) { m_spinRepeatVertical->SetValue( displacement ); }
        return m_spinRepeatHorizontal->GetValue();
    }


    void SetRepeatVertical( int displacement )
    {
        m_spinRepeatVertical->SetValue( displacement );
    }
    int GetRepeatVertical( void ) { return m_spinRepeatVertical->GetValue(); }
    int GetRepeatVertical( void ) { return m_spinRepeatVertical->GetValue(); }

    void SetRepeatLabel( int increment ) { m_spinRepeatLabel->SetValue( increment ); }
    void SetRepeatLabel( int increment )
    {
        m_spinRepeatLabel->SetValue( increment );
    }
    int GetRepeatLabel( void ) { return m_spinRepeatLabel->GetValue(); }
    int GetRepeatLabel( void ) { return m_spinRepeatLabel->GetValue(); }


    void SetAutoSaveInterval( int aInterval ) { m_spinAutoSaveInterval->SetValue( aInterval ); }
    void SetAutoSaveInterval( int aInterval ) { m_spinAutoSaveInterval->SetValue( aInterval ); }
@@ -87,14 +86,8 @@ public:
    void SetShowGrid( bool show ) { m_checkShowGrid->SetValue( show ); }
    void SetShowGrid( bool show ) { m_checkShowGrid->SetValue( show ); }
    bool GetShowGrid( void ) { return m_checkShowGrid->GetValue(); }
    bool GetShowGrid( void ) { return m_checkShowGrid->GetValue(); }


    void SetShowHiddenPins( bool show )
    void SetShowHiddenPins( bool show ) { m_checkShowHiddenPins->SetValue( show ); }
    {
    bool GetShowHiddenPins( void ) { return m_checkShowHiddenPins->GetValue(); }
        m_checkShowHiddenPins->SetValue( show );
    }
    bool GetShowHiddenPins( void )
    {
        return m_checkShowHiddenPins->GetValue();
    }


    void SetEnableMiddleButtonPan( bool enable )
    void SetEnableMiddleButtonPan( bool enable )
    {
    {
@@ -106,7 +99,6 @@ public:
    {
    {
        return m_checkEnableMiddleButtonPan->GetValue();
        return m_checkEnableMiddleButtonPan->GetValue();
    }
    }

    void SetMiddleButtonPanLimited( bool enable )
    void SetMiddleButtonPanLimited( bool enable )
    {
    {
        m_checkMiddleButtonPanLimited->SetValue( enable );
        m_checkMiddleButtonPanLimited->SetValue( enable );
@@ -116,30 +108,14 @@ public:
        return m_checkMiddleButtonPanLimited->GetValue();
        return m_checkMiddleButtonPanLimited->GetValue();
    }
    }


    void SetEnableAutoPan( bool enable )
    void SetEnableAutoPan( bool enable ) { m_checkAutoPan->SetValue( enable ); }
    {
        m_checkAutoPan->SetValue( enable );
    }
    bool GetEnableAutoPan( void ) { return m_checkAutoPan->GetValue(); }
    bool GetEnableAutoPan( void ) { return m_checkAutoPan->GetValue(); }


    void SetEnableHVBusOrientation( bool enable )
    void SetEnableHVBusOrientation( bool enable ) { m_checkHVOrientation->SetValue( enable ); }
    {
    bool GetEnableHVBusOrientation( void ) { return m_checkHVOrientation->GetValue(); }
        m_checkHVOrientation->SetValue( enable );
    }
    bool GetEnableHVBusOrientation( void )
    {
        return m_checkHVOrientation->GetValue();
    }

    void SetShowPageLimits( bool show )
    {
        m_checkPageLimits->SetValue( show );
    }
    bool GetShowPageLimits( void )
    {
        return m_checkPageLimits->GetValue();
    }


    void SetShowPageLimits( bool show ) { m_checkPageLimits->SetValue( show ); }
    bool GetShowPageLimits( void ) { return m_checkPageLimits->GetValue(); }


    /** Set the field \a aNdx textctrl to \a aName */
    /** Set the field \a aNdx textctrl to \a aName */
    void SetFieldName( int aNdx, wxString aName );
    void SetFieldName( int aNdx, wxString aName );
+308 −297
Original line number Original line Diff line number Diff line
@@ -67,11 +67,22 @@ DIALOG_EESCHEMA_OPTIONS_BASE::DIALOG_EESCHEMA_OPTIONS_BASE( wxWindow* parent, wx
	m_staticGridUnits->Wrap( -1 );
	m_staticGridUnits->Wrap( -1 );
	fgSizer1->Add( m_staticGridUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
	fgSizer1->Add( m_staticGridUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
	
	
	m_staticText51 = new wxStaticText( m_panel1, wxID_ANY, _("Default &bus width:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText51->Wrap( -1 );
	fgSizer1->Add( m_staticText51, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
	
	m_spinBusWidth = new wxSpinCtrl( m_panel1, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_WRAP, 1, 100, 1 );
	fgSizer1->Add( m_spinBusWidth, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 );
	
	m_staticBusWidthUnits = new wxStaticText( m_panel1, wxID_ANY, _("mils"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticBusWidthUnits->Wrap( -1 );
	fgSizer1->Add( m_staticBusWidthUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
	
	m_staticText5 = new wxStaticText( m_panel1, wxID_ANY, _("Default &line width:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText5 = new wxStaticText( m_panel1, wxID_ANY, _("Default &line width:"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticText5->Wrap( -1 );
	m_staticText5->Wrap( -1 );
	fgSizer1->Add( m_staticText5, 1, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
	fgSizer1->Add( m_staticText5, 1, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
	
	
	m_spinLineWidth = new wxSpinCtrl( m_panel1, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_WRAP, 0, 100, 0 );
	m_spinLineWidth = new wxSpinCtrl( m_panel1, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_WRAP, 1, 100, 1 );
	fgSizer1->Add( m_spinLineWidth, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 );
	fgSizer1->Add( m_spinLineWidth, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 );
	
	
	m_staticLineWidthUnits = new wxStaticText( m_panel1, wxID_ANY, _("mils"), wxDefaultPosition, wxDefaultSize, 0 );
	m_staticLineWidthUnits = new wxStaticText( m_panel1, wxID_ANY, _("mils"), wxDefaultPosition, wxDefaultSize, 0 );
+4878 −4613

File changed.

Preview size limit exceeded, changes collapsed.

+123 −120
Original line number Original line Diff line number Diff line
@@ -59,6 +59,9 @@ class DIALOG_EESCHEMA_OPTIONS_BASE : public wxDialog
		wxStaticText* m_staticText3;
		wxStaticText* m_staticText3;
		wxChoice* m_choiceGridSize;
		wxChoice* m_choiceGridSize;
		wxStaticText* m_staticGridUnits;
		wxStaticText* m_staticGridUnits;
		wxStaticText* m_staticText51;
		wxSpinCtrl* m_spinBusWidth;
		wxStaticText* m_staticBusWidthUnits;
		wxStaticText* m_staticText5;
		wxStaticText* m_staticText5;
		wxSpinCtrl* m_spinLineWidth;
		wxSpinCtrl* m_spinLineWidth;
		wxStaticText* m_staticLineWidthUnits;
		wxStaticText* m_staticLineWidthUnits;
Loading