KiCad PCB EDA Suite
PNS_TUNE_STATUS_POPUP Class Reference

#include <pns_tune_status_popup.h>

Inheritance diagram for PNS_TUNE_STATUS_POPUP:
WX_STATUS_POPUP

Public Member Functions

 PNS_TUNE_STATUS_POPUP (PCB_EDIT_FRAME *aParent)
 
 ~PNS_TUNE_STATUS_POPUP ()
 
void UpdateStatus (PNS::ROUTER *aRouter)
 
virtual void Popup (wxWindow *aFocus=NULL)
 
virtual void Move (const wxPoint &aWhere)
 

Protected Member Functions

void updateSize ()
 

Protected Attributes

wxPanel * m_panel
 
wxBoxSizer * m_topSizer
 

Private Attributes

wxStaticText * m_statusLine
 

Detailed Description

Definition at line 37 of file pns_tune_status_popup.h.

Constructor & Destructor Documentation

PNS_TUNE_STATUS_POPUP::PNS_TUNE_STATUS_POPUP ( PCB_EDIT_FRAME aParent)

Definition at line 26 of file pns_tune_status_popup.cpp.

References WX_STATUS_POPUP::m_panel, m_statusLine, and WX_STATUS_POPUP::m_topSizer.

26  :
27  WX_STATUS_POPUP( aParent )
28 {
29  m_panel->SetBackgroundColour( wxColour( 64, 64, 64 ) );
30  m_statusLine = new wxStaticText( m_panel, wxID_ANY, wxEmptyString ) ;
31  m_topSizer->Add( m_statusLine, 1, wxALL | wxEXPAND, 5 );
32 }
wxBoxSizer * m_topSizer
WX_STATUS_POPUP(PCB_EDIT_FRAME *aParent)
Transient mouse following popup window implementation.
PNS_TUNE_STATUS_POPUP::~PNS_TUNE_STATUS_POPUP ( )

Definition at line 35 of file pns_tune_status_popup.cpp.

36 {
37 }

Member Function Documentation

void WX_STATUS_POPUP::Move ( const wxPoint aWhere)
virtualinherited

Definition at line 62 of file wx_status_popup.cpp.

References PCAD2KICAD::SetPosition().

Referenced by LENGTH_TUNER_TOOL::updateStatusPopup().

63 {
64  SetPosition ( aWhere );
65 }
void SetPosition(wxString aStr, wxString aDefaultMeasurementUnit, int *aX, int *aY, wxString aActualConversion)
void WX_STATUS_POPUP::Popup ( wxWindow *  aFocus = NULL)
virtualinherited

Definition at line 55 of file wx_status_popup.cpp.

Referenced by LENGTH_TUNER_TOOL::performTuning().

56 {
57  Show( true );
58  Raise();
59 }
void WX_STATUS_POPUP::updateSize ( )
protectedinherited

Definition at line 43 of file wx_status_popup.cpp.

References WX_STATUS_POPUP::m_panel, and WX_STATUS_POPUP::m_topSizer.

Referenced by UpdateStatus().

44 {
45  m_topSizer->Fit( m_panel );
46  SetClientSize( m_panel->GetSize() );
47 }
wxBoxSizer * m_topSizer
void PNS_TUNE_STATUS_POPUP::UpdateStatus ( PNS::ROUTER aRouter)

Definition at line 40 of file pns_tune_status_popup.cpp.

References m_statusLine, PNS::ROUTER::Placer(), PNS::MEANDER_PLACER_BASE::TOO_LONG, PNS::MEANDER_PLACER_BASE::TOO_SHORT, PNS::MEANDER_PLACER_BASE::TUNED, PNS::MEANDER_PLACER_BASE::TuningInfo(), PNS::MEANDER_PLACER_BASE::TuningStatus(), and WX_STATUS_POPUP::updateSize().

Referenced by LENGTH_TUNER_TOOL::updateStatusPopup().

41 {
42  PNS::MEANDER_PLACER_BASE* placer = dynamic_cast<PNS::MEANDER_PLACER_BASE*>( aRouter->Placer() );
43 
44  if( !placer )
45  return;
46 
47  m_statusLine->SetLabel( placer->TuningInfo() );
48 
49  wxColour color;
50 
51  switch( placer->TuningStatus() )
52  {
54  color = wxColour( 0, 255, 0 );
55  break;
57  color = wxColour( 255, 128, 128 );
58  break;
60  color = wxColour( 128, 128, 255 );
61  break;
62  }
63 
64  m_statusLine->SetForegroundColour( color );
65 
66  updateSize();
67 }
Class MEANDER_PLACER_BASE.
virtual const wxString TuningInfo() const =0
Function TuningInfo()
PLACEMENT_ALGO * Placer()
Definition: pns_router.h:207
virtual TUNING_STATUS TuningStatus() const =0
Function TuningStatus()

Member Data Documentation

wxPanel* WX_STATUS_POPUP::m_panel
protectedinherited
wxStaticText* PNS_TUNE_STATUS_POPUP::m_statusLine
private

Definition at line 46 of file pns_tune_status_popup.h.

Referenced by PNS_TUNE_STATUS_POPUP(), and UpdateStatus().

wxBoxSizer* WX_STATUS_POPUP::m_topSizer
protectedinherited

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