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

A widget for browsing a rich text error/status report. More...

#include <wx_html_report_panel.h>

Inheritance diagram for WX_HTML_REPORT_PANEL:
WX_HTML_REPORT_PANEL_BASE

Classes

struct  REPORT_LINE
 

Public Member Functions

 WX_HTML_REPORT_PANEL (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(500, 300), long style=wxTAB_TRAVERSAL)
 
 ~WX_HTML_REPORT_PANEL ()
 
void MsgPanelSetMinSize (const wxSize &aMinSize)
 Set the min size of the area which displays html messages.
 
REPORTERReporter ()
 Return the reporter object that reports to this panel.
 
void Report (const wxString &aText, SEVERITY aSeverity, REPORTER::LOCATION aLocation=REPORTER::LOC_BODY)
 Report the string.
 
void Clear ()
 Clears the report panel.
 
int Count (int severityMask)
 Return the number of messages matching the given severity mask.
 
void SetLabel (const wxString &aLabel) override
 Set the frame label.
 
void SetLazyUpdate (bool aLazyUpdate)
 Set the lazy update.
 
void Flush (bool aSort=false)
 Force updating the HTML page, after the report is built in lazy mode If aSort = true, the body messages will be ordered by severity.
 
int GetVisibleSeverities () const
 
void SetFileName (const wxString &aReportFileName)
 Set the report full file name to the string.
 
wxString & GetFileName (void)
 

Protected Attributes

wxStaticBoxSizer * m_box
 
wxFlexGridSizer * m_fgSizer
 
HTML_WINDOWm_htmlView
 
wxStaticText * m_staticTextShow
 
wxCheckBox * m_checkBoxShowAll
 
wxCheckBox * m_checkBoxShowErrors
 
NUMBER_BADGEm_errorsBadge
 
wxCheckBox * m_checkBoxShowWarnings
 
NUMBER_BADGEm_warningsBadge
 
wxCheckBox * m_checkBoxShowActions
 
wxCheckBox * m_checkBoxShowInfos
 
wxButton * m_btnSaveReportToFile
 

Private Types

typedef std::vector< REPORT_LINEREPORT_LINES
 

Private Member Functions

wxString generateHtml (const REPORT_LINE &aLine)
 
wxString generatePlainText (const REPORT_LINE &aLine)
 
void updateBadges ()
 
void scrollToBottom ()
 
void onRightClick (wxMouseEvent &event) override
 
void onMenuEvent (wxMenuEvent &event)
 
void onCheckBox (wxCommandEvent &event) override
 
void onBtnSaveToFile (wxCommandEvent &event) override
 
void onThemeChanged (wxSysColourChangedEvent &aEvent)
 

Private Attributes

WX_HTML_PANEL_REPORTER m_reporter
 
REPORT_LINES m_report
 copy of the report, stored for filtering
 
REPORT_LINES m_reportTail
 Lines to print at the end, regardless of sorting.
 
REPORT_LINES m_reportHead
 ... and at the beginning, regardless of sorting
 
bool m_lazyUpdate
 
wxString m_reportFileName
 defaults to the not very useful /bin/report.txt
 

Detailed Description

A widget for browsing a rich text error/status report.

Used in numerous dialogs in Eeschema and Pcbnew. Provides error filtering functionality and saving report files. The messages are reported through a REPORTER object

Definition at line 61 of file wx_html_report_panel.h.

Member Typedef Documentation

◆ REPORT_LINES

typedef std::vector<REPORT_LINE> WX_HTML_REPORT_PANEL::REPORT_LINES
private

Definition at line 119 of file wx_html_report_panel.h.

Constructor & Destructor Documentation

◆ WX_HTML_REPORT_PANEL()

WX_HTML_REPORT_PANEL::WX_HTML_REPORT_PANEL ( wxWindow *  parent,
wxWindowID  id = wxID_ANY,
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxSize( 500, 300 ),
long  style = wxTAB_TRAVERSAL 
)

◆ ~WX_HTML_REPORT_PANEL()

WX_HTML_REPORT_PANEL::~WX_HTML_REPORT_PANEL ( )

Definition at line 56 of file wx_html_report_panel.cpp.

Member Function Documentation

◆ Clear()

◆ Count()

int WX_HTML_REPORT_PANEL::Count ( int  severityMask)

Return the number of messages matching the given severity mask.

Definition at line 152 of file wx_html_report_panel.cpp.

References m_report, m_reportHead, and m_reportTail.

Referenced by WX_HTML_PANEL_REPORTER::HasMessageOfSeverity(), and updateBadges().

◆ Flush()

◆ generateHtml()

◆ generatePlainText()

wxString WX_HTML_REPORT_PANEL::generatePlainText ( const REPORT_LINE aLine)
private

◆ GetFileName()

wxString & WX_HTML_REPORT_PANEL::GetFileName ( void  )
inline
Returns
reference to the current report fill file name string.

Definition at line 110 of file wx_html_report_panel.h.

◆ GetVisibleSeverities()

◆ MsgPanelSetMinSize()

void WX_HTML_REPORT_PANEL::MsgPanelSetMinSize ( const wxSize &  aMinSize)

Set the min size of the area which displays html messages.

Definition at line 69 of file wx_html_report_panel.cpp.

References WX_HTML_REPORT_PANEL_BASE::m_fgSizer.

Referenced by DIALOG_ANNOTATE::DIALOG_ANNOTATE(), and DIALOG_GEN_FOOTPRINT_POSITION::DIALOG_GEN_FOOTPRINT_POSITION().

◆ onBtnSaveToFile()

void WX_HTML_REPORT_PANEL::onBtnSaveToFile ( wxCommandEvent &  event)
overrideprivatevirtual

◆ onCheckBox()

void WX_HTML_REPORT_PANEL::onCheckBox ( wxCommandEvent &  event)
overrideprivatevirtual

◆ onMenuEvent()

void WX_HTML_REPORT_PANEL::onMenuEvent ( wxMenuEvent &  event)
private

Definition at line 249 of file wx_html_report_panel.cpp.

References WX_HTML_REPORT_PANEL_BASE::m_htmlView.

Referenced by WX_HTML_REPORT_PANEL().

◆ onRightClick()

void WX_HTML_REPORT_PANEL::onRightClick ( wxMouseEvent &  event)
overrideprivatevirtual

Reimplemented from WX_HTML_REPORT_PANEL_BASE.

Definition at line 241 of file wx_html_report_panel.cpp.

◆ onThemeChanged()

void WX_HTML_REPORT_PANEL::onThemeChanged ( wxSysColourChangedEvent &  aEvent)
private

Definition at line 61 of file wx_html_report_panel.cpp.

References Flush().

Referenced by WX_HTML_REPORT_PANEL().

◆ Report()

◆ Reporter()

◆ scrollToBottom()

void WX_HTML_REPORT_PANEL::scrollToBottom ( )
private

Definition at line 130 of file wx_html_report_panel.cpp.

References WX_HTML_REPORT_PANEL_BASE::m_htmlView, and updateBadges().

Referenced by Flush(), and Report().

◆ SetFileName()

◆ SetLabel()

◆ SetLazyUpdate()

void WX_HTML_REPORT_PANEL::SetLazyUpdate ( bool  aLazyUpdate)
inline

Set the lazy update.

If this mode is on, messages are stored but the display is not updated (Updating display can be very time consuming if there are many messages) A call to Flush() will be needed after build the report

Definition at line 96 of file wx_html_report_panel.h.

Referenced by DIALOG_CHANGE_SYMBOLS::DIALOG_CHANGE_SYMBOLS(), DIALOG_EXCHANGE_FOOTPRINTS::DIALOG_EXCHANGE_FOOTPRINTS(), DIALOG_IBIS_PARSER_REPORTER::DIALOG_IBIS_PARSER_REPORTER(), DIALOG_UPDATE_FROM_PCB::DIALOG_UPDATE_FROM_PCB(), DIALOG_UPDATE_PCB::DIALOG_UPDATE_PCB(), DIALOG_IMPORT_NETLIST::loadNetlist(), DIALOG_ANNOTATE::OnAnnotateClick(), and DIALOG_BOARD_REANNOTATE::OnApplyClick().

◆ updateBadges()

Member Data Documentation

◆ m_box

wxStaticBoxSizer* WX_HTML_REPORT_PANEL_BASE::m_box
protectedinherited

◆ m_btnSaveReportToFile

wxButton* WX_HTML_REPORT_PANEL_BASE::m_btnSaveReportToFile
protectedinherited

◆ m_checkBoxShowActions

wxCheckBox* WX_HTML_REPORT_PANEL_BASE::m_checkBoxShowActions
protectedinherited

◆ m_checkBoxShowAll

wxCheckBox* WX_HTML_REPORT_PANEL_BASE::m_checkBoxShowAll
protectedinherited

◆ m_checkBoxShowErrors

wxCheckBox* WX_HTML_REPORT_PANEL_BASE::m_checkBoxShowErrors
protectedinherited

◆ m_checkBoxShowInfos

wxCheckBox* WX_HTML_REPORT_PANEL_BASE::m_checkBoxShowInfos
protectedinherited

◆ m_checkBoxShowWarnings

wxCheckBox* WX_HTML_REPORT_PANEL_BASE::m_checkBoxShowWarnings
protectedinherited

◆ m_errorsBadge

NUMBER_BADGE* WX_HTML_REPORT_PANEL_BASE::m_errorsBadge
protectedinherited

◆ m_fgSizer

wxFlexGridSizer* WX_HTML_REPORT_PANEL_BASE::m_fgSizer
protectedinherited

◆ m_htmlView

◆ m_lazyUpdate

bool WX_HTML_REPORT_PANEL::m_lazyUpdate
private

Definition at line 142 of file wx_html_report_panel.h.

Referenced by Report().

◆ m_report

REPORT_LINES WX_HTML_REPORT_PANEL::m_report
private

copy of the report, stored for filtering

Definition at line 138 of file wx_html_report_panel.h.

Referenced by Clear(), Count(), Flush(), onBtnSaveToFile(), and Report().

◆ m_reporter

WX_HTML_PANEL_REPORTER WX_HTML_REPORT_PANEL::m_reporter
private

Definition at line 136 of file wx_html_report_panel.h.

Referenced by Reporter().

◆ m_reportFileName

wxString WX_HTML_REPORT_PANEL::m_reportFileName
private

defaults to the not very useful /bin/report.txt

Definition at line 144 of file wx_html_report_panel.h.

Referenced by onBtnSaveToFile().

◆ m_reportHead

REPORT_LINES WX_HTML_REPORT_PANEL::m_reportHead
private

... and at the beginning, regardless of sorting

Definition at line 140 of file wx_html_report_panel.h.

Referenced by Clear(), Count(), Flush(), onBtnSaveToFile(), and Report().

◆ m_reportTail

REPORT_LINES WX_HTML_REPORT_PANEL::m_reportTail
private

Lines to print at the end, regardless of sorting.

Definition at line 139 of file wx_html_report_panel.h.

Referenced by Clear(), Count(), Flush(), onBtnSaveToFile(), and Report().

◆ m_staticTextShow

wxStaticText* WX_HTML_REPORT_PANEL_BASE::m_staticTextShow
protectedinherited

◆ m_warningsBadge

NUMBER_BADGE* WX_HTML_REPORT_PANEL_BASE::m_warningsBadge
protectedinherited

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