# Path: Qt.py

# 
# Path: ts2/utils.py
# class Context:
# class FormatException(Exception):
# class MissingDependencyException(Exception):
# class DurationProba(QtCore.QObject):
#     GAME = 10
#     EDITORS = [20, 21, 22, 23, 24, 25]
#     EDITOR_GENERAL = 20
#     EDITOR_SCENERY = 21
#     EDITOR_ROUTES = 22
#     EDITOR_TRAINTYPES = 23
#     EDITOR_SERVICES = 24
#     EDITOR_TRAINS = 25
#     def __init__(self, arg):
#     def __init__(self, arg):
# def cumsum(lis):
#     def __init__(self, data):
#     def __str__(self):
#     def list(self):
#     def isNull(self):
#     def yieldValue(self):
# def to_json(data):
# def from_json(json_str):


from Qt import QtCore, QtGui, Qt
from ts2 import utils
            msgText = \
                self.simulation.currentTime.toString("HH:mm - ") + msgText
        msgData = {
            'msgType': msgType,
            'msgText': msgText
        }
        self.beginInsertRows(QtCore.QModelIndex(), row, row)
        self._messages.insert(row, Message(msgData))
        self.endInsertRows()

    def rowCount(self, parent=None, *args, **kwargs):
        """Returns the number of rows of the model, corresponding to the
        number of messages in the logger."""
        return len(self._messages)

    def columnCount(self, parent=None, *args, **kwargs):
        """Returns the number of columns of the model"""
        return 1

    def data(self, index, role=Qt.DisplayRole):
        """Returns the data at the given index"""
        if role == Qt.DisplayRole:
            return str(self._messages[index.row()])
        elif role == Qt.FontRole:
            return QtGui.QFont("Courier new")
        elif role == Qt.BackgroundRole:
            return QtGui.QBrush(Qt.black)
        elif role == Qt.ForegroundRole:
            msgType = self._messages[index.row()].msgType
            if msgType == Message.SOFTWARE_MSG:

# Path: Qt.py

# 
# Path: ts2/utils.py
# class Context:
# class FormatException(Exception):
# class MissingDependencyException(Exception):
# class DurationProba(QtCore.QObject):
#     GAME = 10
#     EDITORS = [20, 21, 22, 23, 24, 25]
#     EDITOR_GENERAL = 20
#     EDITOR_SCENERY = 21
#     EDITOR_ROUTES = 22
#     EDITOR_TRAINTYPES = 23
#     EDITOR_SERVICES = 24
#     EDITOR_TRAINS = 25
#     def __init__(self, arg):
#     def __init__(self, arg):
# def cumsum(lis):
#     def __init__(self, data):
#     def __str__(self):
#     def list(self):
#     def isNull(self):
#     def yieldValue(self):
# def to_json(data):
# def from_json(json_str):


# Path: ts2/game/logger.py
from Qt import QtCore, QtGui, Qt
from ts2 import utils

            msgText = \
                self.simulation.currentTime.toString("HH:mm - ") + msgText
        msgData = {
            'msgType': msgType,
            'msgText': msgText
        }
        self.beginInsertRows(QtCore.QModelIndex(), row, row)
        self._messages.insert(row, Message(msgData))
        self.endInsertRows()

    def rowCount(self, parent=None, *args, **kwargs):
        """Returns the number of rows of the model, corresponding to the
        number of messages in the logger."""
        return len(self._messages)

    def columnCount(self, parent=None, *args, **kwargs):
        """Returns the number of columns of the model"""
        return 1

    def data(self, index, role=Qt.DisplayRole):
        """Returns the data at the given index"""
        if role == Qt.DisplayRole:
            return str(self._messages[index.row()])
        elif role == Qt.FontRole:
            return QtGui.QFont("Courier new")
        elif role == Qt.BackgroundRole:
            return QtGui.QBrush(Qt.black)
        elif role == Qt.ForegroundRole:
            msgType = self._messages[index.row()].msgType
            if msgType == Message.SOFTWARE_MSG:

                return QtGui.QBrush(Qt.magenta)