# Path: l5r/util/fsutil.py
# def get_icon_path(name, size=(48, 48)):
#     base = "share/icons/l5rcm/"
#     if size is not None:
#         base += '%dx%d' % size
# 
#     if os.name == 'nt':
#         return os.path.join(MY_CWD, base, name + '.png')
#     else:
#         sys_path = '/usr/' + base
#         if os.path.exists(sys_path):
#             return os.path.join(sys_path, name + '.png')
#         return os.path.join(MY_CWD, base, name + '.png')
# 
# 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()


from PyQt5 import QtCore, QtGui
from l5r.util.fsutil import get_icon_path
from l5r.util.settings import L5RCMSettings
import l5r.api as api
import l5r.api.data.spells
import l5r.api.character.schools
        if orientation != QtCore.Qt.Horizontal:
            return None
        if role == QtCore.Qt.DisplayRole:
            return self.headers[section]
        return None

    def data(self, index, role):
        if not index.isValid() or index.row() >= len(self.items):
            return None
        item = self.items[index.row()]
        if role == QtCore.Qt.DisplayRole:
            if index.column() == 0:
                return item.name
            if index.column() == 1:
                return item.ring
            if index.column() == 2:
                return item.mastery
            if index.column() == 3:
                return item.range
            if index.column() == 4:
                return item.area
            if index.column() == 5:
                return item.duration
            if index.column() == 6:
                return item.raises
        elif role == QtCore.Qt.UserRole:
            return item
        elif role == QtCore.Qt.FontRole:
            if item.is_school and self.bold_font:
                return self.bold_font

# Path: l5r/util/fsutil.py
# def get_icon_path(name, size=(48, 48)):
#     base = "share/icons/l5rcm/"
#     if size is not None:
#         base += '%dx%d' % size
# 
#     if os.name == 'nt':
#         return os.path.join(MY_CWD, base, name + '.png')
#     else:
#         sys_path = '/usr/' + base
#         if os.path.exists(sys_path):
#             return os.path.join(sys_path, name + '.png')
#         return os.path.join(MY_CWD, base, name + '.png')
# 
# 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/models/spellmodel.py
from PyQt5 import QtCore, QtGui
from l5r.util.fsutil import get_icon_path
from l5r.util.settings import L5RCMSettings
import l5r.api as api
import l5r.api.data.spells
import l5r.api.character.schools

        if orientation != QtCore.Qt.Horizontal:
            return None
        if role == QtCore.Qt.DisplayRole:
            return self.headers[section]
        return None

    def data(self, index, role):
        if not index.isValid() or index.row() >= len(self.items):
            return None
        item = self.items[index.row()]
        if role == QtCore.Qt.DisplayRole:
            if index.column() == 0:
                return item.name
            if index.column() == 1:
                return item.ring
            if index.column() == 2:
                return item.mastery
            if index.column() == 3:
                return item.range
            if index.column() == 4:
                return item.area
            if index.column() == 5:
                return item.duration
            if index.column() == 6:
                return item.raises
        elif role == QtCore.Qt.UserRole:
            return item
        elif role == QtCore.Qt.FontRole:
            if item.is_school and self.bold_font:
                return self.bold_font

        elif role == QtCore.Qt.ForegroundRole: