KiCad PCB EDA Suite
SYMBOL_LEGACYFILEDLG_SAVE_AS Class Reference

Helper control to inquire user what to do on library save as operation. More...

#include <symbol_legacyfiledlg_save_as.h>

Inheritance diagram for SYMBOL_LEGACYFILEDLG_SAVE_AS:

Public Member Functions

 SYMBOL_LEGACYFILEDLG_SAVE_AS (wxWindow *aParent)
 
 ~SYMBOL_LEGACYFILEDLG_SAVE_AS ()
 
void SetOption (SYMBOL_SAVEAS_TYPE aOption)
 
SYMBOL_SAVEAS_TYPE GetOption () const
 

Static Public Member Functions

static wxWindow * Create (wxWindow *aParent)
 Create a new panel to add to a wxFileDialog object. More...
 

Private Attributes

wxRadioButton * m_simpleSaveAs
 
wxRadioButton * m_replaceTableEntry
 
wxRadioButton * m_addGlobalTableEntry
 
wxRadioButton * m_addProjectTableEntry
 

Static Private Attributes

static SYMBOL_SAVEAS_TYPE m_option = SYMBOL_SAVEAS_TYPE::NORMAL_SAVE_AS
 

Detailed Description

Helper control to inquire user what to do on library save as operation.

Definition at line 32 of file symbol_legacyfiledlg_save_as.h.

Constructor & Destructor Documentation

◆ SYMBOL_LEGACYFILEDLG_SAVE_AS()

SYMBOL_LEGACYFILEDLG_SAVE_AS::SYMBOL_LEGACYFILEDLG_SAVE_AS ( wxWindow *  aParent)
inline

Definition at line 35 of file symbol_legacyfiledlg_save_as.h.

35 : wxPanel( aParent )
36 {
37 m_simpleSaveAs = new wxRadioButton( this, wxID_ANY, _( "Do not update library tables" ),
38 wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
39 m_simpleSaveAs->SetToolTip( _( "Do not perform any additional operations after saving "
40 "library." ) );
42 new wxRadioButton( this, wxID_ANY, _( "Update existing library table entry" ) );
43 m_replaceTableEntry->SetToolTip( _( "Update symbol library table entry to point to new "
44 "library.\n\n"
45 "The original library will no longer be available "
46 "for use." ) );
48 new wxRadioButton( this, wxID_ANY, _( "Add new global library table entry" ) );
49 m_addGlobalTableEntry->SetToolTip( _( "Add new entry to the global symbol library table."
50 "\n\nThe symbol library table nickname is suffixed "
51 "with\nan integer to prevent duplicate table "
52 "entries." ) );
54 new wxRadioButton( this, wxID_ANY, _( "Add new project library table entry" ) );
55 m_addProjectTableEntry->SetToolTip( _( "Add new entry to the project symbol library table."
56 "\n\nThe symbol library table nickname is suffixed "
57 "with\nan integer to prevent duplicate table "
58 "entries." ) );
59
60 wxBoxSizer* sizer = new wxBoxSizer( wxVERTICAL );
61 sizer->Add( m_simpleSaveAs, 0, wxLEFT | wxRIGHT | wxTOP, 5 );
62 sizer->Add( m_replaceTableEntry, 0, wxLEFT | wxRIGHT | wxTOP, 5 );
63 sizer->Add( m_addGlobalTableEntry, 0, wxLEFT | wxRIGHT | wxTOP, 5 );
64 sizer->Add( m_addProjectTableEntry, 0, wxLEFT | wxRIGHT | wxTOP | wxBOTTOM, 5 );
65
66 SetSizerAndFit( sizer );
67
69 }
void SetOption(SYMBOL_SAVEAS_TYPE aOption)
#define _(s)

References _, m_addGlobalTableEntry, m_addProjectTableEntry, m_option, m_replaceTableEntry, m_simpleSaveAs, and SetOption().

Referenced by Create().

◆ ~SYMBOL_LEGACYFILEDLG_SAVE_AS()

SYMBOL_LEGACYFILEDLG_SAVE_AS::~SYMBOL_LEGACYFILEDLG_SAVE_AS ( )
inline

Definition at line 71 of file symbol_legacyfiledlg_save_as.h.

71{ m_option = GetOption(); }
SYMBOL_SAVEAS_TYPE GetOption() const

References GetOption(), and m_option.

Member Function Documentation

◆ Create()

static wxWindow * SYMBOL_LEGACYFILEDLG_SAVE_AS::Create ( wxWindow *  aParent)
inlinestatic

Create a new panel to add to a wxFileDialog object.

The caller owns the created object and is responsible for deleting it.

Parameters
aParentis the parent window that will own the created object.
Returns
the newly created panel to add to the wxFileDialog.

Definition at line 101 of file symbol_legacyfiledlg_save_as.h.

102 {
103 wxCHECK( aParent, nullptr );
104
105 return new SYMBOL_LEGACYFILEDLG_SAVE_AS( aParent );
106 }

References SYMBOL_LEGACYFILEDLG_SAVE_AS().

Referenced by SYMBOL_EDIT_FRAME::saveLibrary().

◆ GetOption()

◆ SetOption()

Member Data Documentation

◆ m_addGlobalTableEntry

wxRadioButton* SYMBOL_LEGACYFILEDLG_SAVE_AS::m_addGlobalTableEntry
private

◆ m_addProjectTableEntry

wxRadioButton* SYMBOL_LEGACYFILEDLG_SAVE_AS::m_addProjectTableEntry
private

◆ m_option

SYMBOL_SAVEAS_TYPE SYMBOL_LEGACYFILEDLG_SAVE_AS::m_option = SYMBOL_SAVEAS_TYPE::NORMAL_SAVE_AS
staticprivate

◆ m_replaceTableEntry

wxRadioButton* SYMBOL_LEGACYFILEDLG_SAVE_AS::m_replaceTableEntry
private

◆ m_simpleSaveAs

wxRadioButton* SYMBOL_LEGACYFILEDLG_SAVE_AS::m_simpleSaveAs
private

Definition at line 111 of file symbol_legacyfiledlg_save_as.h.

Referenced by SetOption(), and SYMBOL_LEGACYFILEDLG_SAVE_AS().


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