コード例 #1
0
    def __init__(self, *args, **kwargs):
        QWidget.__init__(self, *args, **kwargs)
        self.setWindowTitle("Stm Real Time Simulator")

        self.mainLayout=QVBoxLayout()
        self.upLayout=QFormLayout()
        self.layout=QGridLayout()

        self.mainLayout.addLayout(self.upLayout,30)
        self.mainLayout.addLayout(self.layout,70)

        self.port_label=QLabel("Port :")
        self.port=QComboBox()
        self.port.setStyleSheet("font-size:8pt;")
        self.list_port()
        self.frequency_label=QLabel("Frequency(Hz) :")
        self.frequency=QLineEdit()
        self.baudrate_label=QLabel("BaudRate :")
        self.baudrate=QComboBox()
        self.baudrate.addItems(["9600"])
        self.pitch=QLabel("Pitch :  ")
        self.pitch_value=QLabel("...")
        self.pitch.setStyleSheet("color:red;")
        self.pitch_value.setStyleSheet("color:red;")
        self.roll=QLabel("Roll :  ")
        self.roll_value=QLabel("...")
        self.roll.setStyleSheet("color:green;")
        self.roll_value.setStyleSheet("color:green;")

        self.btn_connect=QPushButton("Enter",self)
        self.btn_connect.clicked.connect(self.connect_system)
        
        self.btn_exit=QPushButton("Exit",self)
        self.btn_exit.clicked.connect(self.exit)

        self.upLayout.addRow(self.port_label,self.port)
        self.upLayout.addRow(self.baudrate_label,self.baudrate)
        self.upLayout.addRow(self.frequency_label,self.frequency)
        self.upLayout.addRow(self.btn_connect,self.btn_exit)
        self.upLayout.addRow(self.pitch,self.pitch_value)
        self.upLayout.addRow(self.roll,self.roll_value)
        
        self.adi = qfi_ADI.qfi_ADI(self)
        self.adi.resize(300, 300)
        self.adi.reinit()
        self.layout.addWidget(self.adi, 0, 0)

        self.setLayout(self.mainLayout)
        
        self.timer=QTimer()
        self.timer.setInterval(100)
        self.timer.timeout.connect(self.update1)
        self.show()
コード例 #2
0
    def __init__(self, *args, **kwargs):
        QWidget.__init__(self, *args, **kwargs)

        self.layout = QGridLayout()

        self.adi = qfi_ADI.qfi_ADI(self)
        self.adi.resize(240, 240)
        self.adi.reinit()
        self.layout.addWidget(self.adi, 0, 0)

        self.alt = qfi_ALT.qfi_ALT(self)
        self.alt.resize(240, 240)
        self.alt.reinit()
        self.layout.addWidget(self.alt, 0, 1)

        self.hsi = qfi_HSI.qfi_HSI(self)
        self.hsi.resize(240, 240)
        self.hsi.reinit()
        self.layout.addWidget(self.hsi, 1, 0)

        self.si = qfi_SI.qfi_SI(self)
        self.si.resize(240, 240)
        self.si.reinit()
        self.layout.addWidget(self.si, 1, 1)

        self.vsi = qfi_VSI.qfi_VSI(self)
        self.vsi.resize(240, 240)
        self.vsi.reinit()
        self.layout.addWidget(self.vsi, 2, 0)

        self.tc = qfi_TC.qfi_TC(self)
        self.tc.resize(240, 240)
        self.tc.reinit()
        self.layout.addWidget(self.tc, 2, 1)

        self.setLayout(self.layout)

        self.show()
コード例 #3
0
ファイル: sensorsWidget.py プロジェクト: lr-morales/JdeRobot
    def initUI(self):

        self.mainLayout = QHBoxLayout()
        self.indLayout = QGridLayout()
        self.horizonLayout = QVBoxLayout()
        self.horizonData = QGridLayout()
        self.compassLayout = QVBoxLayout()
        self.compassData = QGridLayout()
        self.altLayout = QVBoxLayout()
        self.altData = QGridLayout()
        self.batteryLayout = QVBoxLayout()
        self.batteryData = QGridLayout()

        self.setMinimumSize(750, 450)
        self.setMaximumSize(750, 450)

        self.setWindowTitle("Sensors")

        self.pitchLabel = QLabel('Pitch:', self)
        self.pitchValueLabel = QLabel('0', self)
        self.pitchValueLabel.setAlignment(Qt.AlignRight | Qt.AlignTrailing | Qt.AlignVCenter)

        self.rollLabel = QLabel('Roll:', self)
        self.rollValueLabel = QLabel('0', self)
        self.rollValueLabel.setAlignment(Qt.AlignRight | Qt.AlignTrailing | Qt.AlignVCenter)

        self.yawLabel = QLabel('Yaw:', self)
        self.yawValueLabel = QLabel('0', self)
        self.yawValueLabel.setAlignment(Qt.AlignRight | Qt.AlignTrailing | Qt.AlignVCenter)

        self.altLabel = QLabel('Alt:', self)
        self.altValueLabel = QLabel('0', self)
        self.altValueLabel.setAlignment(Qt.AlignRight | Qt.AlignTrailing | Qt.AlignVCenter)

        self.pitchgLabel = QLabel("\272", self)
        self.rollgLabel = QLabel("\272", self)
        self.yawgLabel = QLabel("\272", self)
        self.altmLabel = QLabel('m', self)

        hSpacer = QSpacerItem(100, 30, QSizePolicy.Ignored, QSizePolicy.Ignored)

        self.horizonData.addItem(hSpacer, 0, 0, 1, 1, Qt.AlignLeft)
        self.horizonData.addWidget(self.pitchLabel, 0, 1, Qt.AlignCenter)
        self.horizonData.addWidget(self.pitchValueLabel, 0, 2, Qt.AlignCenter)
        self.horizonData.addWidget(self.pitchgLabel, 0, 3, Qt.AlignCenter)
        self.horizonData.addWidget(self.rollLabel, 0, 4, Qt.AlignCenter)
        self.horizonData.addWidget(self.rollValueLabel, 0, 5, Qt.AlignCenter)
        self.horizonData.addWidget(self.rollgLabel, 0, 6, Qt.AlignCenter)
        self.horizonData.addItem(hSpacer, 0, 7, 1, 1, Qt.AlignRight)

        self.compassData.addItem(hSpacer, 0, 0, 1, 1, Qt.AlignLeft)
        self.compassData.addWidget(self.yawLabel, 0, 1, Qt.AlignCenter)
        self.compassData.addWidget(self.yawValueLabel, 0, 2, Qt.AlignCenter)
        self.compassData.addWidget(self.yawgLabel, 0, 3, Qt.AlignCenter)
        self.compassData.addItem(hSpacer, 0, 4, 1, 1, Qt.AlignRight)

        self.altData.addItem(hSpacer, 0, 0, 1, 1, Qt.AlignLeft)
        self.altData.addWidget(self.altLabel, 0, 1, Qt.AlignCenter)
        self.altData.addWidget(self.altValueLabel, 0, 2, Qt.AlignCenter)
        self.altData.addWidget(self.altmLabel, 0, 3, Qt.AlignCenter)
        self.altData.addItem(hSpacer, 0, 4, 1, 1, Qt.AlignLeft)

        self.altd = qfi_ALT.qfi_ALT(self)

        self.altd.setFixedSize(QtCore.QSize(200,200))
        self.altLayout.addWidget(self.altd)
        self.altLayout.addLayout(self.altData)
        # self.altd.move(420,50)

        self.compass = qfi_HSI.qfi_HSI(self)
        self.compass.setFixedSize(QtCore.QSize(200, 200))
        self.compassLayout.addWidget(self.compass)
        self.compassLayout.addLayout(self.compassData)

        self.horizon = qfi_ADI.qfi_ADI(self)
        self.horizon.setFixedSize(QtCore.QSize(200, 200))
        self.horizonLayout.addWidget(self.horizon)
        self.horizonLayout.addLayout(self.horizonData)


        self.velLinX = qfi_SI.qfi_SI(self)
        self.velLinX.setFixedSize(QtCore.QSize(150, 150))
        # self.velLinX.move(60,270)
        self.velXLabel = QLabel('Linear X (m/s)', self)
        # self.velXLabel.move(95,420)


        self.velLinY = qfi_SI.qfi_SI(self)
        self.velLinY.setFixedSize(QtCore.QSize(150, 150))
        # self.velLinY.move(240,270)
        self.velYLabel = QLabel('Linear Y (m/s)', self)
        # self.velYLabel.move(275,420)

        self.velLinZ = qfi_SI.qfi_SI(self)
        self.velLinZ.setFixedSize(QtCore.QSize(150, 150))
        # self.velLinZ.setLabel("8 m/s")
        # self.velLinZ.move(420,270)
        self.velZLabel = QLabel('Linear Z (m/s)', self)
        # self.velZLabel.move(455,420)

        self.indLayout.addLayout(self.horizonLayout, 0, 0, Qt.AlignCenter)
        self.indLayout.addLayout(self.compassLayout, 0, 1, Qt.AlignCenter)
        self.indLayout.addLayout(self.altLayout, 0, 2, Qt.AlignCenter)
        self.indLayout.addWidget(self.velLinX, 1, 0, Qt.AlignCenter)
        self.indLayout.addWidget(self.velLinY, 1, 1, Qt.AlignCenter)
        self.indLayout.addWidget(self.velLinZ, 1, 2, Qt.AlignCenter)
        self.indLayout.addWidget(self.velXLabel, 2, 0, Qt.AlignCenter)
        self.indLayout.addWidget(self.velYLabel, 2, 1, Qt.AlignCenter)
        self.indLayout.addWidget(self.velZLabel, 2, 2, Qt.AlignCenter)

        self.battery=QProgressBar(self)
        self.battery.setValue(0)
        self.battery.resize(56,241)
        self.battery.setOrientation(Qt.Vertical)
        self.battery.setTextVisible(False)

        self.batteryLabel=QLabel('Battery (%)',self)
        self.batteryValueLabel = QLabel('0', self)
        self.batteryValueLabel.setAlignment(Qt.AlignRight | Qt.AlignTrailing | Qt.AlignVCenter)

        self.batteryData.addItem(hSpacer, 0, 0, 1, 1, Qt.AlignLeft)
        self.batteryData.addWidget(self.batteryLabel, 0, 1, Qt.AlignCenter)
        self.batteryData.addWidget(self.batteryValueLabel, 0, 2, Qt.AlignCenter)
        self.batteryData.addItem(hSpacer, 0, 4, 1, 1, Qt.AlignLeft)

        self.batteryLayout.addWidget(self.battery, 0,  Qt.AlignHCenter)
        self.batteryLayout.addLayout(self.batteryData)

        self.mainLayout.addLayout(self.indLayout)
        self.mainLayout.addLayout(self.batteryLayout)
        self.setLayout(self.mainLayout);
コード例 #4
0
    def initUI(self):

        self.mainLayout = QGridLayout()
        self.horizonLayout = QVBoxLayout()
        self.horizonData = QGridLayout()
        self.compassLayout = QVBoxLayout()
        self.compassData = QGridLayout()
        self.altLayout = QVBoxLayout()
        self.altData = QGridLayout()
        
        self.setMinimumSize(660,450)
        self.setMaximumSize(660,450)
        
        self.setWindowTitle("Sensors")
        
        

       	self.pitchLabel=QLabel('Pitch:',self)
        self.pitchValueLabel=QLabel('0',self)
        self.pitchValueLabel.setAlignment(Qt.AlignRight | Qt.AlignTrailing | Qt.AlignVCenter)
        
        
        self.rollLabel=QLabel('Roll:',self)
        self.rollValueLabel=QLabel('0',self)
        self.rollValueLabel.setAlignment(Qt.AlignRight | Qt.AlignTrailing | Qt.AlignVCenter)
        
        

        self.yawLabel=QLabel('Yaw:',self)
        self.yawValueLabel=QLabel('0',self)
        self.yawValueLabel.setAlignment(Qt.AlignRight | Qt.AlignTrailing | Qt.AlignVCenter)
        
        self.altLabel=QLabel('Alt:',self)
        self.altValueLabel=QLabel('0',self)
        self.altValueLabel.setAlignment(Qt.AlignRight | Qt.AlignTrailing | Qt.AlignVCenter)
        
        self.pitchgLabel = QLabel ("\272", self)
        self.rollgLabel = QLabel ("\272", self)
        self.yawgLabel = QLabel ("\272", self)
        self.altmLabel = QLabel ('m', self)

        hSpacer = QSpacerItem(100, 30, QSizePolicy.Ignored, QSizePolicy.Ignored)


        self.horizonData.addItem(hSpacer,0,0,1,1, Qt.AlignLeft)
        self.horizonData.addWidget(self.pitchLabel,0,1,Qt.AlignCenter)
        self.horizonData.addWidget(self.pitchValueLabel,0,2,Qt.AlignCenter)
        self.horizonData.addWidget(self.pitchgLabel,0,3,Qt.AlignCenter)
        self.horizonData.addWidget(self.rollLabel,0,4,Qt.AlignCenter)
        self.horizonData.addWidget(self.rollValueLabel,0,5,Qt.AlignCenter)
        self.horizonData.addWidget(self.rollgLabel,0,6,Qt.AlignCenter)
        self.horizonData.addItem(hSpacer,0,7,1,1, Qt.AlignRight)

        self.compassData.addItem(hSpacer,0,0,1,1, Qt.AlignLeft)
        self.compassData.addWidget(self.yawLabel,0,1,Qt.AlignCenter)
        self.compassData.addWidget(self.yawValueLabel,0,2,Qt.AlignCenter)
        self.compassData.addWidget(self.yawgLabel,0,3,Qt.AlignCenter)
        self.compassData.addItem(hSpacer,0,4,1,1, Qt.AlignRight)

        self.altData.addItem(hSpacer,0,0,1,1, Qt.AlignLeft)
        self.altData.addWidget(self.altLabel,0,1,Qt.AlignCenter)
        self.altData.addWidget(self.altValueLabel,0,2,Qt.AlignCenter)
        self.altData.addWidget(self.altmLabel,0,3,Qt.AlignCenter)
        self.altData.addItem(hSpacer,0,4,1,1, Qt.AlignLeft)


        self.altd=qfi_ALT.qfi_ALT(self)
        self.altd.resize(200,200)
        self.altLayout.addWidget(self.altd)
        self.altLayout.addLayout(self.altData)
        #self.altd.move(420,50)

        self.compass=qfi_HSI.qfi_HSI(self)
        self.compass.resize(200,200)
        self.compassLayout.addWidget(self.compass)
        self.compassLayout.addLayout(self.compassData)
        

        self.horizon=qfi_ADI.qfi_ADI(self)
        self.horizon.resize(200,200)
        self.horizonLayout.addWidget(self.horizon)
        self.horizonLayout.addLayout(self.horizonData)
        

        #self.battery=Qwt.QwtThermo(self)
        #self.battery.setMaxValue(100.0)
        #self.battery.setMinValue(0.0)
        #self.battery.setPipeWidth(10)
        
        #self.battery.move(580,10)
        #self.battery.resize(56,241)
        #self.batteryLabel=QLabel('Battery (%)',self)
        #self.batteryLabel.move(580,251)

        self.velLinX=qfi_SI.qfi_SI(self)
        self.velLinX.resize(150,150)
        #self.velLinX.move(60,270)
        self.velXLabel = QLabel('Linear X (m/s)',self)        
        #self.velXLabel.move(95,420)

        
        self.velLinY=qfi_SI.qfi_SI(self)
        self.velLinY.resize(150,150)
        #self.velLinY.move(240,270)
        self.velYLabel = QLabel('Linear Y (m/s)',self)
        #self.velYLabel.move(275,420)             
        
        self.velLinZ=qfi_SI.qfi_SI(self)
        self.velLinZ.resize(150,150)
        #self.velLinZ.setLabel("8 m/s")
        #self.velLinZ.move(420,270)
        self.velZLabel = QLabel('Linear Z (m/s)',self)
        #self.velZLabel.move(455,420)

        self.mainLayout.addLayout(self.horizonLayout,0,0,Qt.AlignCenter)
        self.mainLayout.addLayout(self.compassLayout,0,1,Qt.AlignCenter)
        self.mainLayout.addLayout(self.altLayout,0,2,Qt.AlignCenter)
        self.mainLayout.addWidget(self.velLinX,1,0,Qt.AlignCenter)
        self.mainLayout.addWidget(self.velLinY,1,1,Qt.AlignCenter)
        self.mainLayout.addWidget(self.velLinZ,1,2,Qt.AlignCenter)
        self.mainLayout.addWidget(self.velXLabel,2,0,Qt.AlignCenter)
        self.mainLayout.addWidget(self.velYLabel,2,1,Qt.AlignCenter)
        self.mainLayout.addWidget(self.velZLabel,2,2,Qt.AlignCenter)
        self.setLayout(self.mainLayout);
コード例 #5
0
    def initUI(self):

        self.mainLayout = QHBoxLayout()
        self.indLayout = QGridLayout()
        self.horizonLayout = QVBoxLayout()
        self.horizonData = QGridLayout()
        self.compassLayout = QVBoxLayout()
        self.compassData = QGridLayout()
        self.altLayout = QVBoxLayout()
        self.altData = QGridLayout()
        self.batteryLayout = QVBoxLayout()
        self.batteryData = QGridLayout()

        self.setMinimumSize(750, 450)
        self.setMaximumSize(750, 450)

        self.setWindowTitle("Sensors")

        self.pitchLabel = QLabel('Pitch:', self)
        self.pitchValueLabel = QLabel('0', self)
        self.pitchValueLabel.setAlignment(Qt.AlignRight | Qt.AlignTrailing
                                          | Qt.AlignVCenter)

        self.rollLabel = QLabel('Roll:', self)
        self.rollValueLabel = QLabel('0', self)
        self.rollValueLabel.setAlignment(Qt.AlignRight | Qt.AlignTrailing
                                         | Qt.AlignVCenter)

        self.yawLabel = QLabel('Yaw:', self)
        self.yawValueLabel = QLabel('0', self)
        self.yawValueLabel.setAlignment(Qt.AlignRight | Qt.AlignTrailing
                                        | Qt.AlignVCenter)

        self.altLabel = QLabel('Alt:', self)
        self.altValueLabel = QLabel('0', self)
        self.altValueLabel.setAlignment(Qt.AlignRight | Qt.AlignTrailing
                                        | Qt.AlignVCenter)

        self.pitchgLabel = QLabel("\272", self)
        self.rollgLabel = QLabel("\272", self)
        self.yawgLabel = QLabel("\272", self)
        self.altmLabel = QLabel('m', self)

        hSpacer = QSpacerItem(100, 30, QSizePolicy.Ignored,
                              QSizePolicy.Ignored)

        self.horizonData.addItem(hSpacer, 0, 0, 1, 1, Qt.AlignLeft)
        self.horizonData.addWidget(self.pitchLabel, 0, 1, Qt.AlignCenter)
        self.horizonData.addWidget(self.pitchValueLabel, 0, 2, Qt.AlignCenter)
        self.horizonData.addWidget(self.pitchgLabel, 0, 3, Qt.AlignCenter)
        self.horizonData.addWidget(self.rollLabel, 0, 4, Qt.AlignCenter)
        self.horizonData.addWidget(self.rollValueLabel, 0, 5, Qt.AlignCenter)
        self.horizonData.addWidget(self.rollgLabel, 0, 6, Qt.AlignCenter)
        self.horizonData.addItem(hSpacer, 0, 7, 1, 1, Qt.AlignRight)

        self.compassData.addItem(hSpacer, 0, 0, 1, 1, Qt.AlignLeft)
        self.compassData.addWidget(self.yawLabel, 0, 1, Qt.AlignCenter)
        self.compassData.addWidget(self.yawValueLabel, 0, 2, Qt.AlignCenter)
        self.compassData.addWidget(self.yawgLabel, 0, 3, Qt.AlignCenter)
        self.compassData.addItem(hSpacer, 0, 4, 1, 1, Qt.AlignRight)

        self.altData.addItem(hSpacer, 0, 0, 1, 1, Qt.AlignLeft)
        self.altData.addWidget(self.altLabel, 0, 1, Qt.AlignCenter)
        self.altData.addWidget(self.altValueLabel, 0, 2, Qt.AlignCenter)
        self.altData.addWidget(self.altmLabel, 0, 3, Qt.AlignCenter)
        self.altData.addItem(hSpacer, 0, 4, 1, 1, Qt.AlignLeft)

        self.altd = qfi_ALT.qfi_ALT(self)

        self.altd.setFixedSize(QtCore.QSize(200, 200))
        self.altLayout.addWidget(self.altd)
        self.altLayout.addLayout(self.altData)
        # self.altd.move(420,50)

        self.compass = qfi_HSI.qfi_HSI(self)
        self.compass.setFixedSize(QtCore.QSize(200, 200))
        self.compassLayout.addWidget(self.compass)
        self.compassLayout.addLayout(self.compassData)

        self.horizon = qfi_ADI.qfi_ADI(self)
        self.horizon.setFixedSize(QtCore.QSize(200, 200))
        self.horizonLayout.addWidget(self.horizon)
        self.horizonLayout.addLayout(self.horizonData)

        self.velLinX = qfi_SI.qfi_SI(self)
        self.velLinX.setFixedSize(QtCore.QSize(150, 150))
        # self.velLinX.move(60,270)
        self.velXLabel = QLabel('Linear X (m/s)', self)
        # self.velXLabel.move(95,420)

        self.velLinY = qfi_SI.qfi_SI(self)
        self.velLinY.setFixedSize(QtCore.QSize(150, 150))
        # self.velLinY.move(240,270)
        self.velYLabel = QLabel('Linear Y (m/s)', self)
        # self.velYLabel.move(275,420)

        self.velLinZ = qfi_SI.qfi_SI(self)
        self.velLinZ.setFixedSize(QtCore.QSize(150, 150))
        # self.velLinZ.setLabel("8 m/s")
        # self.velLinZ.move(420,270)
        self.velZLabel = QLabel('Linear Z (m/s)', self)
        # self.velZLabel.move(455,420)

        self.indLayout.addLayout(self.horizonLayout, 0, 0, Qt.AlignCenter)
        self.indLayout.addLayout(self.compassLayout, 0, 1, Qt.AlignCenter)
        self.indLayout.addLayout(self.altLayout, 0, 2, Qt.AlignCenter)
        self.indLayout.addWidget(self.velLinX, 1, 0, Qt.AlignCenter)
        self.indLayout.addWidget(self.velLinY, 1, 1, Qt.AlignCenter)
        self.indLayout.addWidget(self.velLinZ, 1, 2, Qt.AlignCenter)
        self.indLayout.addWidget(self.velXLabel, 2, 0, Qt.AlignCenter)
        self.indLayout.addWidget(self.velYLabel, 2, 1, Qt.AlignCenter)
        self.indLayout.addWidget(self.velZLabel, 2, 2, Qt.AlignCenter)

        self.battery = QProgressBar(self)
        self.battery.setValue(0)
        self.battery.resize(56, 241)
        self.battery.setOrientation(Qt.Vertical)
        self.battery.setTextVisible(False)

        self.batteryLabel = QLabel('Battery (%)', self)
        self.batteryValueLabel = QLabel('0', self)
        self.batteryValueLabel.setAlignment(Qt.AlignRight | Qt.AlignTrailing
                                            | Qt.AlignVCenter)

        self.batteryData.addItem(hSpacer, 0, 0, 1, 1, Qt.AlignLeft)
        self.batteryData.addWidget(self.batteryLabel, 0, 1, Qt.AlignCenter)
        self.batteryData.addWidget(self.batteryValueLabel, 0, 2,
                                   Qt.AlignCenter)
        self.batteryData.addItem(hSpacer, 0, 4, 1, 1, Qt.AlignLeft)

        self.batteryLayout.addWidget(self.battery, 0, Qt.AlignHCenter)
        self.batteryLayout.addLayout(self.batteryData)

        self.mainLayout.addLayout(self.indLayout)
        self.mainLayout.addLayout(self.batteryLayout)
        self.setLayout(self.mainLayout)
コード例 #6
0
    def initUI(self):

        self.mainLayout = QGridLayout()
        self.horizonLayout = QVBoxLayout()
        self.horizonData = QGridLayout()
        self.compassLayout = QVBoxLayout()
        self.compassData = QGridLayout()
        self.altLayout = QVBoxLayout()
        self.altData = QGridLayout()

        self.setMinimumSize(660, 450)
        self.setMaximumSize(660, 450)

        self.setWindowTitle("Sensors")

        self.pitchLabel = QLabel('Pitch:', self)
        self.pitchValueLabel = QLabel('0', self)
        self.pitchValueLabel.setAlignment(Qt.AlignRight | Qt.AlignTrailing
                                          | Qt.AlignVCenter)

        self.rollLabel = QLabel('Roll:', self)
        self.rollValueLabel = QLabel('0', self)
        self.rollValueLabel.setAlignment(Qt.AlignRight | Qt.AlignTrailing
                                         | Qt.AlignVCenter)

        self.yawLabel = QLabel('Yaw:', self)
        self.yawValueLabel = QLabel('0', self)
        self.yawValueLabel.setAlignment(Qt.AlignRight | Qt.AlignTrailing
                                        | Qt.AlignVCenter)

        self.altLabel = QLabel('Alt:', self)
        self.altValueLabel = QLabel('0', self)
        self.altValueLabel.setAlignment(Qt.AlignRight | Qt.AlignTrailing
                                        | Qt.AlignVCenter)

        self.pitchgLabel = QLabel("\272", self)
        self.rollgLabel = QLabel("\272", self)
        self.yawgLabel = QLabel("\272", self)
        self.altmLabel = QLabel('m', self)

        hSpacer = QSpacerItem(100, 30, QSizePolicy.Ignored,
                              QSizePolicy.Ignored)

        self.horizonData.addItem(hSpacer, 0, 0, 1, 1, Qt.AlignLeft)
        self.horizonData.addWidget(self.pitchLabel, 0, 1, Qt.AlignCenter)
        self.horizonData.addWidget(self.pitchValueLabel, 0, 2, Qt.AlignCenter)
        self.horizonData.addWidget(self.pitchgLabel, 0, 3, Qt.AlignCenter)
        self.horizonData.addWidget(self.rollLabel, 0, 4, Qt.AlignCenter)
        self.horizonData.addWidget(self.rollValueLabel, 0, 5, Qt.AlignCenter)
        self.horizonData.addWidget(self.rollgLabel, 0, 6, Qt.AlignCenter)
        self.horizonData.addItem(hSpacer, 0, 7, 1, 1, Qt.AlignRight)

        self.compassData.addItem(hSpacer, 0, 0, 1, 1, Qt.AlignLeft)
        self.compassData.addWidget(self.yawLabel, 0, 1, Qt.AlignCenter)
        self.compassData.addWidget(self.yawValueLabel, 0, 2, Qt.AlignCenter)
        self.compassData.addWidget(self.yawgLabel, 0, 3, Qt.AlignCenter)
        self.compassData.addItem(hSpacer, 0, 4, 1, 1, Qt.AlignRight)

        self.altData.addItem(hSpacer, 0, 0, 1, 1, Qt.AlignLeft)
        self.altData.addWidget(self.altLabel, 0, 1, Qt.AlignCenter)
        self.altData.addWidget(self.altValueLabel, 0, 2, Qt.AlignCenter)
        self.altData.addWidget(self.altmLabel, 0, 3, Qt.AlignCenter)
        self.altData.addItem(hSpacer, 0, 4, 1, 1, Qt.AlignLeft)

        self.altd = qfi_ALT.qfi_ALT(self)
        self.altd.resize(200, 200)
        self.altLayout.addWidget(self.altd)
        self.altLayout.addLayout(self.altData)
        #self.altd.move(420,50)

        self.compass = qfi_HSI.qfi_HSI(self)
        self.compass.resize(200, 200)
        self.compassLayout.addWidget(self.compass)
        self.compassLayout.addLayout(self.compassData)

        self.horizon = qfi_ADI.qfi_ADI(self)
        self.horizon.resize(200, 200)
        self.horizonLayout.addWidget(self.horizon)
        self.horizonLayout.addLayout(self.horizonData)

        #self.battery=Qwt.QwtThermo(self)
        #self.battery.setMaxValue(100.0)
        #self.battery.setMinValue(0.0)
        #self.battery.setPipeWidth(10)

        #self.battery.move(580,10)
        #self.battery.resize(56,241)
        #self.batteryLabel=QLabel('Battery (%)',self)
        #self.batteryLabel.move(580,251)

        self.velLinX = qfi_SI.qfi_SI(self)
        self.velLinX.resize(150, 150)
        #self.velLinX.move(60,270)
        self.velXLabel = QLabel('Linear X (m/s)', self)
        #self.velXLabel.move(95,420)

        self.velLinY = qfi_SI.qfi_SI(self)
        self.velLinY.resize(150, 150)
        #self.velLinY.move(240,270)
        self.velYLabel = QLabel('Linear Y (m/s)', self)
        #self.velYLabel.move(275,420)

        self.velLinZ = qfi_SI.qfi_SI(self)
        self.velLinZ.resize(150, 150)
        #self.velLinZ.setLabel("8 m/s")
        #self.velLinZ.move(420,270)
        self.velZLabel = QLabel('Linear Z (m/s)', self)
        #self.velZLabel.move(455,420)

        self.mainLayout.addLayout(self.horizonLayout, 0, 0, Qt.AlignCenter)
        self.mainLayout.addLayout(self.compassLayout, 0, 1, Qt.AlignCenter)
        self.mainLayout.addLayout(self.altLayout, 0, 2, Qt.AlignCenter)
        self.mainLayout.addWidget(self.velLinX, 1, 0, Qt.AlignCenter)
        self.mainLayout.addWidget(self.velLinY, 1, 1, Qt.AlignCenter)
        self.mainLayout.addWidget(self.velLinZ, 1, 2, Qt.AlignCenter)
        self.mainLayout.addWidget(self.velXLabel, 2, 0, Qt.AlignCenter)
        self.mainLayout.addWidget(self.velYLabel, 2, 1, Qt.AlignCenter)
        self.mainLayout.addWidget(self.velZLabel, 2, 2, Qt.AlignCenter)
        self.setLayout(self.mainLayout)