Exemplo n.º 1
0
    def resizeEvent(self, event):
        view_size = self.view.size()
        new_background_height = (1.5 / 4.) * view_size.height()
        background_to_pixmap = QPixmap(self.image_bank["Background to"]["path"])
        background_to_pixmap = background_to_pixmap.scaled(new_background_height, new_background_height,
                                                           Qt.KeepAspectRatio)
        if not self.background_to_image:
            self.background_to_image = QGraphicsPixmapItem(background_to_pixmap)
        else:
            self.background_to_image.setPixmap(background_to_pixmap)
        sugested_x_position = int(2 * (view_size.width() / 3.))
        if sugested_x_position < 0:
            sugested_x_position = 0
        sugested_y_position = int(view_size.height() / 2. - background_to_pixmap.size().height() / 2)
        if sugested_y_position < 0:
            sugested_y_position = 0
        self.background_to_image.setPos(sugested_x_position, sugested_y_position)

        #####################
        new_background_height = (2.2 / 4.) * view_size.height()
        background_from_pixmap = QPixmap(self.image_bank["Background from"]["path"])
        background_from_pixmap = background_from_pixmap.scaled(new_background_height, new_background_height,
                                                               Qt.KeepAspectRatio)
        if not self.background_to_image:
            self.background_from_image = QGraphicsPixmapItem(background_from_pixmap)
        else:
            self.background_from_image.setPixmap(background_from_pixmap)

        sugested_x_position = int(view_size.width() / 5. - background_from_pixmap.size().height() / 2)
        if sugested_x_position < 0:
            sugested_x_position = 0
        sugested_y_position = int(view_size.height() / 2. - background_from_pixmap.size().height() / 2)
        if sugested_y_position < 0:
            sugested_y_position = 0
        self.background_from_image.setPos(sugested_x_position, sugested_y_position)

        ####
        new_widget_height = (1 / 4.) * view_size.height()
        if self.image_bank is not None:
            for image_id in self.image_bank.keys():
                if "clothes" in self.image_bank[image_id]["categories"]:
                    widget = self.image_bank[image_id]["widget"]
                    pixmap = widget.pixmap
                    pixmap = pixmap.scaled(new_widget_height, new_widget_height,
                                           Qt.KeepAspectRatio)
                    widget.setPixmap(pixmap)
                    print widget.moved_flag
                    if not widget.moved_flag:
                        newpos_x = self.background_from_image.boundingRect().width() / 2 - widget.boundingRect().width() / 2
                        newpos_y = self.background_from_image.boundingRect().height() / 2 - widget.boundingRect().height() / 2
                        widget.setPos(newpos_x, newpos_y)

        super(TakeDragGame, self).resizeEvent(event)
Exemplo n.º 2
0
 def add_background_to_image(self, ):
     assert self.image_bank is not None, "Images need to be loaded before calling this method (try load_images_json_file)"
     if "Background to" in self.image_bank:
         background_to_pixmap = QPixmap(self.image_bank["Background to"]["path"])
         self.background_to_image = QGraphicsPixmapItem(background_to_pixmap)
         self.scene.addItem(self.background_to_image)
         self.background_to_image.setZValue(2)
Exemplo n.º 3
0
    def search(self):
        # first set/change the  font of the serach box
        font = self.dlg.search_lineEdit.font()
        font.setItalic(False)
        self.dlg.search_lineEdit.setFont(font)

        # clear description and quicklook
        self.dlg.textEdit.clear()
        
        # make a new emptey scene to show
        if not self.dlg.graphicsView is None:
            scene = QGraphicsScene()
            pic = QPixmap()
            scene.addItem(QGraphicsPixmapItem(pic))
            self.dlg.graphicsView.setScene(scene)        
            self.dlg.graphicsView.show()  
        
        # function the searches for a string in the datasets name, service type and otganization
        text = self.dlg.search_lineEdit.text()        
        # convert to lower case and remove greek accents in case of Greek
        text = text.lower()
        text = self.removeGreekAccents(text)  
        foundDatasets = []
        for dataset in self.datasets:
            # use lowercase characters and remove greek accents , to make the comparison
            name = self.removeGreekAccents(dataset.getName(self.language).lower())
            source = self.removeGreekAccents(dataset.getSource(self.language).lower())
            serviceType = self.removeGreekAccents(dataset.serviceType.lower())
            
            if text in name or text in source or text in serviceType:            
            #QMessageBox.information(None, "DEBUG:", str(type(dataset.getName(self.language))))                           
                foundDatasets.append(dataset)
        #fill the table with the found datasets
        self.fill_table(foundDatasets)     
Exemplo n.º 4
0
 def __init__(self, classifier, granularity, scale, spacing, rect=None):
     orangeqt.PlotItem.__init__(self)
     self.classifier = classifier
     self.rect = rect
     self.granularity = granularity
     self.scale = scale
     self.spacing = spacing
     self.pixmap_item = QGraphicsPixmapItem(self)
     self.set_in_background(True)
     self.setZValue(ProbabilitiesZValue)
 def btnLoadImageClicked(self):
     if self.dlgLoadImage.exec_():
         filename = self.dlgLoadImage.selectedFiles()[0]
         self._image = QImage(filename)
         self._imagePixmap = QGraphicsPixmapItem(QPixmap(self._image), None,
                                                 self._imageScene)
         self.grObjectImage.setScene(self._imageScene)
         self.grObjectImage.fitInView(self._imageScene.sceneRect(),
                                      Qt.KeepAspectRatio)
         self._imagePixmap.mousePressEvent = self.getRGBFromPixel
Exemplo n.º 6
0
    def __init__(self, master, *args):
        QGraphicsView.__init__(self, *args)
        self.master = master

        self.setHorizontalScrollBarPolicy(Qt.ScrollBarAsNeeded)
        self.setVerticalScrollBarPolicy(Qt.ScrollBarAsNeeded)

        self.setRenderHints(QPainter.Antialiasing)
        scene = QGraphicsScene(self)
        self.pixmapGraphicsItem = QGraphicsPixmapItem(None, scene)
        self.setScene(scene)

        self.setMouseTracking(True)
        self.viewport().setMouseTracking(True)

        self.setFocusPolicy(Qt.WheelFocus)
Exemplo n.º 7
0
 def close(self):
     #clear everything
     self.init_table()
     # clear description and quicklook
     self.dlg.textEdit.clear()
     # clear search box
     #text = self.dlg.search_lineEdit.setText("")
     self.init_searchBox()
     # make a new emptey scene to show
     if not self.dlg.graphicsView is None:
         scene = QGraphicsScene()
         pic = QPixmap()
         scene.addItem(QGraphicsPixmapItem(pic))
         self.dlg.graphicsView.setScene(scene)        
         self.dlg.graphicsView.show()
     """close the dialog"""
     self.dlg.close()
Exemplo n.º 8
0
    def __init__(self,
                 parent=None,
                 direction=Qt.LeftToRight,
                 node=None,
                 icon=None,
                 iconSize=None,
                 **args):
        QGraphicsWidget.__init__(self, parent, **args)
        self.setAcceptedMouseButtons(Qt.NoButton)
        self.__direction = direction

        self.setLayout(QGraphicsLinearLayout(Qt.Horizontal))

        # Set the maximum size, otherwise the layout can't grow beyond its
        # sizeHint (and we need it to grow so the widget can grow and keep the
        # contents centered vertically.
        self.layout().setMaximumSize(QSizeF(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX))

        self.setSizePolicy(QSizePolicy.MinimumExpanding,
                           QSizePolicy.MinimumExpanding)

        self.__iconSize = iconSize or QSize(64, 64)
        self.__icon = icon

        self.__iconItem = QGraphicsPixmapItem(self)
        self.__iconLayoutItem = GraphicsItemLayoutItem(item=self.__iconItem)

        self.__channelLayout = QGraphicsGridLayout()
        self.__channelAnchors = []

        if self.__direction == Qt.LeftToRight:
            self.layout().addItem(self.__iconLayoutItem)
            self.layout().addItem(self.__channelLayout)
            channel_alignemnt = Qt.AlignRight

        else:
            self.layout().addItem(self.__channelLayout)
            self.layout().addItem(self.__iconLayoutItem)
            channel_alignemnt = Qt.AlignLeft

        self.layout().setAlignment(self.__iconLayoutItem, Qt.AlignCenter)
        self.layout().setAlignment(self.__channelLayout,
                                   Qt.AlignVCenter | channel_alignemnt)

        if node is not None:
            self.setSchemeNode(node)
Exemplo n.º 9
0
    def __init__(self, win, rect, filename, metadata):
        self.win = win
        self.rect = rect
        self.filename = filename
        self.metadata = metadata

        if self.metadata:
            self.line1 = self.metadata['Name']
            self.line2 = "%s Mission" % (self.metadata['Mission'])
            self.line3 = "%s" % (self.metadata['Time'])
        else:
            self.line1 = ""
            self.line2 = ""
            self.line3 = ""

        self.image = QGraphicsPixmapItem()
        self.win.scene.addItem(self.image)
        self.image.setTransformationMode(Qt.SmoothTransformation)

        self.use_two_lines = True

        self.fontsize1 = 32
        self.fontsize2 = 26
        self.fontsize3 = 24

        self.font1 = QFont('Times New Roman', self.fontsize1)
        self.font2 = QFont('Times New Roman', self.fontsize2)
        self.font3 = QFont('Times New Roman', self.fontsize3)

        self.title1 = self.win.scene.addText(self.line1, self.font1)
        self.title1.setDefaultTextColor(Qt.white)
        self.title1.setVisible(False)

        self.title2 = self.win.scene.addText(self.line2, self.font2)
        self.title2.setDefaultTextColor(Qt.white)
        self.title2.setVisible(False)

        self.title3 = self.win.scene.addText(self.line3, self.font3)
        self.title3.setDefaultTextColor(Qt.white)
        self.title3.setVisible(False)

        self.reservedHeight = 128
        self.padding = 20

        self.hide()
Exemplo n.º 10
0
    def updateDescAndQL(self):
        # get the name of the selected dataset
        dataset_name, dataset_serviceType = self.getSelectedNameAndType()

        #custom web service object
        dataset = self.selectdataSets(dataset_name, dataset_serviceType)

        quicklook = os.path.join(self.quicklooks_dir, dataset.QLname + ".jpg")
        desc = dataset.getDescription(self.language)
        name = dataset.getName(self.language)

        #update decription
        self.dlg.textEdit.clear()
        #creation and last update
        if self.language == "EN":
            crDate = "Creation date : " + dataset.creationDate
            update = "Last update : " + dataset.lastUpdate
        elif self.language == "GR":
            crDate = unicode(
                "Ημερομηνια δημιουργιας : " + dataset.creationDate, 'utf-8')
            update = unicode("Τελευταία ενημέρωση : " + dataset.lastUpdate,
                             'utf-8')

        cursor = QTextCursor(self.dlg.textEdit.document())
        cursor.insertHtml("<h3> " + name + " <br><br></h3>")
        cursor.insertHtml("<p> " + desc + " <br><br><br></p>")
        cursor.insertHtml("<p><i> " + crDate + " <br></i></p>")
        #cursor.insertHtml("<p><i> "+update+" <br></i></p>")

        self.dlg.textEdit.setReadOnly(True)
        #update quicklook

        #GET DIMENSIONS OF THE IMAGE
        img = Image.open(quicklook)
        w, h = img.size

        scene = QGraphicsScene()
        pic = QPixmap(quicklook)
        scene.addItem(QGraphicsPixmapItem(pic))

        self.dlg.graphicsView.setScene(scene)
        self.dlg.graphicsView.fitInView(QRectF(0, 0, w, h), Qt.KeepAspectRatio)
        self.dlg.graphicsView.show()
Exemplo n.º 11
0
    def updateLanguage(self):
        # get the new language
        language = str(self.dlg.language_comboBox.currentText())        
        # Change the self.language propertie and change the labe;s
        if language == "English":
            self.language = "EN"
            self.dlg.desc_lbl.setText("Description")
            self.dlg.preview_lbl.setText("Preview")
            self.dlg.load_btn.setText("Load")
            self.dlg.close_btn.setText("Close")
            self.dlg.search_lbl.setText("Search")
            self.dlg.info_btn.setText("Info")
        elif language == "Greek":
            self.language = "GR"
            self.dlg.desc_lbl.setText(unicode("Περιγραφή", 'utf-8'))
            self.dlg.preview_lbl.setText(unicode("Προεπισκόπηση",'utf-8'))
            self.dlg.load_btn.setText(unicode("Φόρτωση",'utf-8'))
            self.dlg.close_btn.setText(unicode("Κλείσιμο",'utf-8'))
            self.dlg.search_lbl.setText(unicode("Αναζήτηση",'utf-8'))
            self.dlg.info_btn.setText(unicode("Πληροφορίες", 'utf-8'))

        self.dlg.preview_lbl.setAlignment(Qt.AlignRight)
        #refill the table
        self.init_table()
        # clear description and quicklook
        self.dlg.textEdit.clear()
        # clear search box
        #text = self.dlg.search_lineEdit.setText("")
        self.init_searchBox()
        # make a new emptey scene to show
        if not self.dlg.graphicsView is None:
            scene = QGraphicsScene()
            pic = QPixmap()
            scene.addItem(QGraphicsPixmapItem(pic))
            self.dlg.graphicsView.setScene(scene)        
            self.dlg.graphicsView.show()          
Exemplo n.º 12
0
 def draw_env(self, image):
     if self.scene_env == 0:    
         self.scene_env = QGraphicsPixmapItem()
     else:
         self.removeItem(self.scene_env)
     
     self.scene_env.setPixmap(QPixmap(image))
     
     if self.scene_env != 0:
         self.scene_env.setPos(0, -self.environment.im.shape[1])
     
     self.addItem(self.scene_env)
     self.scene_env.setZValue(-1)
         
     if not self.f_show_env:
         self.scene_env.hide()
     
     self.spinEnvX.setValue(self.environment.im.shape[0])
     self.spinEnvY.setValue(self.environment.im.shape[1])
         
     if self.f_auto_edge:
         self.delete_all_edges()
         self.net.recalculate_edges()
         self.draw_all_edges()
Exemplo n.º 13
0
 def head_pixmap_item(self):
     head_pixmap_item = QGraphicsPixmapItem(self.head_pixmap)
     head_pixmap_item.setZValue(1)
     return head_pixmap_item
Exemplo n.º 14
0
 def show_fullscreen_pixmap(self, pixmap):
     """:param pixmap: a QPixmap"""
     item = QGraphicsPixmapItem(pixmap)
     self.show_fullscreen_item(item)
Exemplo n.º 15
0
 def show_fullscreen_image(self, image):
     """:param image: a QImage"""
     pixmap = QPixmap.fromImage(image)
     item = QGraphicsPixmapItem(pixmap)
     self.show_fullscreen_item(item)
   def btnConfirmClicked(self):
       # check if PIN code corresponds to PIN code stored in database (use SHA-256 to hash passwords!)
       cursor = self._mysqldb_connection.cursor()
       query_str = "select * from tblUser where userID='" + self._rfid + "'"
       cursor.execute(query_str)
       if cursor.rowcount != 1:
           self.lblWrongPINCode.setVisible(True)
           cursor.close()
           return
       # fetch (only) matching row from DB
       tblUser_row = cursor.fetchone()
       # hash pin entered by user with salt string from DB
       pincode_hash = SHA256.new(str(self.lnPINCode.text()) + str(tblUser_row[4])).hexdigest().upper()
       #print pincode_hash
       if pincode_hash == tblUser_row[3]:
           # permit access to user and enable widgets accordingly
           self.lblWrongPINCode.setVisible(False)
           self.tabWidget.setTabEnabled(1, True)
           self.tabWidget.setTabEnabled(2, True)
           self.tabWidget.setTabEnabled(3, True)
           self.tabWidget.setTabEnabled(4, True)
           self.lblAuth.setEnabled(False)
           self.lblPINCode.setEnabled(False)
           self.lnPINCode.setEnabled(False)
           self.btnConfirm.setEnabled(False)
           self.lblHelloMsg.setVisible(True)
           self.lblHelloMsg.setText("Welcome back, " + tblUser_row[2] + "!")
           self.lblRemove.setVisible(True)
           self.grProfilePicture.setVisible(True)
           self.grProfilePicture.setEnabled(True)
           scene = QGraphicsScene()
           qimg = QtGui.QImage.fromData(tblUser_row[6])
           pixmap = QGraphicsPixmapItem(QPixmap.fromImage(qimg), None, scene)
           self.grProfilePicture.setScene(scene)
           self.grProfilePicture.fitInView(scene.sceneRect(), Qt.KeepAspectRatio)
           self.grProfilePicture.setVisible(True)
           self._encourager.say("Welcome back, " + tblUser_row[2] + "!")
           self._encourager.show_emotion("happy")
           ### HARDCODED: display different information depending on user connected ###
           if self._rfid == "3BEA00008131FE450031C573C0014000900077":
               self.slNbrBlocks.setValue(3)
               self.spnNbrRepetitions.setValue(25)
               self.chkQualitative.setChecked(False)
               self.chkQuantitative.setChecked(True)
               self.spnQuantEncRep.setEnabled(True)
               self.cmbQualiEnc.setEnabled(False)
               self.spnQuantEncRep.setValue(3)
           else:
               self.slNbrBlocks.setValue(2)
               self.spnNbrRepetitions.setValue(15)
               self.chkQualitative.setChecked(True)
               self.chkQuantitative.setChecked(True)
               self.spnQuantEncRep.setEnabled(True)
               self.spnQuantEncRep.setValue(2)
               self.cmbQualiEnc.setEnabled(True)
               self.cmbQualiEnc.setCurrentIndex(1)
 
           #launch_params = ['roslaunch', 'simple_image_cyphering', 'one_node_decryption.launch']
           #self._decryption_node = Popen(launch_params)
       else:
           self.lblWrongPINCode.setVisible(True)
       cursor.close()
    def __init__(self):
        super(QTRehaZenterGUI, self).__init__()
        uic.loadUi(currentdir + '/ui_files/QTRehaZenterGUI.ui', self)
        
        # connect to DB and create cursor object to perform queries
        self._mysqldb_connection = MySQLdb.connect(host=self.mysql_hostname, user=self.mysql_user, passwd=self.mysql_password, db="iot")
        
        # initialize custom object loader widget
        self.defineNewColorWidget = DefineNewColor.UIDefineNewColorWidget(self)

        # disable camera feed tab on startup (enabled later)
        self.tabWidget.setTabEnabled(2, False)
        
        # load logo images
        uniLuLogoScene = QGraphicsScene()
        imagePixmap_unilu = QGraphicsPixmapItem(QPixmap(QImage(currentdir + "/imgs/university_of_luxembourg_logo.png")), None, uniLuLogoScene)
        self.grUniLuLogo.setScene(uniLuLogoScene)
        self.grUniLuLogo.fitInView(uniLuLogoScene.sceneRect(), Qt.KeepAspectRatio)
        luxAILogoScene = QGraphicsScene()
        imagePixmap_luxai = QGraphicsPixmapItem(QPixmap(QImage(currentdir + "/imgs/luxai_logo.png")), None, luxAILogoScene)
        self.grLuxAILogo.setScene(luxAILogoScene)
        self.grLuxAILogo.fitInView(luxAILogoScene.sceneRect(), Qt.KeepAspectRatio)
        
        # initialize calibration file selection dialog
        self.dlgLoadCalibFile = QFileDialog()
        self.dlgLoadCalibFile.setFileMode(QFileDialog.ExistingFile)
        self.dlgLoadCalibFile.setFilter("Calibration files (*.clb)")
        self.dlgLoadCalibFile.setAcceptMode(QFileDialog.AcceptOpen)
        
        # initialize color file selection dialog
        self.dlgLoadColorFile = QFileDialog()
        self.dlgLoadColorFile.setFileMode(QFileDialog.ExistingFile)
        self.dlgLoadColorFile.setFilter("Color files (*.clr)")
        self.dlgLoadColorFile.setAcceptMode(QFileDialog.AcceptOpen)
        
        # initialize calibration file save dialog
        self.dlgSaveCalibFile = QFileDialog()
        self.dlgSaveCalibFile.setFileMode(QFileDialog.AnyFile)
        self.dlgSaveCalibFile.setFilter("Calibration files (*.clb)")
        self.dlgSaveCalibFile.setAcceptMode(QFileDialog.AcceptSave)
        
        # initialize rotation exercises warning message box
        self.msgRotationExercises = QMessageBox()
        self.msgRotationExercises.setIcon(QMessageBox.Warning)
        self.msgRotationExercises.setText("Sorry, rotation exercises have not been implemented yet!")
        self.msgRotationExercises.setInformativeText("Please choose one of the motion exercises instead until rotation exercises become available.")
        self.msgRotationExercises.setWindowTitle("Rotation exercises warning")
        self.msgRotationExercises.setStandardButtons(QMessageBox.Ok)
        
        # initialize calibration fail message box
        self.msgErrorWarning = QMessageBox()
        self.msgErrorWarning.setIcon(QMessageBox.Warning)
        self.msgErrorWarning.setStandardButtons(QMessageBox.Ok)
        
        # initialize list of faces (in string form)
        self._faces_list = ["sad", "happy", "crying", "neutral", "showing_smile", "surprise", "breathing_exercise", "breathing_exercise_nose", "smile", "happy_blinking", "calming_down", "random emotion"]
        self.cmbFaces.addItems(self._faces_list)
        
        # disable various labels and widgets on startup
        self.lblPerRepetitions1.setEnabled(False)
        self.lblPerRepetitions2.setEnabled(False)
        self.spnQuantEncRep.setEnabled(False)
        self.cmbQualiEnc.setEnabled(False)
        self.btnDeleteLine.setEnabled(False)
        self.spnFixedReps.setEnabled(False)
        self.spnFrequencyReps.setEnabled(False)
        self.btnAddLine.setEnabled(False)
        self.lblAuth.setVisible(False)
        self.lblPINCode.setVisible(False)
        self.lnPINCode.setVisible(False)
        self.btnConfirm.setVisible(False)
        self.lblHelloMsg.setVisible(False)
        self.lblRemove.setVisible(False)
        self.grProfilePicture.setVisible(True)
        self.tabWidget.setTabEnabled(1, False)
        self.tabWidget.setTabEnabled(2, False)
        self.tabWidget.setTabEnabled(3, False)
        self.tabWidget.setTabEnabled(4, False)
        self.lblWrongPINCode.setVisible(False)
        self.grProfilePicture.setVisible(False)
        
        # resize table columns to match their text size
        header = self.tblEmotionalFeedback.horizontalHeader()
        header.setResizeMode(0, QHeaderView.Stretch)
        header.setResizeMode(1, QHeaderView.Stretch)
        header.setResizeMode(2, QHeaderView.Stretch)
        
        # initialize ROS publisher topics
        rospy.init_node("reha_interface", anonymous=True)
        self._exercise_request_pub = rospy.Publisher("exercise_request", ExerciseRequest, queue_size=1)
        self._exercise_stop_pub = rospy.Publisher("exercise_stop", Bool, queue_size=1)
        self._calibration_request_pub = rospy.Publisher("calibration_request", CalibrationRequest, queue_size=1)
        rospy.Subscriber("exercise_reply", ExerciseReply, self._server_reply_callback)
        rospy.Subscriber("calibration_reply", CalibrationReply, self._server_reply_callback)
        rospy.Subscriber("/plain/image_modified/compressed", CompressedImage, self._img_received_callback)
        rospy.Subscriber("/user_logging/initial_key", String, self._smartcard_detected_callback)
        #self._decryption_node = None

	# initialize some other necessary variables
        self._is_calibrating = False
        self._is_exercise_running = False
        self._bridge = CvBridge()
        
        # connect functions to widgets
        self.btnInternalRotationExercise.clicked.connect(self.btnInternalRotationExerciseClicked)
        self.btnExternalRotationExercise.clicked.connect(self.btnExternalRotationExerciseClicked)
        self.btnAbductionMotionExercise.clicked.connect(self.btnAbductionMotionExerciseClicked)
        self.btnFlexionMotionExercise.clicked.connect(self.btnFlexionMotionExerciseClicked)
        self.btnBegin.clicked.connect(self.btnBeginClicked)
        self.btnStop.clicked.connect(self.btnStopClicked)
        self.btnDefineNewColor.clicked.connect(self.openDefineNewColorWidget)
        self.slNbrBlocks.valueChanged.connect(self.slNbrBlocksValueChanged)
        self.rdFixed.clicked.connect(self.rdFixedClicked)
        self.rdFrequency.clicked.connect(self.rdFrequencyClicked)
        self.btnAddLine.clicked.connect(self.btnAddLineClicked)
        self.cmbFaces.currentIndexChanged.connect(self.cmbFacesCurrentIndexChanged)
        self.actionQuit.triggered.connect(self.closeEvent)
        self.btnDeleteLine.clicked.connect(self.btnDeleteLineClicked)
        self.tblEmotionalFeedback.itemClicked.connect(self.tblEmotionalFeedbackItemClicked)
        self.chkQualitative.clicked.connect(self.chkQualitativeClicked)
        self.chkQuantitative.clicked.connect(self.chkQuantitativeClicked)
        self.btnLoadColorFile.clicked.connect(self.btnLoadColorFileClicked)
        self.btnLoadCalibFile.clicked.connect(self.btnLoadCalibFileClicked)
        self.btnCalibrateNow.clicked.connect(self.btnCalibrateNowClicked)
        self.robot_finished.connect(robot_finished_triggered)
        self.img_received.connect(img_received_triggered)
        self.smartcard_rosmsg_received.connect(smartcard_rosmsg_received_triggered)
        self.logoff_signal_received.connect(logoff_signal_received_triggered)
        self.btnConfirm.clicked.connect(self.btnConfirmClicked)
        self.lnPINCode.textChanged.connect(self.disableErrorLabelOnEdit)
def img_received_triggered(gui, img):
    scene = QGraphicsScene()
    pixmap = QGraphicsPixmapItem(QPixmap(img), None, scene)
    gui.grOriginalImage.setScene(scene)
    gui.grOriginalImage.fitInView(scene.sceneRect(), Qt.KeepAspectRatio)
Exemplo n.º 19
0
 def background_pixmap_item(self):
     return QGraphicsPixmapItem(self.background_pixmap)