KiCad PCB EDA Suite
Loading...
Searching...
No Matches
PANEL_HOTKEYS_EDITOR Class Reference

#include <panel_hotkeys_editor.h>

Inheritance diagram for PANEL_HOTKEYS_EDITOR:
RESETTABLE_PANEL

Public Member Functions

 PANEL_HOTKEYS_EDITOR (EDA_BASE_FRAME *aFrame, wxWindow *aWindow, bool aReadOnly)
 
 ~PANEL_HOTKEYS_EDITOR ()
 
std::vector< TOOL_ACTION * > & ActionsList ()
 
bool TransferDataToWindow () override
 
bool TransferDataFromWindow () override
 
void ResetPanel () override
 Reset the contents of this panel.
 
wxString GetResetTooltip () const override
 Get the tooltip the reset button should display when showing this panel.
 
wxString GetHelpTextAtPoint (const wxPoint &aPt, wxHelpEvent::Origin aOrigin) const override
 Overridden to supply the reset button tooltip when queried with { -INT_MAX, INT_MAX }.
 

Protected Attributes

EDA_BASE_FRAMEm_frame
 
bool m_readOnly
 
std::vector< TOOL_ACTION * > m_actions
 
HOTKEY_STORE m_hotkeyStore
 
WIDGET_HOTKEY_LISTm_hotkeyListCtrl
 

Private Member Functions

void installButtons (wxSizer *aSizer)
 Install the button panel (global reset/default, import/export)
 
void OnFilterSearch (wxCommandEvent &aEvent)
 Handle a change in the hotkey filter text.
 
void ImportHotKeys ()
 Put up a dialog allowing the user to select a hotkeys file and then overlays those hotkeys onto the current hotkey store.
 
void dumpHotkeys ()
 Dump all actions and their hotkeys to a text file for inclusion in documentation.
 

Private Attributes

wxSearchCtrl * m_filterSearch
 

Detailed Description

Definition at line 42 of file panel_hotkeys_editor.h.

Constructor & Destructor Documentation

◆ PANEL_HOTKEYS_EDITOR()

PANEL_HOTKEYS_EDITOR::PANEL_HOTKEYS_EDITOR ( EDA_BASE_FRAME aFrame,
wxWindow *  aWindow,
bool  aReadOnly 
)

◆ ~PANEL_HOTKEYS_EDITOR()

PANEL_HOTKEYS_EDITOR::~PANEL_HOTKEYS_EDITOR ( )

Definition at line 110 of file panel_hotkeys_editor.cpp.

References m_filterSearch, and OnFilterSearch().

Member Function Documentation

◆ ActionsList()

std::vector< TOOL_ACTION * > & PANEL_HOTKEYS_EDITOR::ActionsList ( )
inline

◆ dumpHotkeys()

void PANEL_HOTKEYS_EDITOR::dumpHotkeys ( )
private

Dump all actions and their hotkeys to a text file for inclusion in documentation.

The format is asciidoc-compatible table rows. This function is hidden behind an advanced config flag and not intended for users.

Definition at line 230 of file panel_hotkeys_editor.cpp.

References _, EDA_BASE_FRAME::GetMruPath(), HOTKEY_STORE::GetSections(), KeyNameFromKeyCode(), HOTKEY::m_Actions, HOTKEY::m_EditKeycode, m_frame, m_hotkeyStore, FILEEXT::TextFileExtension, and FILEEXT::TextFileWildcard().

Referenced by installButtons().

◆ 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.

References RESETTABLE_PANEL::GetResetTooltip().

◆ GetResetTooltip()

wxString PANEL_HOTKEYS_EDITOR::GetResetTooltip ( ) const
inlineoverridevirtual

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

Returns
the tooltip

Reimplemented from RESETTABLE_PANEL.

Definition at line 55 of file panel_hotkeys_editor.h.

References _.

◆ ImportHotKeys()

void PANEL_HOTKEYS_EDITOR::ImportHotKeys ( )
private

◆ installButtons()

void PANEL_HOTKEYS_EDITOR::installButtons ( wxSizer *  aSizer)
private

Install the button panel (global reset/default, import/export)

Parameters
aSizerthe dialog to install on.

Definition at line 123 of file panel_hotkeys_editor.cpp.

References _, dumpHotkeys(), ADVANCED_CFG::GetCfg(), KIUI::GetStdMargin(), ImportHotKeys(), m_hotkeyListCtrl, and WIDGET_HOTKEY_LIST::ResetAllHotkeys().

Referenced by PANEL_HOTKEYS_EDITOR().

◆ OnFilterSearch()

void PANEL_HOTKEYS_EDITOR::OnFilterSearch ( wxCommandEvent &  aEvent)
private

Handle a change in the hotkey filter text.

Parameters
aEventis the search event, used to get the search query.

Definition at line 192 of file panel_hotkeys_editor.cpp.

References WIDGET_HOTKEY_LIST::ApplyFilterString(), and m_hotkeyListCtrl.

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

◆ ResetPanel()

void PANEL_HOTKEYS_EDITOR::ResetPanel ( )
overridevirtual

Reset the contents of this panel.

Implements RESETTABLE_PANEL.

Definition at line 117 of file panel_hotkeys_editor.cpp.

References m_hotkeyListCtrl, and WIDGET_HOTKEY_LIST::ResetAllHotkeys().

◆ TransferDataFromWindow()

bool PANEL_HOTKEYS_EDITOR::TransferDataFromWindow ( )
override

◆ TransferDataToWindow()

bool PANEL_HOTKEYS_EDITOR::TransferDataToWindow ( )
override

Member Data Documentation

◆ m_actions

std::vector<TOOL_ACTION*> PANEL_HOTKEYS_EDITOR::m_actions
protected

◆ m_filterSearch

wxSearchCtrl* PANEL_HOTKEYS_EDITOR::m_filterSearch
private

Definition at line 89 of file panel_hotkeys_editor.h.

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

◆ m_frame

EDA_BASE_FRAME* PANEL_HOTKEYS_EDITOR::m_frame
protected

Definition at line 92 of file panel_hotkeys_editor.h.

Referenced by dumpHotkeys(), and ImportHotKeys().

◆ m_hotkeyListCtrl

WIDGET_HOTKEY_LIST* PANEL_HOTKEYS_EDITOR::m_hotkeyListCtrl
protected

◆ m_hotkeyStore

HOTKEY_STORE PANEL_HOTKEYS_EDITOR::m_hotkeyStore
protected

◆ m_readOnly

bool PANEL_HOTKEYS_EDITOR::m_readOnly
protected

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