# Path: l5r/util/log.py
# def log_setup(base_path, base_name):
# 
# Path: l5r/util/settings.py
# class L5RCMSettings(object):
#     """A QSettings wrapper for easy access to application settings"""
# 
#     def __init__(self):
#         self._qsettings = QSettings()
# 
#         # Application settings
#         self._app = L5RCMSettings_App(self._qsettings)
#         # UI settings
#         self._ui = L5RCMSettings_UI(self._qsettings)
#         # PC export PDF generation settings
#         self._pc_export = L5RCMSettings_PcExport(self._qsettings)
#         # NPC export PDF generation settings
#         self._npc_export = L5RCMSettings_NpcExport(self._qsettings)
# 
#     @property
#     def app(self):
#         return self._app
# 
#     @property
#     def ui(self):
#         return self._ui
# 
#     @property
#     def pc_export(self):
#         return self._pc_export
# 
#     @property
#     def npc_export(self):
#         return self._npc_export
# 
#     def sync(self):
#         self._qsettings.sync()
# 
#     def load_defaults(self):
#         self._app.load_defaults()
#         self._ui.load_defaults()
#         self._pc_export.load_defaults()
#         self._npc_export.load_defaults()


import sys
import os
import mimetypes
import l5r.sinks
import l5r.api.character
import l5r.api.character.spells
import l5r.api.data.clans
import l5r.api.data.families
import l5r.api.data.schools
import l5r.api.character
import l5r.api.character.spells
import l5r.api.character.skills
import l5r.api.rules
import l5r.widgets as widgets
import l5r.dialogs as dialogs
from l5r.l5rcmcore import *
from l5r.util import log
from l5r.util.settings import L5RCMSettings
        msgBox.addButton(QtWidgets.QMessageBox.Save)
        msgBox.addButton(QtWidgets.QMessageBox.Discard)
        msgBox.addButton(QtWidgets.QMessageBox.Cancel)
        msgBox.setDefaultButton(QtWidgets.QMessageBox.Save)
        return msgBox.exec_()

    def ask_to_upgrade(self, target_version):
        msgBox = QtWidgets.QMessageBox(self)
        msgBox.setWindowTitle('L5R: CM')
        msgBox.setText(
            self.tr("L5R: CM v%s is available for download.") % target_version)
        msgBox.setInformativeText(
            self.tr("Do you want to open the download page?"))
        msgBox.addButton(QtWidgets.QMessageBox.Yes)
        msgBox.addButton(QtWidgets.QMessageBox.No)
        msgBox.setDefaultButton(QtWidgets.QMessageBox.No)
        return msgBox.exec_()

    def not_enough_xp_advise(self, parent=None):
        if parent is None:
            parent = self
        QtWidgets.QMessageBox.warning(parent, self.tr("Not enough XP"),
                                  self.tr("Cannot purchase.\nYou've reached the XP Limit."))
        return

    def closeEvent(self, ev):
        # update interface last time, to set unsaved states
        self.update_from_model()

        # SAVE GEOMETRY

# Path: l5r/util/log.py
# def log_setup(base_path, base_name):
# 
# Path: l5r/util/settings.py
# class L5RCMSettings(object):
#     """A QSettings wrapper for easy access to application settings"""
# 
#     def __init__(self):
#         self._qsettings = QSettings()
# 
#         # Application settings
#         self._app = L5RCMSettings_App(self._qsettings)
#         # UI settings
#         self._ui = L5RCMSettings_UI(self._qsettings)
#         # PC export PDF generation settings
#         self._pc_export = L5RCMSettings_PcExport(self._qsettings)
#         # NPC export PDF generation settings
#         self._npc_export = L5RCMSettings_NpcExport(self._qsettings)
# 
#     @property
#     def app(self):
#         return self._app
# 
#     @property
#     def ui(self):
#         return self._ui
# 
#     @property
#     def pc_export(self):
#         return self._pc_export
# 
#     @property
#     def npc_export(self):
#         return self._npc_export
# 
#     def sync(self):
#         self._qsettings.sync()
# 
#     def load_defaults(self):
#         self._app.load_defaults()
#         self._ui.load_defaults()
#         self._pc_export.load_defaults()
#         self._npc_export.load_defaults()


# Path: l5r/main.py
import sys
import os
import mimetypes
import l5r.sinks
import l5r.api.character
import l5r.api.character.spells
import l5r.api.data.clans
import l5r.api.data.families
import l5r.api.data.schools
import l5r.api.character
import l5r.api.character.spells
import l5r.api.character.skills
import l5r.api.rules
import l5r.widgets as widgets
import l5r.dialogs as dialogs
from l5r.l5rcmcore import *
from l5r.util import log
from l5r.util.settings import L5RCMSettings

        msgBox.addButton(QtWidgets.QMessageBox.Save)
        msgBox.addButton(QtWidgets.QMessageBox.Discard)
        msgBox.addButton(QtWidgets.QMessageBox.Cancel)
        msgBox.setDefaultButton(QtWidgets.QMessageBox.Save)
        return msgBox.exec_()

    def ask_to_upgrade(self, target_version):
        msgBox = QtWidgets.QMessageBox(self)
        msgBox.setWindowTitle('L5R: CM')
        msgBox.setText(
            self.tr("L5R: CM v%s is available for download.") % target_version)
        msgBox.setInformativeText(
            self.tr("Do you want to open the download page?"))
        msgBox.addButton(QtWidgets.QMessageBox.Yes)
        msgBox.addButton(QtWidgets.QMessageBox.No)
        msgBox.setDefaultButton(QtWidgets.QMessageBox.No)
        return msgBox.exec_()

    def not_enough_xp_advise(self, parent=None):
        if parent is None:
            parent = self
        QtWidgets.QMessageBox.warning(parent, self.tr("Not enough XP"),
                                  self.tr("Cannot purchase.\nYou've reached the XP Limit."))
        return

    def closeEvent(self, ev):
        # update interface last time, to set unsaved states
        self.update_from_model()

        # SAVE GEOMETRY

        settings = L5RCMSettings()