KiCad PCB EDA Suite
PANEL_DATA_COLLECTION_BASE Class Referenceabstract

Class PANEL_DATA_COLLECTION_BASE. More...

#include <panel_data_collection_base.h>

Inheritance diagram for PANEL_DATA_COLLECTION_BASE:
RESETTABLE_PANEL PANEL_DATA_COLLECTION

Public Member Functions

 PANEL_DATA_COLLECTION_BASE (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
 
 ~PANEL_DATA_COLLECTION_BASE ()
 
virtual void ResetPanel ()=0
 Reset the contents of this panel. More...
 
virtual wxString GetResetTooltip () const
 Get the tooltip the reset button should display when showing this panel. More...
 
wxString GetHelpTextAtPoint (const wxPoint &aPt, wxHelpEvent::Origin aOrigin) const override
 Overridden to supply the reset button tooltip when queried with { -INT_MAX, INT_MAX }. More...
 

Protected Member Functions

virtual void OnResetIdClick (wxCommandEvent &event)
 

Protected Attributes

wxStaticText * m_stExplanation
 
wxCheckBox * m_cbOptIn
 
wxTextCtrl * m_sentryUid
 
wxButton * m_buttonResetId
 

Detailed Description

Class PANEL_DATA_COLLECTION_BASE.

Definition at line 34 of file panel_data_collection_base.h.

Constructor & Destructor Documentation

◆ PANEL_DATA_COLLECTION_BASE()

PANEL_DATA_COLLECTION_BASE::PANEL_DATA_COLLECTION_BASE ( wxWindow *  parent,
wxWindowID  id = wxID_ANY,
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxSize( -1,-1 ),
long  style = wxTAB_TRAVERSAL,
const wxString &  name = wxEmptyString 
)

Definition at line 12 of file panel_data_collection_base.cpp.

12 : RESETTABLE_PANEL( parent, id, pos, size, style, name )
13{
14 wxBoxSizer* bPanelSizer;
15 bPanelSizer = new wxBoxSizer( wxHORIZONTAL );
16
17 wxBoxSizer* bSizer8;
18 bSizer8 = new wxBoxSizer( wxVERTICAL );
19
20 m_stExplanation = new wxStaticText( this, wxID_ANY, _("KiCad can anonymously report crashes and special event data to developers in order to aid identifying critical bugs across the user base more effectively and help profile functionality to guide improvements.\n\nTo link automatic reports from the same KiCad install, a unique identifier is generated that is completely random, it is only used for the purposes of crash reporting. No personally identifiable information (PII) including IP address is stored or connected to this identifier. You may reset this id at anytime with the button provided.\n\nIf you choose to voluntarily participate, KiCad will automatically handle sending said reports when crashes or events occur. Your design files such as schematic or PCB are not shared in this process."), wxDefaultPosition, wxDefaultSize, 0 );
21 m_stExplanation->Wrap( 500 );
22 bSizer8->Add( m_stExplanation, 0, wxALL, 5 );
23
24 m_cbOptIn = new wxCheckBox( this, wxID_ANY, _("I agree to provide anonymous reports"), wxDefaultPosition, wxDefaultSize, 0 );
25 bSizer8->Add( m_cbOptIn, 0, wxALL, 5 );
26
27 wxBoxSizer* bSizer3;
28 bSizer3 = new wxBoxSizer( wxHORIZONTAL );
29
30 m_sentryUid = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
31 m_sentryUid->SetMinSize( wxSize( 340,-1 ) );
32
33 bSizer3->Add( m_sentryUid, 0, wxALL, 5 );
34
35 m_buttonResetId = new wxButton( this, wxID_ANY, _("Reset Unique Id"), wxDefaultPosition, wxDefaultSize, 0 );
36 bSizer3->Add( m_buttonResetId, 0, wxALL, 5 );
37
38
39 bSizer8->Add( bSizer3, 1, wxEXPAND, 5 );
40
41
42 bPanelSizer->Add( bSizer8, 1, wxEXPAND, 5 );
43
44
45 this->SetSizer( bPanelSizer );
46 this->Layout();
47 bPanelSizer->Fit( this );
48
49 // Connect Events
50 m_buttonResetId->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_DATA_COLLECTION_BASE::OnResetIdClick ), NULL, this );
51}
const char * name
Definition: DXF_plotter.cpp:56
virtual void OnResetIdClick(wxCommandEvent &event)
RESETTABLE_PANEL(wxWindow *aParent, wxWindowID aId=wxID_ANY, const wxPoint &aPos=wxDefaultPosition, const wxSize &aSize=wxSize(-1,-1), long aStyle=wxTAB_TRAVERSAL, const wxString &aName=wxEmptyString)
#define _(s)

References _, m_buttonResetId, m_cbOptIn, m_sentryUid, m_stExplanation, and OnResetIdClick().

◆ ~PANEL_DATA_COLLECTION_BASE()

PANEL_DATA_COLLECTION_BASE::~PANEL_DATA_COLLECTION_BASE ( )

Definition at line 53 of file panel_data_collection_base.cpp.

54{
55 // Disconnect Events
56 m_buttonResetId->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_DATA_COLLECTION_BASE::OnResetIdClick ), NULL, this );
57
58}

References m_buttonResetId, and OnResetIdClick().

Member Function Documentation

◆ GetHelpTextAtPoint()

wxString RESETTABLE_PANEL::GetHelpTextAtPoint ( const wxPoint &  aPt,
wxHelpEvent::Origin  aOrigin 
) const
inlineoverrideinherited

Overridden to supply the reset button tooltip when queried with { -INT_MAX, INT_MAX }.

Definition at line 72 of file resettable_panel.h.

73 {
74 if( aPt == wxPoint( -INT_MAX, INT_MAX ) )
75 return GetResetTooltip();
76 else
77 return wxPanel::GetHelpTextAtPoint( aPt, aOrigin );
78 }
virtual wxString GetResetTooltip() const
Get the tooltip the reset button should display when showing this panel.

References RESETTABLE_PANEL::GetResetTooltip().

◆ GetResetTooltip()

virtual wxString RESETTABLE_PANEL::GetResetTooltip ( ) const
inlinevirtualinherited

Get the tooltip the reset button should display when showing this panel.

Returns
the tooltip

Reimplemented in PANEL_COLOR_SETTINGS, and PANEL_HOTKEYS_EDITOR.

Definition at line 64 of file resettable_panel.h.

65 {
66 return _( "Reset all settings on this page to their default" );
67 }

References _.

Referenced by RESETTABLE_PANEL::GetHelpTextAtPoint().

◆ OnResetIdClick()

virtual void PANEL_DATA_COLLECTION_BASE::OnResetIdClick ( wxCommandEvent &  event)
inlineprotectedvirtual

Reimplemented in PANEL_DATA_COLLECTION.

Definition at line 45 of file panel_data_collection_base.h.

45{ event.Skip(); }

Referenced by PANEL_DATA_COLLECTION_BASE(), and ~PANEL_DATA_COLLECTION_BASE().

◆ ResetPanel()

Member Data Documentation

◆ m_buttonResetId

wxButton* PANEL_DATA_COLLECTION_BASE::m_buttonResetId
protected

◆ m_cbOptIn

wxCheckBox* PANEL_DATA_COLLECTION_BASE::m_cbOptIn
protected

◆ m_sentryUid

wxTextCtrl* PANEL_DATA_COLLECTION_BASE::m_sentryUid
protected

◆ m_stExplanation

wxStaticText* PANEL_DATA_COLLECTION_BASE::m_stExplanation
protected

Definition at line 39 of file panel_data_collection_base.h.

Referenced by PANEL_DATA_COLLECTION_BASE().


The documentation for this class was generated from the following files: