Changed painter, add visual studio project.
This commit is contained in:
@@ -194,11 +194,38 @@ void BCValueDelegate::paintButtonIndicator(QPainter* painter, const QStyleOption
|
||||
|
||||
}
|
||||
|
||||
void BCValueDelegate::paintSliderIndicator(QPainter* painter, const QStyleOptionViewItem& option, const BCValue& bcValue) const
|
||||
{
|
||||
double ratio = bcValue.calcMinMaxRatio();
|
||||
qDebug() << " --- paint: " << bcValue.label() << ":" << ratio;
|
||||
|
||||
// Text und kleiner Slider-Indikator zeichnen
|
||||
painter->save();
|
||||
painter->setRenderHint(QPainter::Antialiasing);
|
||||
|
||||
int adjX = option.rect.width() - cTextBlockOffset;
|
||||
|
||||
// Mini Progress Bar: der Gesamtbereich
|
||||
QRect barRect = option.rect.adjusted( adjX, 12, -10-24, -12 );
|
||||
painter->setPen(Qt::NoPen);
|
||||
painter->setBrush(QColor(0xE0E0E0));
|
||||
painter->drawRoundedRect(barRect, 2, 2);
|
||||
|
||||
// Mini Progress Bar: der Wertebereich
|
||||
barRect.setWidth( ratio * barRect.width() );
|
||||
painter->setBrush(QColor(0x0078D4));
|
||||
painter->drawRoundedRect(barRect, 2, 2);
|
||||
|
||||
painter->restore();
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Zeichnet eine passiven Slider, um den möglichen Wertebereich des übergebenen BCValue anzuzeigen.
|
||||
*/
|
||||
|
||||
void BCValueDelegate::paintSliderIndicator(QPainter* painter, const QStyleOptionViewItem& option, const BCValue& bcValue) const
|
||||
void BCValueDelegate::paintSliderIndicatorXX(QPainter* painter, const QStyleOptionViewItem& option, const BCValue& bcValue) const
|
||||
{
|
||||
// Text und kleiner Slider-Indikator zeichnen
|
||||
painter->save();
|
||||
@@ -213,7 +240,8 @@ void BCValueDelegate::paintSliderIndicator(QPainter* painter, const QStyleOption
|
||||
|
||||
|
||||
double ratio = bcValue.calcMinMaxRatio();
|
||||
if( ratio)
|
||||
qDebug() << " --- paint: " << bcValue.label() << ":" << ratio;
|
||||
if(ratio)
|
||||
{
|
||||
// Mini Progress Bar: der Gesamtbereich
|
||||
painter->setPen(Qt::NoPen);
|
||||
|
||||
Reference in New Issue
Block a user