QProgressBar for displaying distances to zones. Colors are changed according to the distance to the zone and and the progress will be filled more the smaller the distance to the zone becomes.
More...
#include <QmitkZoneProgressBar.h>
|
| QmitkZoneProgressBar (QString name, int maxRange, int warnRange, QWidget *parent=nullptr) |
| Initializes the progress bar with the given name, max range and warn range. The colors are set to default values (color: red, warn color: red, border color: gray).
|
|
void | setValue (int value) |
|
void | setValueInvalid () |
| Can be called to indicate that there is currently no valid distance value available. E.g. if tracking data is not available at the moment. If there is a valid value again, the method setValue() can be called.
|
|
void | SetTextFormatValid (QString format) |
| Setter for the text on the progress bar. Defaults to the string given as name to the constructor. The format string can contain '%1' which will be replaced by the current distance value.
|
|
void | SetTextFormatInvalid (QString format) |
|
void | SetColor (float color[3]) |
|
void | SetWarnColor (float color[3]) |
|
void | SetBorderColor (float color[3]) |
|
QProgressBar for displaying distances to zones. Colors are changed according to the distance to the zone and and the progress will be filled more the smaller the distance to the zone becomes.
Definition at line 24 of file QmitkZoneProgressBar.h.
◆ QmitkZoneProgressBar()
QmitkZoneProgressBar::QmitkZoneProgressBar |
( |
QString | name, |
|
|
int | maxRange, |
|
|
int | warnRange, |
|
|
QWidget * | parent = nullptr ) |
|
explicit |
Initializes the progress bar with the given name, max range and warn range. The colors are set to default values (color: red, warn color: red, border color: gray).
- Parameters
-
name | will be shown on the progress bar |
maxRange | the progress bar will be empty for distances greater or equal to this distance |
warnRange | the progress bar will change its color for distances smaller than this distance |
Definition at line 15 of file QmitkZoneProgressBar.cpp.
◆ ColorToString()
QString QmitkZoneProgressBar::ColorToString |
( |
float | color[3] | ) |
|
|
protected |
◆ SetBorderColor()
void QmitkZoneProgressBar::SetBorderColor |
( |
float | color[3] | ) |
|
◆ SetColor()
void QmitkZoneProgressBar::SetColor |
( |
float | color[3] | ) |
|
◆ SetTextFormatInvalid()
void QmitkZoneProgressBar::SetTextFormatInvalid |
( |
QString | format | ) |
|
◆ SetTextFormatValid()
void QmitkZoneProgressBar::SetTextFormatValid |
( |
QString | format | ) |
|
Setter for the text on the progress bar. Defaults to the string given as name to the constructor. The format string can contain '%1' which will be replaced by the current distance value.
- Parameters
-
format | the text to be displayed on the progress bar |
Definition at line 79 of file QmitkZoneProgressBar.cpp.
◆ setValue()
void QmitkZoneProgressBar::setValue |
( |
int | value | ) |
|
◆ setValueInvalid()
void QmitkZoneProgressBar::setValueInvalid |
( |
| ) |
|
Can be called to indicate that there is currently no valid distance value available. E.g. if tracking data is not available at the moment. If there is a valid value again, the method setValue() can be called.
Definition at line 72 of file QmitkZoneProgressBar.cpp.
◆ SetWarnColor()
void QmitkZoneProgressBar::SetWarnColor |
( |
float | color[3] | ) |
|
- Parameters
-
color | the color, the progress bar fill changes to if the distance falls below the warn range |
Definition at line 94 of file QmitkZoneProgressBar.cpp.
◆ UpdateStyleSheet()
void QmitkZoneProgressBar::UpdateStyleSheet |
( |
QString | startColor, |
|
|
QString | stopColor ) |
|
protected |
◆ m_BorderColorString
QString QmitkZoneProgressBar::m_BorderColorString |
|
protected |
◆ m_ColorString
QString QmitkZoneProgressBar::m_ColorString |
|
protected |
◆ m_MaxRange
int QmitkZoneProgressBar::m_MaxRange |
|
protected |
◆ m_StyleSheet
QString QmitkZoneProgressBar::m_StyleSheet |
|
protected |
◆ m_TextFormatInvalid
QString QmitkZoneProgressBar::m_TextFormatInvalid |
|
protected |
◆ m_TextFormatValid
QString QmitkZoneProgressBar::m_TextFormatValid |
|
protected |
◆ m_WarnColorString
QString QmitkZoneProgressBar::m_WarnColorString |
|
protected |
◆ m_WarnRange
int QmitkZoneProgressBar::m_WarnRange |
|
protected |
The documentation for this class was generated from the following files: