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