From 5589f766de34596fe22a8902c28224f2d4a7b45f Mon Sep 17 00:00:00 2001 From: SGCMarkus Date: Mon, 4 Mar 2024 14:27:47 +0100 Subject: [PATCH] astrodatagui: open NewStarDialog with the Add button --- astrodatagui/AstrodataGUI.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/astrodatagui/AstrodataGUI.py b/astrodatagui/AstrodataGUI.py index a2d5655..8321369 100644 --- a/astrodatagui/AstrodataGUI.py +++ b/astrodatagui/AstrodataGUI.py @@ -2,6 +2,7 @@ from PyQt5 import QtWidgets, uic import os from .db.StarsDB import StarDB +from .ui.NewStarDialog import NewStarDialog DEFAULT_DB = "stars.db" @@ -14,6 +15,8 @@ class AstrodataGUI(QtWidgets.QMainWindow): self.actionExit.triggered.connect(self.actionExitTriggered) + self.btAddNew.clicked.connect(self.addNewClicked) + self.show() self.loadDB() @@ -42,4 +45,8 @@ class AstrodataGUI(QtWidgets.QMainWindow): for starDB in StarDB.getAllInstances(): starDB.close() - self.close() \ No newline at end of file + self.close() + + def addNewClicked(self): + diag = NewStarDialog() + diag.exec() \ No newline at end of file