def drawSubClustersTheme(self, painter,option, Radius):
Clusters = len(self.correspondingNodes)
step = float(math.pi/Clusters)
Radius = self.radius
angle = 0.0
c = 0
for i in self.correspondingNodes:
painter.setBrush(self.CommunityColor)
painter.setPen(QtGui.QPen(QtCore.Qt.black, 0))
# radius = float(self.graphWidget.widget.communityDetectionEngine.Centrality[i]*100)
radius = self.X_Size*10
Thickness = float(radius) * 2
if (option.state & QtGui.QStyle.State_Selected):
painter.drawRect(-12, -12, 25, Thickness)
else:
painter.drawRect(-12, -12, 20, Thickness)
# x = Radius * math.sin((2*c*math.pi)/Clusters)
# y = Radius * math.cos((2*c*math.pi)/Clusters)
# c = c + 1
# # print radiuss
# painter.drawEllipse(x,y,radius, radius)
# angle = angle + step
# Drawing the CirclePath Should denote a value
评论列表
文章目录