KiCad PCB EDA Suite
|
KISTATUSBAR is a wxStatusBar suitable for Kicad manager. More...
#include <kistatusbar.h>
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 (unfortunately, setting the wxStatusBar style to wxELLIPSIZE_MIDDLE does not work fine. | |
void | ShowBackgroundProgressBar (bool aCancellable=false) |
Shows the background progress bar. | |
void | HideBackgroundProgressBar () |
Hides the background progress bar. | |
void | SetBackgroundProgress (int aAmount) |
Sets the current progress of the progress bar. | |
void | SetBackgroundProgressMax (int aAmount) |
Sets the maX progress of the progress bar. | |
void | SetBackgroundStatusText (const wxString &aTxt) |
Sets the status text that displays next to the progress bar. | |
void | SetNotificationCount (int aCount) |
Sets the notification count on the notifications button A value of 0 will hide the count. | |
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_BUTTON * | m_notificationsButton |
int | m_normalFieldsCount |
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.
KISTATUSBAR::KISTATUSBAR | ( | int | aNumberFields, |
wxWindow * | parent, | ||
wxWindowID | id | ||
) |
Definition at line 44 of file kistatusbar.cpp.
References FIELD_OFFSET_BGJOB_CANCEL, FIELD_OFFSET_BGJOB_GAUGE, FIELD_OFFSET_BGJOB_TEXT, FIELD_OFFSET_NOTIFICATION_BUTTON, HideBackgroundProgressBar(), KiBitmapBundle(), m_backgroundProgressBar, m_backgroundStopButton, m_backgroundTxt, m_notificationsButton, onBackgroundProgressClick(), onNotificationsIconClick(), onSize(), BITMAP_BUTTON::SetBitmap(), BITMAP_BUTTON::SetBitmapCentered(), BITMAP_BUTTON::SetPadding(), and BITMAP_BUTTON::SetShowBadge().
KISTATUSBAR::~KISTATUSBAR | ( | ) |
Definition at line 110 of file kistatusbar.cpp.
References m_backgroundProgressBar, m_notificationsButton, onBackgroundProgressClick(), onNotificationsIconClick(), and onSize().
void KISTATUSBAR::HideBackgroundProgressBar | ( | ) |
Hides the background progress bar.
Definition at line 186 of file kistatusbar.cpp.
References m_backgroundProgressBar, and m_backgroundStopButton.
Referenced by KISTATUSBAR().
|
private |
Definition at line 131 of file kistatusbar.cpp.
References PGM_BASE::GetBackgroundJobMonitor(), m_backgroundProgressBar, m_normalFieldsCount, Pgm(), and BACKGROUND_JOBS_MONITOR::ShowList().
Referenced by KISTATUSBAR(), and ~KISTATUSBAR().
|
private |
Definition at line 119 of file kistatusbar.cpp.
References PGM_BASE::GetNotificationsManager(), m_normalFieldsCount, m_notificationsButton, Pgm(), and NOTIFICATIONS_MANAGER::ShowList().
Referenced by KISTATUSBAR(), and ~KISTATUSBAR().
|
private |
Definition at line 142 of file kistatusbar.cpp.
References FIELD_OFFSET_BGJOB_GAUGE, FIELD_OFFSET_BGJOB_TEXT, FIELD_OFFSET_NOTIFICATION_BUTTON, m_backgroundProgressBar, m_backgroundStopButton, m_backgroundTxt, m_normalFieldsCount, and m_notificationsButton.
Referenced by KISTATUSBAR(), and ~KISTATUSBAR().
void KISTATUSBAR::SetBackgroundProgress | ( | int | aAmount | ) |
Sets the current progress of the progress bar.
Definition at line 193 of file kistatusbar.cpp.
References m_backgroundProgressBar.
void KISTATUSBAR::SetBackgroundProgressMax | ( | int | aAmount | ) |
Sets the maX progress of the progress bar.
Definition at line 199 of file kistatusbar.cpp.
References m_backgroundProgressBar.
void KISTATUSBAR::SetBackgroundStatusText | ( | const wxString & | aTxt | ) |
Sets the status text that displays next to the progress bar.
Definition at line 205 of file kistatusbar.cpp.
References m_backgroundTxt.
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 (unfortunately, setting the wxStatusBar style to wxELLIPSIZE_MIDDLE does not work fine.
Definition at line 226 of file kistatusbar.cpp.
References KIUI::GetTextSize().
Referenced by PROJECT_TREE_PANE::FileWatcherReset(), KICAD_MANAGER_FRAME::OnSize(), and KICAD_MANAGER_FRAME::PrintPrjInfo().
void KISTATUSBAR::SetNotificationCount | ( | int | aCount | ) |
Sets the notification count on the notifications button A value of 0 will hide the count.
Definition at line 211 of file kistatusbar.cpp.
References m_notificationsButton, Refresh(), and BITMAP_BUTTON::SetBadgeText().
Referenced by NOTIFICATIONS_MANAGER::RegisterStatusBar().
void KISTATUSBAR::ShowBackgroundProgressBar | ( | bool | aCancellable = false | ) |
Shows the background progress bar.
Definition at line 175 of file kistatusbar.cpp.
References m_backgroundProgressBar, and m_backgroundStopButton.
|
private |
Definition at line 95 of file kistatusbar.h.
Referenced by HideBackgroundProgressBar(), KISTATUSBAR(), onBackgroundProgressClick(), onSize(), SetBackgroundProgress(), SetBackgroundProgressMax(), ShowBackgroundProgressBar(), and ~KISTATUSBAR().
|
private |
Definition at line 96 of file kistatusbar.h.
Referenced by HideBackgroundProgressBar(), KISTATUSBAR(), onSize(), and ShowBackgroundProgressBar().
|
private |
Definition at line 97 of file kistatusbar.h.
Referenced by KISTATUSBAR(), onSize(), and SetBackgroundStatusText().
|
private |
Definition at line 99 of file kistatusbar.h.
Referenced by onBackgroundProgressClick(), onNotificationsIconClick(), and onSize().
|
private |
Definition at line 98 of file kistatusbar.h.
Referenced by KISTATUSBAR(), onNotificationsIconClick(), onSize(), SetNotificationCount(), and ~KISTATUSBAR().