MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
QmitkZoneProgressBar.h
Go to the documentation of this file.
1/*============================================================================
2
3The Medical Imaging Interaction Toolkit (MITK)
4
5Copyright (c) German Cancer Research Center (DKFZ)
6All rights reserved.
7
8Use of this source code is governed by a 3-clause BSD license that can be
9found in the LICENSE file.
10
11============================================================================*/
12
13#ifndef QmitkZoneProgressBar_h
14#define QmitkZoneProgressBar_h
15
16#include <QProgressBar>
17
24class QmitkZoneProgressBar : public QProgressBar
25{
26 Q_OBJECT
27public:
37 explicit QmitkZoneProgressBar(QString name, int maxRange, int warnRange, QWidget *parent = nullptr);
38
42 void setValue(int value);
43
49 void setValueInvalid();
50
58 void SetTextFormatValid(QString format);
59
63 void SetTextFormatInvalid(QString format);
64
68 void SetColor(float color[3]);
69
73 void SetWarnColor(float color[3]);
74
78 void SetBorderColor(float color[3]);
79
80protected:
81 void UpdateStyleSheet(QString startColor, QString stopColor);
82
83 QString ColorToString(float color[3]);
84
87
90
94
95 QString m_StyleSheet;
96};
97
98#endif
QProgressBar for displaying distances to zones. Colors are changed according to the distance to the z...
void SetBorderColor(float color[3])
void setValueInvalid()
Can be called to indicate that there is currently no valid distance value available....
void SetTextFormatValid(QString format)
Setter for the text on the progress bar. Defaults to the string given as name to the constructor....
void SetColor(float color[3])
void SetTextFormatInvalid(QString format)
void SetWarnColor(float color[3])
QString ColorToString(float color[3])
void UpdateStyleSheet(QString startColor, QString stopColor)
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 def...