Files
flaredetector/astrodatagui/AstrodataGUI.py
T
2024-03-04 11:34:19 +01:00

26 lines
752 B
Python

from PyQt5 import QtWidgets, uic
import os
from .db.StarsDB import StarDB
DB_FILENAME = "stars.db"
class AstrodataGUI(QtWidgets.QMainWindow):
def __init__(self):
super(AstrodataGUI, self).__init__()
classFileDir = os.path.dirname(os.path.abspath(__file__))
absUiFilePath = os.path.join(classFileDir, "astrodatagui.ui")
uic.loadUi(absUiFilePath, self)
self.show()
self.loadDB()
def loadDB(self):
try:
self.starDB = StarDB.getInstance()
except:
self.showErrorMessage("DB Connection failed",
f"Could not connect to local database file {DB_FILENAME}")
def showErrorMessage(self, title: str, msg: str):
return