fixed BarGauge class using setparentItem()