KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_diff_phase_skew_properties.cpp
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software: you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation, either version 3 of the License, or (at your
9 * option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
21
23#include <pcb_base_edit_frame.h>
24
25
29 m_settings{ aSettings }
30{
31 m_zeroSwatch->SetSwatchBackground( COLOR4D::BLACK );
32 m_zeroSwatch->SetSupportsOpacity( false );
33
34 m_positiveSwatch->SetSwatchBackground( COLOR4D::BLACK );
35 m_positiveSwatch->SetSupportsOpacity( false );
36
37 m_negativeSwatch->SetSwatchBackground( COLOR4D::BLACK );
38 m_negativeSwatch->SetSupportsOpacity( false );
39
40 m_unknownSwatch->SetSwatchBackground( COLOR4D::BLACK );
41 m_unknownSwatch->SetSupportsOpacity( false );
42
44 //SetInitialFocus( m_targetLengthCtrl );
45 Centre();
46}
47
48
50{
51 m_zeroSwatch->SetSwatchColor( m_settings->m_ZeroSkewColor, false );
52 m_positiveSwatch->SetSwatchColor( m_settings->m_PositiveSkewColor, false );
53 m_negativeSwatch->SetSwatchColor( m_settings->m_NegativeSkewColor, false );
54 m_unknownSwatch->SetSwatchColor( m_settings->m_UnknownSkewColor, false );
55 m_logScale->SetValue( m_settings->m_UseLogScale );
56
57 return true;
58}
59
60
62{
63 m_settings->m_ZeroSkewColor = m_zeroSwatch->GetSwatchColor();
64 m_settings->m_PositiveSkewColor = m_positiveSwatch->GetSwatchColor();
65 m_settings->m_NegativeSkewColor = m_negativeSwatch->GetSwatchColor();
66 m_settings->m_UseLogScale = m_logScale->GetValue();
67
68 return true;
69}
static const COLOR4D BLACK
Definition color4d.h:406
DIALOG_DIFF_PHASE_SKEW_PROPERTIES_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Differential Skew Display Properties"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
DIALOG_DIFF_PHASE_SKEW_PROPERTIES(PCB_BASE_EDIT_FRAME *aParent, PCBNEW_SETTINGS::DIFF_PHASE_SKEW_SETTINGS *aSettings)
PCBNEW_SETTINGS::DIFF_PHASE_SKEW_SETTINGS * m_settings
void SetupStandardButtons(std::map< int, wxString > aLabels={})
Common, abstract interface for edit frames.