Ejemplo n.º 1
0
class MyDialog(QtGui.QDialog):
	def __init__(self, parent=None):
		QtGui.QWidget.__init__(self, parent)
		self.ui = Ui_Dialog()
		self.ui.setupUi(self)
		self.ui.pushButton.clicked.connect(self.dl)
		self.ui.lineEdit.textChanged.connect(self.labeler)
		
	def labeler(self):
		s = ""
		with urllib.request.urlopen(self.ui.lineEdit.text()) as url:
			s += str(url.read())
		soup = BeautifulSoup(s, 'html.parser')
		#print(soup.prettify())
		souper = soup.findAll(name='img')
		if 'data-thumb' in souper[1].string:
			print("True")
		#print(souper)
		#self.ui.label.setText(soup.title.string)
		#self.ui.label.repaint()
	
	def dl(self):
		print(self.ui.lineEdit.text())
		if self.ui.checkBox.isChecked():
			os.system('youtube-dl.exe -x --audio-format mp3 '+ self.ui.lineEdit.text())
		else:
			os.system('youtube-dl.exe -e --get-description '+ self.ui.lineEdit.text())
Ejemplo n.º 2
0
class MyDialog(QtGui.QDialog):
    def __init__(self, parent=None):
        QtGui.QWidget.__init__(self, parent)

        image = QtGui.QLabel(self)
        image.setGeometry(50, -100, 300, 300)
        pixmap = QtGui.QPixmap("./logo.png")
        image.setPixmap(pixmap)
        image.show()

        image2 = QtGui.QLabel(self)
        image2.setGeometry(75, 125, 300, 300)
        pixmap2 = QtGui.QPixmap("./cplogo.png")
        image2.setPixmap(pixmap2)
        image2.show()

        self.ui = Ui_Dialog()
        self.ui.setupUi(self)
        self.ui.pushButton.clicked.connect(self.login)

    def login(self):
        ret = login(self.ui.lineEdit.text(), self.ui.lineEdit_2.text())
        if (ret == "ok"):
            boxy = QMessageBox()
            boxy.setText("Connected to SRM Networks!")
            boxy.exec_()
Ejemplo n.º 3
0
 def __init__(self, parent=None):
     QWidget.__init__(self, parent)
     # UI olarak form.py'deki Ui_Dialog'u kullan
     self.ui = Ui_Dialog()
     # UI'yi oluştur
     self.ui.setupUi(self)
     # Butona tıklanırsa tetikle
     self.ui.pushButton.clicked.connect(self.CikisYap)
Ejemplo n.º 4
0
 def __init__(self,parent=None):
     super(Form, self).__init__(parent)
     self.ui = Ui_Dialog()
     self.ui.setupUi(self)
     config = configparser.ConfigParser()
     config.read('AscPlot.ini')
     self.ui.LoadFilePath.setText(config['フォーム']['読み込みファイル'])
     self.ui.RowNum.setValue(int(config['フォーム']['行数']))
     self.ui.ColNum.setValue(int(config['フォーム']['列数']))
Ejemplo n.º 5
0
class MyDialog(QtGui.QDialog):
    def __init__(self, parent=None):
        QtGui.QWidget.__init__(self, parent)
        self.ui = Ui_Dialog()
        self.ui.setupUi(self)
        self.ui.pushButton.clicked.connect(self.OK)

    def OK(self):
        print('OK pressed')
Ejemplo n.º 6
0
class MyApp(QDialog):
    def __init__(self, parent=None):
        QWidget.__init__(self, parent)
        # UI olarak form.py'deki Ui_Dialog'u kullan
        self.ui = Ui_Dialog()
        # UI'yi oluştur
        self.ui.setupUi(self)
        # Butona tıklanırsa tetikle
        self.ui.pushButton.clicked.connect(self.CikisYap)

    def CikisYap(self):
        sys.exit()
Ejemplo n.º 7
0
class Form(QtWidgets.QDialog):
    def __init__(self,parent=None):
        super(Form, self).__init__(parent)
        self.ui = Ui_Dialog()
        self.ui.setupUi(self)
        config = configparser.ConfigParser()
        config.read('AscPlot.ini')
        self.ui.LoadFilePath.setText(config['フォーム']['読み込みファイル'])
        self.ui.RowNum.setValue(int(config['フォーム']['行数']))
        self.ui.ColNum.setValue(int(config['フォーム']['列数']))
    def LoadFileSelect_Click(self):
        path = QFileDialog.getOpenFileName(None, "", "")[0]
        self.ui.LoadFilePath.setText(path)

    def reject(self):
        config = configparser.ConfigParser()
        config.read('AscPlot.ini')
        config['フォーム']['読み込みファイル'] = self.ui.LoadFilePath.text()
        config['フォーム']['行数'] = str(self.ui.RowNum.value())
        config['フォーム']['列数'] = str(self.ui.ColNum.value())
        with open('AscPlot.ini', 'w') as configfile:
            config.write(configfile)
        sys.exit(0)

    def exec(self):
        file = self.ui.LoadFilePath.text()

        if not (os.path.exists(file) and (os.path.isfile(file))):
            QtWidgets.QMessageBox.information(None, "エラー", "指定したファイル「" + file + "」が見つかりませんでした。", QMessageBox.Ok)
            return
        QApplication.setOverrideCursor(QCursor(Qt.WaitCursor))
        try:
            Z = pd.read_table(file, sep=' ', header=None, skiprows=6, engine = 'python') #「Initializing from file failed」エラー回避のためengineにpython指定
            Z[Z == -9999] = np.nan
            X, Y = np.meshgrid(np.linspace(0,1,self.ui.RowNum.value()), np.linspace(0,1,self.ui.ColNum.value()))
            #2D表示
            plt.imshow(Z)
            plt.show()
            #3D表示
            ax = plt.axes(projection='3d')
            ax.plot_surface(X, Y, Z)
            plt.show()
            #3D表示 色付き
            ax = plt.axes(projection='3d')
            Z = Z.get_values()
            ls = LightSource()
            rgb = ls.shade(Z, cmap=cm.gist_earth, vert_exag=0.1, blend_mode='soft')
            surf = ax.plot_surface(X, Y, Z, rstride=1, cstride=1, facecolors=rgb, linewidth=0, antialiased=False, shade=False)
            plt.show()
        finally:
            QApplication.restoreOverrideCursor()
            QtWidgets.QMessageBox.information(None, "終了", "終了しました。", QMessageBox.Ok)
Ejemplo n.º 8
0
Archivo: app.py Proyecto: pymft/its
class AppWindow(QDialog):
    def __init__(self):
        super().__init__()
        self.ui = Ui_Dialog()

        self.ui.setupUi(self)
        self.show()

    def keyPressEvent(self, e):
        if e.key() == Qt.Key_Down:
            self.ui.down()
        else:
            print(e.key())
Ejemplo n.º 9
0
class Form(QtWidgets.QDialog):
    def __init__(self, parent=None):
        super(Form, self).__init__(parent)
        self.ui = Ui_Dialog()
        self.ui.setupUi(self)

    def LoadFolderSelect(self):
        path = QFileDialog.getExistingDirectory(None, "", "")
        self.ui.LoadFolderPath.setText(path)

    def accept(self):
        folder = self.ui.LoadFolderPath.text()

        if not (os.path.exists(folder) and (os.path.isdir(folder))):
            QtWidgets.QMessageBox.information(
                None, "エラー", "指定したフォルダ「" + folder + "」が見つかりませんでした。",
                QMessageBox.Ok)
            return

        filelist = glob.glob(folder + "\*.zip")
        if len(filelist) == 0:
            QtWidgets.QMessageBox.information(None, "エラー",
                                              "zipファイルは見つかりませんでした。",
                                              QMessageBox.Ok)
            return

        QApplication.setOverrideCursor(QCursor(Qt.WaitCursor))
        try:
            for z in filelist:
                with zipfile.ZipFile(z, 'r') as zf:
                    decomp = zf.namelist()
                    if len(decomp) == 0:
                        self.ui.LogViewer.append("「" + zipfilename +
                                                 "」内にファイルが見つかりませんでした。")
                        continue
                    for dfile in decomp:
                        with zf.open(dfile, 'r') as file:
                            gmldem = JpGisGML()
                            text = file.read().decode('utf_8')
                            gmldem.ReadText(text)
                            gmldem.ToGeoTiff(folder)

                        self.ui.LogViewer.append(dfile + " :終了")
                        QApplication.processEvents(
                            QEventLoop.ExcludeUserInputEvents)
        finally:
            QApplication.restoreOverrideCursor()
            QtWidgets.QMessageBox.information(None, "終了", "終了しました。",
                                              QMessageBox.Ok)
Ejemplo n.º 10
0
class MyDialog(QtGui.QDialog):
    def __init__(self, parent=None):
        QtGui.QWidget.__init__(self, parent)
        self.ui = Ui_Dialog()
        self.ui.setupUi(self)
        self.ui.calcButton.clicked.connect(self.start)

    def start(self):
        amount = self.ui.Amount.text()
        try:
            amount = float(amount)  # convert to a float
        except ValueError as e:
            QtGui.QMessageBox.about(self, 'Error',
                                    'Input can only be a number')
            # print(e)  # optional, only for verbosity
            return

        # Define the different functions for calculation
        SaleswithintheUS = lambda x: ((x * 0.029) + 0.30) + x
        Discountedrateforeligiblenonprofits = lambda x: (
            (x * 0.022) + 0.30) + x
        Internationalsales = lambda x: ((x * 0.039) + 0.30) + x
        PayPalHereTMcardreaderSWIPE = lambda x: ((x * 0.027)) + x
        PayPalHereTMcardreaderMANUAL = lambda x: ((x * 0.035) + 0.15) + x

        options = {
            self.ui.radioButton1: SaleswithintheUS,
            self.ui.radioButton2: Discountedrateforeligiblenonprofits,
            self.ui.radioButton3: Internationalsales,
            self.ui.radioButton4: PayPalHereTMcardreaderSWIPE,
            self.ui.radioButton5: PayPalHereTMcardreaderMANUAL,
        }

        calculate = options.get(self.ui.radioButtonGroup.checkedButton(),
                                lambda x: x)  # get the calculation formula
        total = calculate(amount)  # don't use ints, use floats!
        fee = total - amount

        def prec_format(
            val,
            prec=2
        ):  # this will return a formatted float value with a desired precision
            return "{:.{precision}f}".format(float(val), precision=prec)

        self.ui.Total.setText(prec_format(total))
        self.ui.Fee.setText(prec_format(fee))

        print("\nTotal amount : {0} Fee : {1}".format(total, fee))
Ejemplo n.º 11
0
    def __init__(self, host='raspberrypi', port=1234, url=None):
        super(MainMenu, self).__init__()
        self.ui = Ui_Dialog()
        self.ui.setupUi(self)

        self.ui.pushButton_3.clicked.connect(self.start_tracking)
        self.ui.pushButton_4.clicked.connect(self.stop_tracking)
        self.ui.pushButton_5.clicked.connect(self.robot_initializer)
        self.ui.pushButton_6.clicked.connect(self.show_tracker)
        self.ui.pushButton.clicked.connect(self.closeAll)

        self.show()
        self.client = Client(host=host, port=port)

        self.object_tracker = Tracker(video_url=url, buffer_size=64)
        self.status = self.STOP
Ejemplo n.º 12
0
class MyDialog(QtGui.QMainWindow):
    def __init__(self, parent=None):
        QtGui.QWidget.__init__(self, parent)
        self.ui = Ui_Dialog()
        self.ui.setupUi(self)

        @pyqtSlot()
        def menu():
            a = QApplication(sys.argv)
            w = QWidget()
            w.resize(320, 240)
            w.setWindowTitle("Hi")
            filename = QFileDialog.getOpenFileName(w, 'Open File', '/')
            print(filename)
            file = open(filename)
            data = file.read()
            self.plainTextEdit.setPlainText(data)
Ejemplo n.º 13
0
    def __init__(self, parent=None):
        QtGui.QWidget.__init__(self, parent)

        image = QtGui.QLabel(self)
        image.setGeometry(50, -100, 300, 300)
        pixmap = QtGui.QPixmap("./logo.png")
        image.setPixmap(pixmap)
        image.show()

        image2 = QtGui.QLabel(self)
        image2.setGeometry(75, 125, 300, 300)
        pixmap2 = QtGui.QPixmap("./cplogo.png")
        image2.setPixmap(pixmap2)
        image2.show()

        self.ui = Ui_Dialog()
        self.ui.setupUi(self)
        self.ui.pushButton.clicked.connect(self.login)
Ejemplo n.º 14
0
class MyDialog(QtGui.QDialog):
    def __init__(self, parent=None):
        QtGui.QWidget.__init__(self, parent)
        self.ui = Ui_Dialog()
        self.ui.setupUi(self)
        self.ui.file_browser.clicked.connect(self.selectFile)
        self.ui.vote.clicked.connect(self.vote_member)

    def selectFile(self):
        self.ui.file_path.setText(QtGui.QFileDialog.getOpenFileName())

    def vote_member(self):
        self.login()

    def login(self):
        username = self.ui.username.text()
        password = self.ui.password.text()
        self.ui.output.append(username + u"你的密码已经被盗")
        self.ui.output.append(u"啊不对你已经登录成功")
Ejemplo n.º 15
0
class MyDialog(QtGui.QDialog):
	def __init__(self, parent=None):
		QtGui.QWidget.__init__(self, parent)
		self.ui = Ui_Dialog()
		self.ui.setupUi(self)
		self.ui.pushButton.clicked.connect(self.OK)
		self.ui.listWidget.itemClicked.connect(self.showmessage)

	def showmessage(self, item):
		msgnumber = str(item.text()).split()[1]
		msgindex = mailinfo.index(msgnumber)
		print mailinfo[msgindex + 1]
		print mailinfo[msgindex + 2]
		print mailinfo[msgindex + 3]
		print mailinfo[msgindex + 4]

		boxy = QMessageBox()
		boxy.setText('Title : %s\nFrom : %s' %((mailinfo[msgindex + 1]), (mailinfo[msgindex + 2])))
		boxy.setInformativeText('%s\n\n%s attachment(s) on this message' % ((mailinfo[msgindex + 3]), (mailinfo[msgindex + 4])))
		boxy.setWindowTitle('Message %s' % (mailinfo[msgindex]))

		boxy.setStandardButtons(QMessageBox.Ok)
		boxy.exec_()


	def OK(self):
		EMAIL_ACCOUNT = self.ui.lineEdit.text()

		print 'OK pressed.'
		self.auth(EMAIL_ACCOUNT)

	def auth(self, EMAIL_ACCOUNT):
		M = imaplib.IMAP4_SSL('imap.gmail.com')
		try:
			rv, data = M.login(EMAIL_ACCOUNT, self.ui.lineEdit_2.text())
		except imaplib.IMAP4.error:
			choice=QtGui.QMessageBox.question(self, 'Error', "LOGIN FAILED!!!", QtGui.QMessageBox.Retry, QtGui.QMessageBox.Exit)
			if choice=QtGui.QMessageBox.Exit:
				#print "LOGIN FAILED!!! "
				sys.exit(1)
			elif choice=QtGui.QMessageBox.Retry:
				auth(self, EMAIL_ACCOUNT)
Ejemplo n.º 16
0
 def __init__(self, parent=None):
     QtGui.QWidget.__init__(self, parent)
     self.ui = Ui_Dialog()
     self.ui.setupUi(self)
Ejemplo n.º 17
0
 def __init__(self, parent=None):
     QtGui.QWidget.__init__(self, parent)
     self.ui = Ui_Dialog()
     self.ui.setupUi(self)
     self.ui.pushButton.clicked.connect(self.OK)
Ejemplo n.º 18
0
Archivo: app.py Proyecto: pymft/its
    def __init__(self):
        super().__init__()
        self.ui = Ui_Dialog()

        self.ui.setupUi(self)
        self.show()
Ejemplo n.º 19
0
 def __init__(self, parent=None):
     QtGui.QWidget.__init__(self, parent)
     self.ui = Ui_Dialog()
     self.ui.setupUi(self)
     self.ui.pushButton.clicked.connect(self.OK)
     self.ui.listWidget.itemClicked.connect(self.showmessage)
Ejemplo n.º 20
0
class MyDialog(QtGui.QDialog):
    def __init__(self, parent=None):
        QtGui.QWidget.__init__(self, parent)
        self.ui = Ui_Dialog()
        self.ui.setupUi(self)
        self.ui.pushButton.clicked.connect(self.OK)
        self.ui.listWidget.itemClicked.connect(self.showmessage)

    def showmessage(self, item):
        msgnumber = str(item.text()).split()[1]
        msgindex = mailinfo.index(msgnumber)
        print mailinfo[msgindex + 1]
        print mailinfo[msgindex + 2]
        print mailinfo[msgindex + 3]
        print mailinfo[msgindex + 4]

        boxy = QMessageBox()
        boxy.setText('Title : %s\nFrom : %s' % ((mailinfo[msgindex + 1]),
                                                (mailinfo[msgindex + 2])))
        boxy.setInformativeText('%s\n\n%s attachment(s) on this message' %
                                ((mailinfo[msgindex + 3]),
                                 (mailinfo[msgindex + 4])))
        boxy.setWindowTitle('Message %s' % (mailinfo[msgindex]))

        boxy.setStandardButtons(QMessageBox.Ok)
        boxy.exec_()

    def OK(self):
        EMAIL_ACCOUNT = self.ui.lineEdit.text()

        print 'OK pressed.'
        self.auth(EMAIL_ACCOUNT)

    def auth(self, EMAIL_ACCOUNT):
        M = imaplib.IMAP4_SSL('imap.gmail.com')

        try:
            rv, data = M.login(EMAIL_ACCOUNT, self.ui.lineEdit_2.text())
        except imaplib.IMAP4.error:
            print "LOGIN FAILED!!! "
            sys.exit(1)

        print data
        search_email = self.ui.lineEdit_3.text()

        curr_dir = '.'

        if search_email not in os.listdir(curr_dir):
            os.mkdir(search_email)

        curr_dir = './' + search_email

        rv, mailboxes = M.list()
        if rv == 'OK':
            print "Mailboxes located."

        rv, data = M.select(EMAIL_FOLDER)

        if rv == 'OK':
            print "Now processing mailbox ...\n"
            self.process_mailbox(M, search_email, curr_dir)
            M.close()
        else:
            print "ERROR: Unable to open mailbox ", rv

        M.logout()

    def process_mailbox(self, M, search_email, curr_dir):

        rv, data = M.search(
            None, '(OR (TO %s) (FROM %s))' % (search_email, search_email))
        if rv != 'OK':
            print "No messages found!"
            return

        for num in data[0].split():
            rv, data = M.fetch(num, '(RFC822)')
            if rv != 'OK':
                print "ERROR getting message", num
                return

            localinfo = []

            print '-----'
            msg = email.message_from_string(data[0][1])
            decode = email.header.decode_header(msg['Subject'])[0]
            subject = unicode(decode[0])
            print 'Message %s : %s' % (num, subject)
            self.ui.listWidget.addItem(
                QListWidgetItem('Message %s : %s' % (num, subject)))
            localinfo.append(num)
            localinfo.append(subject)

            sender = msg['from'].split()[-1]
            sender = sender[1:]
            sender = sender[:-1]

            print 'Sender : ', sender
            localinfo.append(sender)
            #print 'Raw Date:', msg['Date']

            for part in msg.walk():
                if part.get_content_type() == 'text/plain':
                    print part.get_payload()
                    localinfo.append(part.get_payload())

            # Kepping up to local time
            date_tuple = email.utils.parsedate_tz(msg['Date'])
            if date_tuple:
                local_date = datetime.datetime.fromtimestamp(
                    email.utils.mktime_tz(date_tuple))
                print "Dated : ", \
                 local_date.strftime("%a, %d %b %Y %H:%M:%S")

            fcount = 0
            for part in msg.walk():

                if (part.get('Content-Disposition') is not None):
                    filename = part.get_filename()
                    print filename

                    final_path = os.path.join(curr_dir + filename)

                    if not os.path.isfile(final_path):

                        fp = open(curr_dir + "/" + (filename), 'wb')
                        fp.write(part.get_payload(decode=True))
                        fcount += 1
                        fp.close()

            localinfo.append(fcount)

            global mailinfo
            mailinfo.append(localinfo)

            print '%d attachment(s) fetched' % fcount
            print '-----\n\n'

        mailinfo = [item for sublist in mailinfo for item in sublist]
        print mailinfo
Ejemplo n.º 21
0
	def __init__(self, parent=None):
		QtGui.QWidget.__init__(self, parent)
		self.ui = Ui_Dialog()
		self.ui.setupUi(self)
		self.ui.pushButton.clicked.connect(self.dl)
		self.ui.lineEdit.textChanged.connect(self.labeler)
Ejemplo n.º 22
0
class MainMenu(QtGui.QMainWindow):
    RUN = 'run'
    STOP = 'stop'
    MANUAL = 'manual'

    def __init__(self, host='raspberrypi', port=1234, url=None):
        super(MainMenu, self).__init__()
        self.ui = Ui_Dialog()
        self.ui.setupUi(self)

        self.ui.pushButton_3.clicked.connect(self.start_tracking)
        self.ui.pushButton_4.clicked.connect(self.stop_tracking)
        self.ui.pushButton_5.clicked.connect(self.robot_initializer)
        self.ui.pushButton_6.clicked.connect(self.show_tracker)
        self.ui.pushButton.clicked.connect(self.closeAll)

        self.show()
        self.client = Client(host=host, port=port)

        self.object_tracker = Tracker(video_url=url, buffer_size=64)
        self.status = self.STOP

    def keyPressEvent(self, event1):
        self.status = self.MANUAL
        self.ui.label_2.setText(self.status)

        verbose = {"FB": "", "LR": ""}
        if event1.key() == QtCore.Qt.Key_W:
            # print "Up pressed"
            verbose["FB"] = "F"
        if event1.key() == QtCore.Qt.Key_S:
            # print "D pressed"
            verbose["FB"] = "B"

        if event1.key() == QtCore.Qt.Key_A:
            # print "L pressed"
            verbose["LR"] = "L"
        if event1.key() == QtCore.Qt.Key_D:
            # print "R pressed"
            verbose["LR"] = "R"

        json_data = json.dumps(verbose)
        if verbose["LR"] != "" or verbose["FB"] != "":
            print(verbose)
            self.client.send(json_data)

    def keyReleaseEvent(self, event):
        verbose = {"FB": "", "LR": ""}
        if event.key() == QtCore.Qt.Key_W:
            # print "Up rel"
            verbose["FB"] = "S"
        if event.key() == QtCore.Qt.Key_S:
            # print "D rel"
            verbose["FB"] = "S"

        if event.key() == QtCore.Qt.Key_A:
            # print "L pressed"
            verbose["LR"] = "S"
        if event.key() == QtCore.Qt.Key_D:
            # print "R pressed"
            verbose["LR"] = "S"

        json_data = json.dumps(verbose)
        if verbose["LR"] != "" or verbose["FB"] != "":
            print(verbose)
            self.client.send(json_data)
            self.client.send(json_data)

    def start_tracking(self):
        self.status = self.RUN
        if self.object_tracker.is_working:
            print('start tracking')
            verbose = {"status": self.RUN}
            json_data = json.dumps(verbose)
            self.client.send(json_data)

            self.ui.label_2.setText(self.status)
            data_sender_thread = threading.Thread(target=self.data_sender)
            data_sender_thread.start()

    def stop_tracking(self):
        self.status = self.STOP
        verbose = {"status": self.STOP}
        json_data = json.dumps(verbose)
        self.client.send(json_data)
        self.ui.label_2.setText(self.status)

    def closeAll(self):

        self.status = self.STOP
        verbose = {"status": self.STOP}
        json_data = json.dumps(verbose)
        self.client.send(json_data)
        QtCore.QCoreApplication.instance().quit()

    def show_tracker(self):
        if not self.object_tracker.is_working:
            tracking_thread = threading.Thread(
                target=self.object_tracker.track)
            tracking_thread.start()

    def robot_initializer(self):

        try:
            x_min = round(float(self.ui.lineEdit_5.text()), 2)
        except:
            x_min = 200

        try:
            x_max = round(float(self.ui.lineEdit_2.text()), 2)
        except:
            x_max = 300
        try:
            minArea = round(float(self.ui.lineEdit_3.text()), 2)
        except:
            minArea = 20
        try:
            maxArea = round(float(self.ui.lineEdit_4.text()), 2)
        except:
            maxArea = 100

        verbose = {
            "x_min": x_min,
            "x_max": x_max,
            "maxArea": maxArea,
            "minArea": minArea,
        }
        json_data = json.dumps(verbose)
        print(json_data)
        self.client.send(json_data)

    def data_sender(self):
        verbose = {"radius": "", "x": ""}
        while self.object_tracker.is_working and self.status != self.STOP:
            if len(self.object_tracker.positions) > 0:
                currentPosition = self.object_tracker.positions[0]
                if currentPosition[0] is not None:
                    print(currentPosition)
                    verbose["radius"] = currentPosition[1]
                    verbose["x"] = currentPosition[0][1]
                    json_data = json.dumps(verbose)
                    self.client.send(json_data)
            time.sleep(0.5)
        self.status = self.STOP
        self.ui.label_2.setText(self.status)
Ejemplo n.º 23
0
 def __init__(self, parent=None):
     super(Form, self).__init__(parent)
     self.ui = Ui_Dialog()
     self.ui.setupUi(self)
Ejemplo n.º 24
0
class Window(QtGui.QDialog):
    def __init__(self):
        QtGui.QDialog.__init__(self)
        self.ui = Ui_Dialog()
        self.ui.setupUi(self)
Ejemplo n.º 25
0
 def __init__(self):
     QtGui.QDialog.__init__(self)
     self.ui = Ui_Dialog()
     self.ui.setupUi(self)
Ejemplo n.º 26
0
 def __init__(self, parent=None):
     QtGui.QWidget.__init__(self, parent)
     self.ui = Ui_Dialog()
     self.ui.setupUi(self)
     self.ui.file_browser.clicked.connect(self.selectFile)
     self.ui.vote.clicked.connect(self.vote_member)
Ejemplo n.º 27
0
 def __init__(self, parent=None):
     QtGui.QWidget.__init__(self, parent)
     self.ui = Ui_Dialog()
     self.ui.setupUi(self)
     self.ui.calcButton.clicked.connect(self.start)