diff --git a/src/controller.py b/src/controller.py index d90966b06c911accc18feabd154a0fdbcb00bd2a..d890e705c9b84dc7a5010d85affd34c1e9da8c6f 100644 --- a/src/controller.py +++ b/src/controller.py @@ -18,7 +18,9 @@ class controller: self.listLatihan = listLatihan2() self.listLatihan.switch.connect(self.fromListLatihan) self.customize = customizeWorkout() + self.customize.switch.connect(self.fromCustomize) self.plan = plan() + # self.plan.switch.connect(self.fromPlan) pass @@ -53,6 +55,26 @@ class controller: self.dashboard.show() elif (page == "customize"): self.customize.show() + elif (page == "plan"): + self.plan.show() + + def fromPlan(self, page): + self.plan.close() + if (page == "dashboard"): + self.dashboard.show() + elif (page == "customize"): + self.customize.show() + elif (page == "listLatihan"): + self.listLatihan.show() + + def fromCustomize(self, page): + self.customize.close() + if (page == "dashboard"): + self.dashboard.show() + elif (page == "listLatihan"): + self.listLatihan.show() + elif (page == "plan"): + self.plan.show() if __name__ == "__main__": app = QApplication(sys.argv) diff --git a/src/listlatihan2.py b/src/listlatihan2.py index 0b618542efc303012bee8fe2b652aba81ebee346..23b6f5c23a32970fd183ba57fe18993a5f56acea 100644 --- a/src/listlatihan2.py +++ b/src/listlatihan2.py @@ -143,7 +143,7 @@ class listLatihan2(QWidget): listButton.move(1025, 53) listButton.setCursor( QCursor(Qt.CursorShape.PointingHandCursor)) - listButton.clicked.connect(self.listWindow) + # listButton.clicked.connect(self.listWindow) # # tombol history @@ -272,9 +272,6 @@ class listLatihan2(QWidget): def planWindow(self): self.switch.emit("plan", {}) - - def listWindow(self): - self.switch.emit("listLatihan", {}) def dashboard(self): self.switch.emit("dashboard", {})