# Path: TestbedLog.py
# class Ui_MainWindow(object):
#     def setupUi(self, MainWindow):
#         MainWindow.setObjectName("MainWindow")
#         MainWindow.resize(900, 546)
#         MainWindow.setDocumentMode(False)
#         self.centralwidget = QtWidgets.QWidget(MainWindow)
#         self.centralwidget.setObjectName("centralwidget")
#         self.verticalLayout = QtWidgets.QVBoxLayout(self.centralwidget)
#         self.verticalLayout.setObjectName("verticalLayout")
#         self.logTreeView = QtWidgets.QTreeView(self.centralwidget)
#         font = QtGui.QFont()
#         font.setFamily("Arial")
#         self.logTreeView.setFont(font)
#         self.logTreeView.setObjectName("logTreeView")
#         self.verticalLayout.addWidget(self.logTreeView)
#         self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
#         self.horizontalLayout_2.setObjectName("horizontalLayout_2")
#         spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
#         self.horizontalLayout_2.addItem(spacerItem)
#         self.OKButton = QtWidgets.QPushButton(self.centralwidget)
#         self.OKButton.setObjectName("OKButton")
#         self.horizontalLayout_2.addWidget(self.OKButton)
#         spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Minimum)
#         self.horizontalLayout_2.addItem(spacerItem1)
#         self.editTestbedButton = QtWidgets.QPushButton(self.centralwidget)
#         self.editTestbedButton.setEnabled(True)
#         self.editTestbedButton.setObjectName("editTestbedButton")
#         self.horizontalLayout_2.addWidget(self.editTestbedButton)
#         spacerItem2 = QtWidgets.QSpacerItem(80, 20, QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Minimum)
#         self.horizontalLayout_2.addItem(spacerItem2)
#         self.ZoomLabel = QtWidgets.QLabel(self.centralwidget)
#         self.ZoomLabel.setObjectName("ZoomLabel")
#         self.horizontalLayout_2.addWidget(self.ZoomLabel)
#         self.fontSizeSpinBox = QtWidgets.QSpinBox(self.centralwidget)
#         self.fontSizeSpinBox.setObjectName("fontSizeSpinBox")
#         self.horizontalLayout_2.addWidget(self.fontSizeSpinBox)
#         spacerItem3 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
#         self.horizontalLayout_2.addItem(spacerItem3)
#         self.verticalLayout.addLayout(self.horizontalLayout_2)
#         MainWindow.setCentralWidget(self.centralwidget)
# 
#         self.retranslateUi(MainWindow)
#         QtCore.QMetaObject.connectSlotsByName(MainWindow)
# 
#     def retranslateUi(self, MainWindow):
#         _translate = QtCore.QCoreApplication.translate
#         MainWindow.setWindowTitle(_translate("MainWindow", "Testbed Log"))
#         self.OKButton.setText(_translate("MainWindow", "OK"))
#         self.editTestbedButton.setText(_translate("MainWindow", "Edit Testbed"))
#         self.ZoomLabel.setText(_translate("MainWindow", "Font Size:"))


import os
import re
import sys
import unicodedata
import xml.etree.ElementTree as ET
import Utils
from datetime import datetime
from subprocess import call
from System import Guid
from System import String
from PyQt5 import QtGui, QtCore
from PyQt5 import QtWidgets
from PyQt5.QtWidgets import QMainWindow, QDialogButtonBox, QApplication
from FTModuleClass import *                                                 
from SIL.LCModel import *                                                   
from SIL.LCModel.Core.KernelInterfaces import ITsString, ITsStrBldr         
from TestbedLog import Ui_MainWindow
    def columnCount(self, parentindex):
        
        if not parentindex.isValid():
            return self.rootItem.ColumnCount()
        
        return parentindex.internalPointer().ColumnCount()
    
    def data(self, index, role):

        # handled in the widgets
        return None
    
    def headerData(self, column, orientation, role):
        if (orientation == QtCore.Qt.Horizontal and
        role == QtCore.Qt.DisplayRole):
            try:
                return self.rootItem.Data(column)
            except IndexError:
                pass

        if role == QtCore.Qt.TextAlignmentRole:
            if self.getRTL():
                return QtCore.Qt.AlignRight | QtCore.Qt.AlignCenter
        
        return QtCore.QVariant()
                
class LogViewerMain(QMainWindow):

    def __init__(self, resultsXMLObj):
        QMainWindow.__init__(self)

# Path: TestbedLog.py
# class Ui_MainWindow(object):
#     def setupUi(self, MainWindow):
#         MainWindow.setObjectName("MainWindow")
#         MainWindow.resize(900, 546)
#         MainWindow.setDocumentMode(False)
#         self.centralwidget = QtWidgets.QWidget(MainWindow)
#         self.centralwidget.setObjectName("centralwidget")
#         self.verticalLayout = QtWidgets.QVBoxLayout(self.centralwidget)
#         self.verticalLayout.setObjectName("verticalLayout")
#         self.logTreeView = QtWidgets.QTreeView(self.centralwidget)
#         font = QtGui.QFont()
#         font.setFamily("Arial")
#         self.logTreeView.setFont(font)
#         self.logTreeView.setObjectName("logTreeView")
#         self.verticalLayout.addWidget(self.logTreeView)
#         self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
#         self.horizontalLayout_2.setObjectName("horizontalLayout_2")
#         spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
#         self.horizontalLayout_2.addItem(spacerItem)
#         self.OKButton = QtWidgets.QPushButton(self.centralwidget)
#         self.OKButton.setObjectName("OKButton")
#         self.horizontalLayout_2.addWidget(self.OKButton)
#         spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Minimum)
#         self.horizontalLayout_2.addItem(spacerItem1)
#         self.editTestbedButton = QtWidgets.QPushButton(self.centralwidget)
#         self.editTestbedButton.setEnabled(True)
#         self.editTestbedButton.setObjectName("editTestbedButton")
#         self.horizontalLayout_2.addWidget(self.editTestbedButton)
#         spacerItem2 = QtWidgets.QSpacerItem(80, 20, QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Minimum)
#         self.horizontalLayout_2.addItem(spacerItem2)
#         self.ZoomLabel = QtWidgets.QLabel(self.centralwidget)
#         self.ZoomLabel.setObjectName("ZoomLabel")
#         self.horizontalLayout_2.addWidget(self.ZoomLabel)
#         self.fontSizeSpinBox = QtWidgets.QSpinBox(self.centralwidget)
#         self.fontSizeSpinBox.setObjectName("fontSizeSpinBox")
#         self.horizontalLayout_2.addWidget(self.fontSizeSpinBox)
#         spacerItem3 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
#         self.horizontalLayout_2.addItem(spacerItem3)
#         self.verticalLayout.addLayout(self.horizontalLayout_2)
#         MainWindow.setCentralWidget(self.centralwidget)
# 
#         self.retranslateUi(MainWindow)
#         QtCore.QMetaObject.connectSlotsByName(MainWindow)
# 
#     def retranslateUi(self, MainWindow):
#         _translate = QtCore.QCoreApplication.translate
#         MainWindow.setWindowTitle(_translate("MainWindow", "Testbed Log"))
#         self.OKButton.setText(_translate("MainWindow", "OK"))
#         self.editTestbedButton.setText(_translate("MainWindow", "Edit Testbed"))
#         self.ZoomLabel.setText(_translate("MainWindow", "Font Size:"))


# Path: TestbedLogViewer.py
import os
import re
import sys
import unicodedata
import xml.etree.ElementTree as ET
import Utils
from datetime import datetime
from subprocess import call
from System import Guid
from System import String
from PyQt5 import QtGui, QtCore
from PyQt5 import QtWidgets
from PyQt5.QtWidgets import QMainWindow, QDialogButtonBox, QApplication
from FTModuleClass import *                                                 
from SIL.LCModel import *                                                   
from SIL.LCModel.Core.KernelInterfaces import ITsString, ITsStrBldr         
from TestbedLog import Ui_MainWindow

    def columnCount(self, parentindex):
        
        if not parentindex.isValid():
            return self.rootItem.ColumnCount()
        
        return parentindex.internalPointer().ColumnCount()
    
    def data(self, index, role):

        # handled in the widgets
        return None
    
    def headerData(self, column, orientation, role):
        if (orientation == QtCore.Qt.Horizontal and
        role == QtCore.Qt.DisplayRole):
            try:
                return self.rootItem.Data(column)
            except IndexError:
                pass

        if role == QtCore.Qt.TextAlignmentRole:
            if self.getRTL():
                return QtCore.Qt.AlignRight | QtCore.Qt.AlignCenter
        
        return QtCore.QVariant()
                
class LogViewerMain(QMainWindow):

    def __init__(self, resultsXMLObj):
        QMainWindow.__init__(self)

        self.ui = Ui_MainWindow()