{"id":20461647,"url":"https://github.com/sunzey/autotest_ui","last_synced_at":"2026-06-06T19:32:02.298Z","repository":{"id":167459682,"uuid":"399335587","full_name":"SunzeY/AutoTest_UI","owner":"SunzeY","description":"a multi-user UI(python) supports user quizing (Final work for BUAA-Pyhton-2021)","archived":false,"fork":false,"pushed_at":"2021-08-24T05:35:47.000Z","size":155,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-05T11:38:21.630Z","etag":null,"topics":["buaa","gui","gui-application","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SunzeY.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-24T04:36:31.000Z","updated_at":"2021-08-24T05:35:49.000Z","dependencies_parsed_at":"2023-08-01T11:16:34.830Z","dependency_job_id":null,"html_url":"https://github.com/SunzeY/AutoTest_UI","commit_stats":null,"previous_names":["sunzey/autotest_ui"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SunzeY/AutoTest_UI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SunzeY%2FAutoTest_UI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SunzeY%2FAutoTest_UI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SunzeY%2FAutoTest_UI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SunzeY%2FAutoTest_UI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SunzeY","download_url":"https://codeload.github.com/SunzeY/AutoTest_UI/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SunzeY%2FAutoTest_UI/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27437002,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-01T02:00:06.371Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["buaa","gui","gui-application","python"],"created_at":"2024-11-15T12:27:19.880Z","updated_at":"2025-12-01T19:07:33.322Z","avatar_url":"https://github.com/SunzeY.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AutoTest_UI\n\n\u003e a multi-user UI(python) supports user quizing    \n\u003e\n\u003e Final work for BUAA-Pyhton-2021\n\n\n\n## Basic Design\n\n\u003cimg src=\"pic.png\" alt=\"pic\" style=\"zoom:20%;\" /\u003e\n\n\n\n## tricks learned\n\n#### Implement foreground background separation in QT (Python)\n\n`gui_front.py` as front page buids framework of the UI-window through     building a class. `gui_back.py` builds a new class to extends the class in front, add attributes and other function call to implement business logic. i.e.\n\n```python\n# front\nclass Ui_MainWindow(PyQt5.QtWidgets.MainWindow):\n\tdef setupUi(self, MainWindow):\n\t\t...\n\tdef retranslateUi(self, MainWindow):\n\t\t...\n\n# back\nclass MyWindow(QMainWindow, gui_front.Ui_MainWindow):\n    def __init__(self, parent=None):\n        super(MyWindow, self).__init__(parent)\n        self.setupUi(self)\n        ...attributes\n    \n    ...Business logic function call  \n```\n\nsame apply to `QDialog` and other `QtWidgets`.\n\n\n\n#### matplotlib canvas interface to Qt.stateGraph\n\ncreate a class `Figure_Bar` extends `matplotlib.backends.backend_qt5agg.FigureCanvasQTAgg`, buid connection between `pyplot.figure` and `QT.stateGraph`, call `showimg` function in `Figure_Bar` when UI need picture refreshed.\n\n```\n# gui_back.py\nself.myImage = draw.Figure_Bar(width, height)\nself.myQGraphicsProxyWidget = self.myGraphyScene.addWidget(self.myImage)\n```\n\n```python\n# draw.py\nimport matplotlib\nmatplotlib.use(\"Qt5Agg\")\nfrom matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg\nfrom matplotlib import pyplot\n\npyplot.rcParams['font.sans-serif'] = ['SimHei']\npyplot.rcParams['axes.unicode_minus'] = False\n\n\nclass Figure_Bar(FigureCanvasQTAgg):\n\n    def __init__(self, width, height, parent=None):\n        self.fig = pyplot.figure(figsize=(width, height), facecolor='#FFFFFF', dpi=100, edgecolor='#FFFFFF')\n        FigureCanvasQTAgg.__init__(self, self.fig)\n        self.setParent(parent)\n\n        self.myAxes = self.fig.add_subplot(111)\n\n    def ShowImage1(self, correctTime, answerTime):\n        self.myAxes.clear()\n        self.myAxes.barh([0], [answerTime],  height=0.01, color='red', label=\"FalseTimes\", align='center')\n        self.myAxes.legend()\n        self.myAxes.barh([0], [correctTime], height=0.01, color='green', label=\"correctTimes\", align='center')\n        self.myAxes.legend()\n        self.fig.canvas.draw()\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsunzey%2Fautotest_ui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsunzey%2Fautotest_ui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsunzey%2Fautotest_ui/lists"}