當前位置: 首頁>>代碼示例>>Python>>正文


Python ErrorMessageClass.raise_方法代碼示例

本文整理匯總了Python中ErrorMessageClass.raise_方法的典型用法代碼示例。如果您正苦於以下問題:Python ErrorMessageClass.raise_方法的具體用法?Python ErrorMessageClass.raise_怎麽用?Python ErrorMessageClass.raise_使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ErrorMessageClass的用法示例。


在下文中一共展示了ErrorMessageClass.raise_方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: MainWindow

# 需要導入模塊: import ErrorMessageClass [as 別名]
# 或者: from ErrorMessageClass import raise_ [as 別名]

#.........這裏部分代碼省略.........
        
        self.setCentralWidget(self.manage_stock_widget)
        self.stacked_layout.addWidget(self.manage_stock_widget)

    def create_order(self):
        self.title = self.create_title()
        self.title.setText("Create Order")
        self.create_order_instance = createOrderClass()
        self.create_order_layout = QVBoxLayout()
        self.create_order_layout.addWidget(self.title)
        self.create_order_layout.addWidget(self.create_order_instance)
        self.create_order_widget = QWidget()
        self.create_order_widget.setLayout(self.create_order_layout)
        self.setCentralWidget(self.create_order_widget)
        self.stacked_layout.addWidget(self.create_order_widget)
        self.create_order_instance.display_table.update()
        self.create_order_instance.current_order.update()

    def search(self):
        self.search_instance = SearchClass()
        
        self.search_instance.product_right_click_menu.addAction("Manage Stock" , self.EditStock)
        self.search_instance.product_right_click_menu.addAction("Edit Product" , self.EditProduct)
        self.search_instance.product_right_click_menu.addAction("Delete Product" , self.DeleteProduct)

        self.search_instance.member_right_click_menu.addAction("Edit Member" , self.EditMember)
        self.search_instance.member_right_click_menu.addAction("Delete Member" , self.DeleteMember)
        
        self.search_instance.employee_right_click_menu.addAction("Edit Employee" , self.EditEmployee)
        self.search_instance.employee_right_click_menu.addAction("Delete Employee" , self.DeleteEmployee)
        
        self.search_instance.move(750,300)
        self.search_instance.show()
        self.search_instance.raise_()

    def EditStock(self):
        self.stacked_layout.setCurrentIndex(3)
        self.manage_stock_instance.product_id.setText(
            str(self.search_instance.product_id))
        self.manage_stock_instance.find_product_by_id()
        self.search_instance.close()

        self.setFixedSize(900, 850)

    def EditProduct(self):
        self.stacked_layout.setCurrentIndex(1)
        self.edit_product_instance.find_product_id_line_edit.setText(
            str(self.search_instance.product_id))
        self.edit_product_instance.find_product_by_id()
        self.search_instance.close()

        self.setFixedSize(700, 700)
        
    def DeleteProduct(self):
        self.stacked_layout.setCurrentIndex(2)
        self.delete_product_instance.find_product_id_line_edit.setText(
            str(self.search_instance.product_id))
        self.delete_product_instance.find_product_by_id()
        self.search_instance.close()

        self.setFixedSize(700, 700)
        
    def EditMember(self):
        self.stacked_layout.setCurrentIndex(6)
        self.edit_member_instance.find_member_id_line_edit.setText(
            str(self.search_instance.product_id))
開發者ID:mattling9,項目名稱:COMP4Coursework,代碼行數:70,代碼來源:Main.py


注:本文中的ErrorMessageClass.raise_方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。