clQmlCircularBar::clQmlCircularBar(QQuickPaintedItem *parent) : QQuickPaintedItem(parent) { __horizontalDepth = 10; __start_angle = 180; __span_angle = 0; __color = "white"; __barImage = QImage("bar_active.png"); //update painting of the shape upon changes of properties. connect(this, SIGNAL(colorChanged()), this, SLOT(update())); connect(this, SIGNAL(depthChanged()), this, SLOT(update())); connect(this, SIGNAL(startAngleChanged()), this, SLOT(update())); connect(this, SIGNAL(spanAngleChanged()), this, SLOT(update())); connect(this, SIGNAL(progressChanged()), this, SLOT(update())); }
void PieSlice::setStartAngle(int angle){ this->v_startAngle = angle; update(); emit startAngleChanged(); }