Пример #1
0
    def showdialog(self, title):
        d = QDialog(self)
        d.setFixedSize(300, 100)
        label = QLabel(self.Error, d)
        label.move(20, 20)
        self.current = os.listdir(self.files)[0][0:4]
        self.roll = QLineEdit(str(self.current), d)
        self.roll.move(50, 20)

        b1 = QPushButton("Ok",d)
        b1.move(125,50)
        d.setWindowTitle(str(title))

        b1.clicked.connect(self.process_frames)
        d.exec_()
Пример #2
0
 def __init__(self):
     """
     Constructor
     """
     ericPic = QPixmap(
         os.path.join(getConfig('ericPixDir'), 'pymakrSplash.png'))
     self.labelAlignment = Qt.Alignment(Qt.AlignBottom | Qt.AlignRight
                                        | Qt.AlignAbsolute)
     super(SplashScreen, self).__init__(ericPic)
     lblVersion = QLabel(self)
     lblVersion.setText(UI.Info.Version)
     lblVersion.adjustSize()
     lblVersion.setStyleSheet("QLabel { color : white; }")
     lblVersion.setAttribute(Qt.WA_TranslucentBackground)
     lblVersion.move(425 - lblVersion.width(), 195)
     self.show()
     self.raise_()  # needed for mac
     QApplication.flush()
Пример #3
0
class MainWindow(QMainWindow):
    def __init__(self, parent=None):
        QMainWindow.__init__(self, parent)

        self.setFixedSize(600, 180)
        self.l0 = QLabel(self)
        self.l0.setFixedWidth(300)
        self.l0.setFixedHeight(40)
        self.l0.setAlignment(Qt.AlignCenter)
        self.l0.setText("Breathing(bpm)")
        self.l0.move(0, 0)

        self.l1 = QLabel(self)
        self.l1.setFixedWidth(300)
        self.l1.setFixedHeight(40)
        self.l1.setAlignment(Qt.AlignCenter)
        self.l1.setText("Heart Rate(bpm)")
        self.l1.move(300, 0)

        pe = QPalette()
        pe.setColor(QPalette.WindowText, Qt.yellow)
        pe.setColor(QPalette.Background, Qt.gray)
        self.l0.setAutoFillBackground(True)
        self.l0.setPalette(pe)
        self.l1.setAutoFillBackground(True)
        self.l1.setPalette(pe)

        self.l0.setFont(QFont("Roman times", 20, QFont.Bold))
        self.l1.setFont(QFont("Roman times", 20, QFont.Bold))

        self.lbr = QLabel(self)
        self.lbr.setFixedWidth(300)
        self.lbr.setFixedHeight(60)
        self.lbr.setAlignment(Qt.AlignCenter)
        self.lbr.setFont(QFont("Roman times", 55, QFont.Bold))
        self.lbr.setText("Breathing")
        self.lbr.move(0, 75)

        self.lhr = QLabel(self)
        self.lhr.setFixedWidth(300)
        self.lhr.setFixedHeight(60)
        self.lhr.setAlignment(Qt.AlignCenter)
        self.lhr.setFont(QFont("Roman times", 55, QFont.Bold))
        self.lhr.setText("Heart Rate")

        self.lhr.move(300, 75)