# Path: Qt.py

# 
# Path: ts2/gui/widgets.py
# class ClockWidget(QtWidgets.QLCDNumber):
# class ZoomWidget(QtWidgets.QWidget):
# class XGraphicsView(QtWidgets.QGraphicsView):
# class StatusBar(QtWidgets.QStatusBar):
# class ToolBarGroup(QtWidgets.QWidget):
# class VBoxWidget(QtWidgets.QWidget):
# class HBoxWidget(QtWidgets.QWidget):
# class HeaderLabel(QtWidgets.QLabel):
#     def __init__(self, parent):
#     def setTime(self, t):
#     def __init__(self, parent=None):
#     def setDefaultZoom(self):
#     def __init__(self, parent=None):
#     def wheelEvent(self, ev):
#     def __init__(self, parent=None):
#     def showMessage(self, txt, timeout=0, info=False, warn=False):
#     def onProgressTimeout(self):
#     def showBusy(self, is_busy):
#     def __init__(self, parent=None, title=None, fg=None, bg=None):
#     def updateStyle(self):
#     def setTitle(self, title):
#     def addWidget(self, widget):
#     def addAction(self, action):
#     def __init__(self, parent=None, margin=0):
#     def addWidget(self, widget, stretch=0):
#     def addLayout(self, layout, stretch=0):
#     def __init__(self, parent=None, margin=0):
#     def addWidget(self, widget, stretch=0):
#     def addLayout(self, layout, stretch=0):
#     def __init__(self, parent=None, text="", start=None, end=None, align=None):
# 
# 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):


import os
import stat
import sys
import zipfile
import requests
import ts2
from io import BytesIO
from os import path
from Qt import QtWidgets, Qt
from ts2.gui import widgets
from ts2.utils import settings
        grid.setColumnStretch(2, 0)

        # ======
        containerLayout.addStretch(20)

        self.loadSettings()

    def updateServerLabel(self):
        pass
        if path.isfile(settings.serverLoc):
            txt = self.tr('<span style="color: green;">Server found in Server Dir</span>')
        else:
            txt = self.tr('<span style="color: red;">Server not found. Click on Download</span>')
        self.txtServerFound.setText(txt)

    def loadSettings(self):
        v = settings.b(settings.LOAD_LAST, False)
        self.chkLoadLast.setChecked(v)

        self.txtDataDir.setText(settings.userDataDir)
        self.txtSimsDir.setText(settings.simulationsDir)
        self.txtServerDir.setText(settings.serverDir)

    def onLoadLast(self):
        v = 1 if self.chkLoadLast.isChecked() else 0
        settings.setValue(settings.LOAD_LAST, v)
        settings.sync()

    def closeEvent(self, ev):
        settings.setValue(settings.INITIAL_SETUP, "1")

# Path: Qt.py

# 
# Path: ts2/gui/widgets.py
# class ClockWidget(QtWidgets.QLCDNumber):
# class ZoomWidget(QtWidgets.QWidget):
# class XGraphicsView(QtWidgets.QGraphicsView):
# class StatusBar(QtWidgets.QStatusBar):
# class ToolBarGroup(QtWidgets.QWidget):
# class VBoxWidget(QtWidgets.QWidget):
# class HBoxWidget(QtWidgets.QWidget):
# class HeaderLabel(QtWidgets.QLabel):
#     def __init__(self, parent):
#     def setTime(self, t):
#     def __init__(self, parent=None):
#     def setDefaultZoom(self):
#     def __init__(self, parent=None):
#     def wheelEvent(self, ev):
#     def __init__(self, parent=None):
#     def showMessage(self, txt, timeout=0, info=False, warn=False):
#     def onProgressTimeout(self):
#     def showBusy(self, is_busy):
#     def __init__(self, parent=None, title=None, fg=None, bg=None):
#     def updateStyle(self):
#     def setTitle(self, title):
#     def addWidget(self, widget):
#     def addAction(self, action):
#     def __init__(self, parent=None, margin=0):
#     def addWidget(self, widget, stretch=0):
#     def addLayout(self, layout, stretch=0):
#     def __init__(self, parent=None, margin=0):
#     def addWidget(self, widget, stretch=0):
#     def addLayout(self, layout, stretch=0):
#     def __init__(self, parent=None, text="", start=None, end=None, align=None):
# 
# 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/gui/settingsdialog.py
import os
import stat
import sys
import zipfile
import requests
import ts2
from io import BytesIO
from os import path
from Qt import QtWidgets, Qt
from ts2.gui import widgets
from ts2.utils import settings

        grid.setColumnStretch(2, 0)

        # ======
        containerLayout.addStretch(20)

        self.loadSettings()

    def updateServerLabel(self):
        pass
        if path.isfile(settings.serverLoc):
            txt = self.tr('<span style="color: green;">Server found in Server Dir</span>')
        else:
            txt = self.tr('<span style="color: red;">Server not found. Click on Download</span>')
        self.txtServerFound.setText(txt)

    def loadSettings(self):
        v = settings.b(settings.LOAD_LAST, False)
        self.chkLoadLast.setChecked(v)

        self.txtDataDir.setText(settings.userDataDir)
        self.txtSimsDir.setText(settings.simulationsDir)
        self.txtServerDir.setText(settings.serverDir)

    def onLoadLast(self):
        v = 1 if self.chkLoadLast.isChecked() else 0
        settings.setValue(settings.LOAD_LAST, v)
        settings.sync()

    def closeEvent(self, ev):
        settings.setValue(settings.INITIAL_SETUP, "1")

        settings.sync()