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

#include <dialog_template_selector.h>

Inheritance diagram for TEMPLATE_WIDGET:
TEMPLATE_WIDGET_BASE

Public Types

enum class  CATEGORY { USER , SYSTEM , BROWSED }
 

Public Member Functions

 TEMPLATE_WIDGET (wxWindow *aParent, DIALOG_TEMPLATE_SELECTOR *aDialog)
 
void SetTemplate (PROJECT_TEMPLATE *aTemplate)
 Set the project template for this widget, which will determine the icon and title associated with this project template widget.
 
PROJECT_TEMPLATEGetTemplate ()
 
void Select ()
 
void SelectWithoutStateChange ()
 
void Unselect ()
 
void SetDescription (const wxString &aDescription)
 
wxString GetDescription () const
 
void SetCategory (CATEGORY aCategory)
 
CATEGORY GetCategory () const
 
bool IsUserTemplate () const
 
bool IsSelected () const
 

Protected Member Functions

void OnMouse (wxMouseEvent &event)
 
void OnDoubleClick (wxMouseEvent &event)
 
void OnSize (wxSizeEvent &event)
 
void onRightClick (wxMouseEvent &event)
 
void onEditTemplate (wxCommandEvent &event)
 
void onOpenFolder (wxCommandEvent &event)
 
void onDuplicateTemplate (wxCommandEvent &event)
 

Protected Attributes

DIALOG_TEMPLATE_SELECTORm_dialog
 
wxWindow * m_parent
 
wxPanel * m_panel
 
bool m_selected
 
CATEGORY m_category
 
wxString m_description
 
PROJECT_TEMPLATEm_currTemplate
 
wxStaticBitmap * m_bitmapIcon
 
wxStaticText * m_titleLabel
 
wxStaticText * m_descLabel
 

Detailed Description

Definition at line 64 of file dialog_template_selector.h.

Member Enumeration Documentation

◆ CATEGORY

enum class TEMPLATE_WIDGET::CATEGORY
strong
Enumerator
USER 
SYSTEM 
BROWSED 

Definition at line 67 of file dialog_template_selector.h.

Constructor & Destructor Documentation

◆ TEMPLATE_WIDGET()

Member Function Documentation

◆ GetCategory()

CATEGORY TEMPLATE_WIDGET::GetCategory ( ) const
inline

Definition at line 92 of file dialog_template_selector.h.

References m_category.

◆ GetDescription()

wxString TEMPLATE_WIDGET::GetDescription ( ) const
inline

Definition at line 89 of file dialog_template_selector.h.

References m_description.

◆ GetTemplate()

PROJECT_TEMPLATE * TEMPLATE_WIDGET::GetTemplate ( )
inline

Definition at line 82 of file dialog_template_selector.h.

References m_currTemplate.

Referenced by DIALOG_TEMPLATE_SELECTOR::SetWidget().

◆ IsSelected()

bool TEMPLATE_WIDGET::IsSelected ( ) const
inline

Definition at line 108 of file dialog_template_selector.h.

References m_selected.

◆ IsUserTemplate()

bool TEMPLATE_WIDGET::IsUserTemplate ( ) const
inline

Definition at line 96 of file dialog_template_selector.h.

References m_category.

◆ OnDoubleClick()

void TEMPLATE_WIDGET::OnDoubleClick ( wxMouseEvent & event)
protected

Definition at line 275 of file dialog_template_selector.cpp.

References m_dialog, and Select().

Referenced by TEMPLATE_WIDGET().

◆ onDuplicateTemplate()

void TEMPLATE_WIDGET::onDuplicateTemplate ( wxCommandEvent & event)
protected

◆ onEditTemplate()

void TEMPLATE_WIDGET::onEditTemplate ( wxCommandEvent & event)
protected

Definition at line 312 of file dialog_template_selector.cpp.

References _, DisplayErrorMessage(), m_currTemplate, and m_dialog.

Referenced by onRightClick().

◆ OnMouse()

void TEMPLATE_WIDGET::OnMouse ( wxMouseEvent & event)
protected

Definition at line 268 of file dialog_template_selector.cpp.

References Select().

Referenced by TEMPLATE_WIDGET().

◆ onOpenFolder()

void TEMPLATE_WIDGET::onOpenFolder ( wxCommandEvent & event)
protected

Definition at line 345 of file dialog_template_selector.cpp.

References _, DisplayError(), and m_currTemplate.

Referenced by onRightClick().

◆ onRightClick()

void TEMPLATE_WIDGET::onRightClick ( wxMouseEvent & event)
protected

◆ OnSize()

void TEMPLATE_WIDGET::OnSize ( wxSizeEvent & event)
protected

Definition at line 242 of file dialog_template_selector.cpp.

References TEMPLATE_WIDGET_BASE::m_descLabel, and m_description.

Referenced by TEMPLATE_WIDGET().

◆ Select()

void TEMPLATE_WIDGET::Select ( )

◆ SelectWithoutStateChange()

void TEMPLATE_WIDGET::SelectWithoutStateChange ( )

◆ SetCategory()

void TEMPLATE_WIDGET::SetCategory ( CATEGORY aCategory)
inline

Definition at line 91 of file dialog_template_selector.h.

References m_category.

Referenced by DIALOG_TEMPLATE_SELECTOR::BuildTemplateList().

◆ SetDescription()

void TEMPLATE_WIDGET::SetDescription ( const wxString & aDescription)

◆ SetTemplate()

void TEMPLATE_WIDGET::SetTemplate ( PROJECT_TEMPLATE * aTemplate)

Set the project template for this widget, which will determine the icon and title associated with this project template widget.

Definition at line 189 of file dialog_template_selector.cpp.

References PROJECT_TEMPLATE::GetIcon(), KIUI::GetInfoFont(), PROJECT_TEMPLATE::GetTitle(), icon_kicad, KiBitmapBundleDef(), TEMPLATE_WIDGET_BASE::m_bitmapIcon, m_currTemplate, TEMPLATE_WIDGET_BASE::m_titleLabel, and scale.

Referenced by DIALOG_TEMPLATE_SELECTOR::BuildTemplateList().

◆ Unselect()

void TEMPLATE_WIDGET::Unselect ( )

Member Data Documentation

◆ m_bitmapIcon

wxStaticBitmap* TEMPLATE_WIDGET_BASE::m_bitmapIcon
protectedinherited

◆ m_category

CATEGORY TEMPLATE_WIDGET::m_category
protected

◆ m_currTemplate

PROJECT_TEMPLATE* TEMPLATE_WIDGET::m_currTemplate
protected

◆ m_descLabel

◆ m_description

wxString TEMPLATE_WIDGET::m_description
protected

Definition at line 116 of file dialog_template_selector.h.

Referenced by GetDescription(), OnSize(), and SetDescription().

◆ m_dialog

DIALOG_TEMPLATE_SELECTOR* TEMPLATE_WIDGET::m_dialog
protected

◆ m_panel

wxPanel* TEMPLATE_WIDGET::m_panel
protected

Definition at line 113 of file dialog_template_selector.h.

◆ m_parent

wxWindow* TEMPLATE_WIDGET::m_parent
protected

Definition at line 112 of file dialog_template_selector.h.

Referenced by TEMPLATE_WIDGET().

◆ m_selected

bool TEMPLATE_WIDGET::m_selected
protected

Definition at line 114 of file dialog_template_selector.h.

Referenced by IsSelected(), Select(), SelectWithoutStateChange(), and Unselect().

◆ m_titleLabel


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