Exemplo n.º 1
0
    def __init__ (self, parent):
        super(_RoadmapTab, self).__init__ (parent)
        self.plugin = parent
        box = QtGui.QGridLayout(self)

        box.addWidget(QtGui.QLabel("Number of nodes:"), 0, 0)
        self.nbNode = QtGui.QLabel()
        box.addWidget(self.nbNode, 0, 1)

        box.addWidget(QtGui.QLabel("Number of edges:"), 1, 0)
        self.nbEdge = QtGui.QLabel()
        box.addWidget(self.nbEdge, 1, 1)

        box.addWidget(QtGui.QLabel("Number of connected components :"), 2, 0)
        self.nbComponent = QtGui.QLabel()
        box.addWidget(self.nbComponent, 2, 1)

        self.updateCB = QtGui.QCheckBox("Continuous update")
        box.addWidget(self.updateCB, 3, 2, 1, 2)
        self.updateCB.setTristate(False)

        self.timer = Qt.QTimer(self)
        self.timer.setInterval(500)
        self.timer.setSingleShot(False)

        self.timer.connect("timeout()", self.updateCount)
        self.updateCB.connect("stateChanged(int)", self.startStopTimer)
Exemplo n.º 2
0
    def __init__ (self, plugin):
        self.plugin = plugin
        self.qcp = self.plugin.qcpWidget
        self.timer = Qt.QTimer()
        self.timer.setSingleShot(True)

        self.pathLength = -1
        self.dl = -1
        self.pathId = -1
Exemplo n.º 3
0
    def __init__(self, plugin):
        super(Plot, self).__init__(self)
        self.plugin = plugin

        self.qcp = QCustomPlot()
        layout = QtGui.QVBoxLayout(self)
        layout.addWidget(self.qcp)
        self.qcp.setInteraction(1, True)  # iRangeDrag
        self.qcp.setInteraction(2, True)  # iRangeZoom
        self.qcp.setAutoAddPlottableToLegend(True)
        self.qcp.legend().setVisible(True)

        self.timer = Qt.QTimer(self)
        self.timer.setSingleShot(False)
        self.timer.setInterval(100)
        self.timer.connect(Qt.SIGNAL("timeout()"), self._step)