示例#1
0
class BrubMainWindow(QMainWindow):
    def __init__(self, parent=None):

        QMainWindow.__init__(self, parent)

        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)

        self.timer = QTimer(self)
        self.timer.timeout.connect(self.second)
        self.timer.start(1000)

    @Slot()
    def second(self):
        current = time.localtime()

        broob, broobz = broobhour(current.tm_hour)

        clockstring = "{0:02}:{1:02} {2}".format(broob, current.tm_min, broobz)

        self.ui.clock.setText(clockstring)

        if current.tm_sec == 0 and (current.tm_min == 30
                                    or current.tm_min == 0):
            speak(broob, current.tm_min, broobz)
示例#2
0
    def __init__(self, parent=None):

        QMainWindow.__init__(self, parent)

        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)

        self.timer = QTimer(self)
        self.timer.timeout.connect(self.second)
        self.timer.start(1000)
示例#3
0
    def __init__(self, parent=None):

        QMainWindow.__init__(self, parent)

        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)

        self.timer = QTimer(self)
        self.timer.timeout.connect(self.second)
        self.timer.start(1000)
示例#4
0
class BrubMainWindow(QMainWindow):
    def __init__(self, parent=None):

        QMainWindow.__init__(self, parent)

        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)

        self.timer = QTimer(self)
        self.timer.timeout.connect(self.second)
        self.timer.start(1000)

    @Slot()
    def second(self):
        current = time.localtime()

        broob, broobz = broobhour(current.tm_hour)

        clockstring = "{0:02}:{1:02} {2}".format(broob, current.tm_min, broobz)

        self.ui.clock.setText(clockstring)

        if current.tm_sec == 0 and (current.tm_min == 30 or current.tm_min == 0):
            speak(broob, current.tm_min, broobz)