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

KISTATUSBAR is a wxStatusBar suitable for Kicad manager. More...

#include <kistatusbar.h>

Inheritance diagram for KISTATUSBAR:

Public Member Functions

 KISTATUSBAR (int aNumberFields, wxWindow *parent, wxWindowID id)
 
 ~KISTATUSBAR ()
 
void SetEllipsedTextField (const wxString &aText, int aFieldId)
 Set the text in a field using wxELLIPSIZE_MIDDLE option to adjust the text size to the field size.
 
void ShowBackgroundProgressBar (bool aCancellable=false)
 Show the background progress bar.
 
void HideBackgroundProgressBar ()
 Hide the background progress bar.
 
void SetBackgroundProgress (int aAmount)
 Set the current progress of the progress bar.
 
void SetBackgroundProgressMax (int aAmount)
 Set the max progress of the progress bar.
 
void SetBackgroundStatusText (const wxString &aTxt)
 Set the status text that displays next to the progress bar.
 
void SetNotificationCount (int aCount)
 Set the notification count on the notifications button.
 

Private Member Functions

void onSize (wxSizeEvent &aEvent)
 
void onBackgroundProgressClick (wxMouseEvent &aEvent)
 
void onNotificationsIconClick (wxCommandEvent &aEvent)
 

Private Attributes

wxGauge * m_backgroundProgressBar
 
wxButton * m_backgroundStopButton
 
wxStaticText * m_backgroundTxt
 
BITMAP_BUTTONm_notificationsButton
 
int m_normalFieldsCount
 

Detailed Description

KISTATUSBAR is a wxStatusBar suitable for Kicad manager.

It displays the fields needed by the caller, and room for 4 other fields (see kistatusbar.cpp) Background text (FIELD_OFFSET_BGJOB_TEXT offset id) Background gauge widget (FIELD_OFFSET_BGJOB_GAUGE offset id) Background background stop button (FIELD_OFFSET_BGJOB_CANCEL offset id) Background notifications button (FIELD_OFFSET_NOTIFICATION_BUTTON offset id)

Definition at line 44 of file kistatusbar.h.

Constructor & Destructor Documentation

◆ KISTATUSBAR()

◆ ~KISTATUSBAR()

KISTATUSBAR::~KISTATUSBAR ( )

Member Function Documentation

◆ HideBackgroundProgressBar()

void KISTATUSBAR::HideBackgroundProgressBar ( )

Hide the background progress bar.

Definition at line 187 of file kistatusbar.cpp.

References m_backgroundProgressBar, and m_backgroundStopButton.

Referenced by KISTATUSBAR().

◆ onBackgroundProgressClick()

void KISTATUSBAR::onBackgroundProgressClick ( wxMouseEvent &  aEvent)
private

◆ onNotificationsIconClick()

void KISTATUSBAR::onNotificationsIconClick ( wxCommandEvent &  aEvent)
private

◆ onSize()

◆ SetBackgroundProgress()

void KISTATUSBAR::SetBackgroundProgress ( int  aAmount)

Set the current progress of the progress bar.

Definition at line 194 of file kistatusbar.cpp.

References m_backgroundProgressBar.

◆ SetBackgroundProgressMax()

void KISTATUSBAR::SetBackgroundProgressMax ( int  aAmount)

Set the max progress of the progress bar.

Definition at line 200 of file kistatusbar.cpp.

References m_backgroundProgressBar.

◆ SetBackgroundStatusText()

void KISTATUSBAR::SetBackgroundStatusText ( const wxString &  aTxt)

Set the status text that displays next to the progress bar.

Definition at line 206 of file kistatusbar.cpp.

References m_backgroundTxt.

◆ SetEllipsedTextField()

void KISTATUSBAR::SetEllipsedTextField ( const wxString &  aText,
int  aFieldId 
)

Set the text in a field using wxELLIPSIZE_MIDDLE option to adjust the text size to the field size.

Note
Unfortunately, setting the wxStatusBar style to wxELLIPSIZE_MIDDLE does not work.

Definition at line 228 of file kistatusbar.cpp.

References KIUI::GetTextSize().

Referenced by PROJECT_TREE_PANE::FileWatcherReset(), KICAD_MANAGER_FRAME::OnSize(), and KICAD_MANAGER_FRAME::PrintPrjInfo().

◆ SetNotificationCount()

void KISTATUSBAR::SetNotificationCount ( int  aCount)

Set the notification count on the notifications button.

A value of 0 will hide the count.

Definition at line 212 of file kistatusbar.cpp.

References m_notificationsButton, Refresh(), and BITMAP_BUTTON::SetBadgeText().

Referenced by NOTIFICATIONS_MANAGER::RegisterStatusBar().

◆ ShowBackgroundProgressBar()

void KISTATUSBAR::ShowBackgroundProgressBar ( bool  aCancellable = false)

Show the background progress bar.

Definition at line 176 of file kistatusbar.cpp.

References m_backgroundProgressBar, and m_backgroundStopButton.

Member Data Documentation

◆ m_backgroundProgressBar

◆ m_backgroundStopButton

wxButton* KISTATUSBAR::m_backgroundStopButton
private

◆ m_backgroundTxt

wxStaticText* KISTATUSBAR::m_backgroundTxt
private

Definition at line 99 of file kistatusbar.h.

Referenced by KISTATUSBAR(), onSize(), and SetBackgroundStatusText().

◆ m_normalFieldsCount

int KISTATUSBAR::m_normalFieldsCount
private

Definition at line 101 of file kistatusbar.h.

Referenced by onBackgroundProgressClick(), onNotificationsIconClick(), and onSize().

◆ m_notificationsButton

BITMAP_BUTTON* KISTATUSBAR::m_notificationsButton
private

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