CommunitiesNode.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:ECoG-ClusterFlow 作者: sugeerth 项目源码 文件源码
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.Centrality[i]*100)
            radius = 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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号