firstrun.createDatabase(conf_dir + "databank.db") # Import internal libraries splash.showMessage( QtWidgets.QApplication.translate("pychemqt", "Importing libraries...")) from lib import * # noqa from UI import * # noqa from equipment import UI_equipments, equipments # noqa from tools import * # noqa from plots import * # noqa # Load main program UI splash.showMessage( QtWidgets.QApplication.translate("pychemqt", "Loading main window...")) from UI.mainWindow import UI_pychemqt # noqa pychemqt = UI_pychemqt() # Load project files, opened in last pychemqt session and/or specified in # command line msg = QtWidgets.QApplication.translate("pychemqt", "Loading project files") splash.showMessage(msg + "...") logging.info(msg) if change: config.Preferences = Preferences filename = [] if config.Preferences.getboolean("General", "Load_Last_Project"): filename = pychemqt.lastFile if filename is None: filename = []
from lib.project import Project from lib.EoS import K, H from lib import unidades splash.showMessage(QtGui.QApplication.translate("pychemqt", "Importing equipments...")) from equipment import * splash.showMessage(QtGui.QApplication.translate("pychemqt", "Importing tools...")) from tools import UI_confComponents, UI_confTransport, UI_confThermo, UI_confUnits, UI_confResolution, UI_databank, UI_unitConverter, UI_steamTables, UI_psychrometry from UI.conversor_unidades import moneda splash.showMessage(QtGui.QApplication.translate("pychemqt", "Loading main window...")) from UI.mainWindow import UI_pychemqt pychemqt = UI_pychemqt() splash.showMessage(QtGui.QApplication.translate("pychemqt", "Loading project files...")) logging.info(QtGui.QApplication.translate("pychemqt", "Loading project files")) pychemqt.show() if pychemqt.Preferences.getboolean("General", 'Load_Last_Project'): filename = pychemqt.settings.value("LastFile").toStringList() for file in args: filename.append(file) for fname in filename: if fname and QtCore.QFile.exists(fname): splash.showMessage(QtGui.QApplication.translate("pychemqt", "Loading project files...")+"\n"+fname) logging.info(QtGui.QApplication.translate("pychemqt", "Loading project")+ ": %s" %fname) pychemqt.fileOpen(fname)