[3rdparty] Constness for waitingspinner
The accessors can be (should be!) const.
This commit is contained in:
parent
171a597355
commit
15dc47555a
26
3rdparty/waitingspinnerwidget.cpp
vendored
26
3rdparty/waitingspinnerwidget.cpp
vendored
@ -120,7 +120,7 @@ void WaitingSpinnerWidget::paintEvent(QPaintEvent *) {
|
|||||||
|
|
||||||
if (!_text.isEmpty()) {
|
if (!_text.isEmpty()) {
|
||||||
painter.setPen(QPen(_textColor));
|
painter.setPen(QPen(_textColor));
|
||||||
painter.drawText(QRect(0, _imageSize.height(), width(), height() - _imageSize.height()),
|
painter.drawText(QRect(0, _imageSize.height(), width(), height() - _imageSize.height()),
|
||||||
Qt::AlignBottom | Qt::AlignHCenter, _text);
|
Qt::AlignBottom | Qt::AlignHCenter, _text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -175,52 +175,52 @@ void WaitingSpinnerWidget::setInnerRadius(int radius) {
|
|||||||
updateSize();
|
updateSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
void WaitingSpinnerWidget::setText(QString text) {
|
void WaitingSpinnerWidget::setText(const QString& text) {
|
||||||
_text = text;
|
_text = text;
|
||||||
updateSize();
|
updateSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
QColor WaitingSpinnerWidget::color() {
|
QColor WaitingSpinnerWidget::color() const {
|
||||||
return _color;
|
return _color;
|
||||||
}
|
}
|
||||||
|
|
||||||
QColor WaitingSpinnerWidget::textColor() {
|
QColor WaitingSpinnerWidget::textColor() const {
|
||||||
return _textColor;
|
return _textColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString WaitingSpinnerWidget::text() {
|
QString WaitingSpinnerWidget::text() const {
|
||||||
return _text;
|
return _text;
|
||||||
}
|
}
|
||||||
|
|
||||||
qreal WaitingSpinnerWidget::roundness() {
|
qreal WaitingSpinnerWidget::roundness() const {
|
||||||
return _roundness;
|
return _roundness;
|
||||||
}
|
}
|
||||||
|
|
||||||
qreal WaitingSpinnerWidget::minimumTrailOpacity() {
|
qreal WaitingSpinnerWidget::minimumTrailOpacity() const {
|
||||||
return _minimumTrailOpacity;
|
return _minimumTrailOpacity;
|
||||||
}
|
}
|
||||||
|
|
||||||
qreal WaitingSpinnerWidget::trailFadePercentage() {
|
qreal WaitingSpinnerWidget::trailFadePercentage() const {
|
||||||
return _trailFadePercentage;
|
return _trailFadePercentage;
|
||||||
}
|
}
|
||||||
|
|
||||||
qreal WaitingSpinnerWidget::revolutionsPersSecond() {
|
qreal WaitingSpinnerWidget::revolutionsPersSecond() const {
|
||||||
return _revolutionsPerSecond;
|
return _revolutionsPerSecond;
|
||||||
}
|
}
|
||||||
|
|
||||||
int WaitingSpinnerWidget::numberOfLines() {
|
int WaitingSpinnerWidget::numberOfLines() const {
|
||||||
return _numberOfLines;
|
return _numberOfLines;
|
||||||
}
|
}
|
||||||
|
|
||||||
int WaitingSpinnerWidget::lineLength() {
|
int WaitingSpinnerWidget::lineLength() const {
|
||||||
return _lineLength;
|
return _lineLength;
|
||||||
}
|
}
|
||||||
|
|
||||||
int WaitingSpinnerWidget::lineWidth() {
|
int WaitingSpinnerWidget::lineWidth() const {
|
||||||
return _lineWidth;
|
return _lineWidth;
|
||||||
}
|
}
|
||||||
|
|
||||||
int WaitingSpinnerWidget::innerRadius() {
|
int WaitingSpinnerWidget::innerRadius() const {
|
||||||
return _innerRadius;
|
return _innerRadius;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
24
3rdparty/waitingspinnerwidget.h
vendored
24
3rdparty/waitingspinnerwidget.h
vendored
@ -69,19 +69,19 @@ public:
|
|||||||
void setLineLength(int length);
|
void setLineLength(int length);
|
||||||
void setLineWidth(int width);
|
void setLineWidth(int width);
|
||||||
void setInnerRadius(int radius);
|
void setInnerRadius(int radius);
|
||||||
void setText(QString text);
|
void setText(const QString& text);
|
||||||
|
|
||||||
QColor color();
|
QColor color() const;
|
||||||
QColor textColor();
|
QColor textColor() const;
|
||||||
QString text();
|
QString text() const;
|
||||||
qreal roundness();
|
qreal roundness() const;
|
||||||
qreal minimumTrailOpacity();
|
qreal minimumTrailOpacity() const;
|
||||||
qreal trailFadePercentage();
|
qreal trailFadePercentage() const;
|
||||||
qreal revolutionsPersSecond();
|
qreal revolutionsPersSecond() const;
|
||||||
int numberOfLines();
|
int numberOfLines() const;
|
||||||
int lineLength();
|
int lineLength() const;
|
||||||
int lineWidth();
|
int lineWidth() const;
|
||||||
int innerRadius();
|
int innerRadius() const;
|
||||||
|
|
||||||
bool isSpinning() const;
|
bool isSpinning() const;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user