Exemple #1
0
    def __get_single_character_input_key(self, character):
        button = FontStretchingButton(resize_ratio=0.5)
        button.setObjectName("input_tax_code_widget_key_{}".format(character))
        button.setText(character)
        button.clicked.connect(lambda: self.insert_new_text(character))

        return button
Exemple #2
0
    def __add_clear_button_to_layout(self, layout):
        button = FontStretchingButton(resize_ratio=0.5)
        button.setObjectName("input_tax_code_widget_clear")
        button.setText("清除")
        button.clicked.connect(lambda: self.clear_text())

        layout.addWidget(button, 2, 2, 1, 2)

        return button
Exemple #3
0
    def __get_confirm_button(self):
        button = FontStretchingButton(resize_ratio=0.3)
        button.setText("進入設定頁面")
        button.setObjectName("main_widget_button")
        # button.setStyleSheet(
        #     """
        #       QPushButton#main_widget_button
        #       {{
        #         color: white;
        #         border-image: url(\"{}\");
        #       }}
        #     """.format(ResourceGetter.get_resource("Base", "confirm_button.png"))
        # )
        button.clicked.connect(lambda: self.query_operation())

        return button
Exemple #4
0
    def __confirm_button(self):
        update_button = FontStretchingButton(resize_ratio=0.3)
        update_button.setText("確定")
        update_button.setObjectName("input_passwd_widget_confirm_button")
        # update_button.setStyleSheet(
        #     """
        #       QPushButton#input_passwd_widget_confirm_button
        #       {{
        #         color: white;
        #         border-image: url(\"{}\");
        #       }}
        #     """.format(ResourceGetter.get_resource("Base", "confirm_button.png"))
        # )

        update_button.clicked.connect(lambda: self.send_command())

        return update_button
Exemple #5
0
    def __cancel_button(self):
        cancel_button = FontStretchingButton(resize_ratio=0.3)
        cancel_button.setText("取消")
        cancel_button.setObjectName("input_passwd_widget_cancel_button")
        # cancel_button.setStyleSheet(
        #     """
        #       QPushButton#input_passwd_widget_cancel_button
        #       {{
        #         color: white;
        #         border-image: url(\"{}\");
        #       }}
        #     """.format(ResourceGetter.get_resource("Base", "confirm_button.png"))
        # )

        cancel_button.clicked.connect(
            lambda: OperationWidgetUpdater.update_widget_by_command("back"))

        return cancel_button