def __importLogText(self, filepath, savedTimeZone): ''' Private method called during the loading of an unprocessed text log file. This function will create a FileLoader thread and start processing. ''' self.__loaderthread = FileLoader.fromFilename(filepath, savedTimeZone, self.onFinishedLoading, LoadingDialog.getLoadingDialog(self)) self.__loaderthread.finished.connect(self.onFinishedLoading) self.__loaderthread.start()
def __askForConversion2DB(self): # BUG: Call MsgBox will cause an error in console about "modalSession has been exited prematurely" # Ask if user wants to convert to faster SQL DB response = QtGui.QMessageBox.question(self, "Convert to SQL DB?", "Log Successfully processed.\nWould you like to build a SQL DB to make analysis faster?", QtGui.QMessageBox.Yes|QtGui.QMessageBox.No, QtGui.QMessageBox.No) if response == QtGui.QMessageBox.Yes: filepath = self.__askForDBSavePath() if filepath: self.linelog_db = LineLogDB(str(filepath)) def finishConvert(): self.linelog = self.linelog_db self.showCommandFrame() self.linelog_db.addLineLog(self.linelog, LoadingDialog.getLoadingDialog(self), finishConvert)