astrodatagui: open NewStarDialog with the Add button
This commit is contained in:
@@ -2,6 +2,7 @@ from PyQt5 import QtWidgets, uic
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
from .db.StarsDB import StarDB
|
from .db.StarsDB import StarDB
|
||||||
|
from .ui.NewStarDialog import NewStarDialog
|
||||||
|
|
||||||
DEFAULT_DB = "stars.db"
|
DEFAULT_DB = "stars.db"
|
||||||
|
|
||||||
@@ -14,6 +15,8 @@ class AstrodataGUI(QtWidgets.QMainWindow):
|
|||||||
|
|
||||||
self.actionExit.triggered.connect(self.actionExitTriggered)
|
self.actionExit.triggered.connect(self.actionExitTriggered)
|
||||||
|
|
||||||
|
self.btAddNew.clicked.connect(self.addNewClicked)
|
||||||
|
|
||||||
self.show()
|
self.show()
|
||||||
|
|
||||||
self.loadDB()
|
self.loadDB()
|
||||||
@@ -42,4 +45,8 @@ class AstrodataGUI(QtWidgets.QMainWindow):
|
|||||||
for starDB in StarDB.getAllInstances():
|
for starDB in StarDB.getAllInstances():
|
||||||
starDB.close()
|
starDB.close()
|
||||||
|
|
||||||
self.close()
|
self.close()
|
||||||
|
|
||||||
|
def addNewClicked(self):
|
||||||
|
diag = NewStarDialog()
|
||||||
|
diag.exec()
|
||||||
Reference in New Issue
Block a user