Example #1
0
 def reset(self):
     self.clear_teams()
     CC = CameraControl()
     CC.connectToAllHosts()       
     CC.startMotionDetection()
Example #2
0
        y2 = int(y2)
        gl.addTeam(x1, x2, y1, y2, id = name, label = label )

    def remove_team(self):
        ans, ok = QtGui.QInputDialog.getText(self, "Remove Team", "Enter the team's ID'")
        if ok and len(ans) > 0:
            gl.removeTeam(ans)

    def reset(self):
        self.clear_teams()
        CC = CameraControl()
        CC.connectToAllHosts()       
        CC.startMotionDetection()

if __name__ == "__main__":
    app = QtGui.QApplication(sys.argv)

    CC = CameraControl()
    CC.connectToAllHosts()       
    CC.startMotionDetection()
    mySW = ControlMainWindow()
    # for i in xrange(5):
    #    mySW.insert_team("0:hi" + str(i) + ":129,67:272,157")
    mySW.insert_team("0:team1" + ":0,0:100,100")
    mySW.insert_team("0:team2" + ":100,100:200,200")
    mySW.insert_team("0:team3" + ":150,100:150,250")
    mySW.insert_team("0:team4" + ":200,100:300,300")
    mySW.show()
    sys.exit(app.exec_())