本文整理汇总了Python中database.DataBase.getDzCompetitor方法的典型用法代码示例。如果您正苦于以下问题:Python DataBase.getDzCompetitor方法的具体用法?Python DataBase.getDzCompetitor怎么用?Python DataBase.getDzCompetitor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类database.DataBase
的用法示例。
在下文中一共展示了DataBase.getDzCompetitor方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Principal
# 需要导入模块: from database import DataBase [as 别名]
# 或者: from database.DataBase import getDzCompetitor [as 别名]
#.........这里部分代码省略.........
if row[1] >= self.minMoto and row[1] <= self.maxMoto:
countMoto += 1
elif row[1] >= self.minQuad and row[1] <= self.maxQuad:
countQuad += 1
elif row[1] >= self.minCar and row[1] <= self.maxCar:
countCar += 1
self.mainWindow.lnCountMoto.setText(str(countMoto))
self.mainWindow.lnCountQuad.setText(str(countQuad))
self.mainWindow.lnCountCar.setText(str(countCar))
def checkNewFile(self):
"""Check if exist a new and diferent on the folder, if exist a new one then call to inputFiles
"""
f = open('path.txt')
path = f.readline()
allFiles = glob.glob(path + "/*.csv")
#if len(allFiles) > len(self.tmpCountFile):
#self.mainWindow.lblUpdate.setText("Hay nuevos archivos")
#self.inputFiles()
# else:
# self.mainWindow.lblUpdate.setText(" ")
def otherTable(self):
"""This section complete the DR, WPT and Data table from each competitor
"""
rowSelected = self.mainWindow.tblGralStatus.currentIndex()
rowDisc = self.mainWindow.tblGralStatus.item(rowSelected.row(),6)
numCompetitor = self.mainWindow.tblGralStatus.item(rowSelected.row(),0)
check = self.db.getDataCompetitor(int(numCompetitor.text()))
self.mainWindow.tblData.setItem(-1,1,QTableWidgetItem(str(check[1])))
self.mainWindow.tblData.setItem(0,1,QTableWidgetItem(str(check[10])))
self.mainWindow.tblData.setItem(1,1,QTableWidgetItem(str(check[2]).decode("utf-8")))
check = self.db.getDzCompetitor(int(numCompetitor.text()))
if len(check) == 0:
self.mainWindow.lstDzStatus.clear()
self.mainWindow.lstDz.clear()
self.mainWindow.lstDzStatus.addItem(QListWidgetItem("OK"))
self.mainWindow.lstDzStatus.item(0).setBackground(QColor(133, 222, 84))
self.mainWindow.lstDzStatus.item(0).setTextAlignment(Qt.AlignHCenter)
else:
self.mainWindow.lstDzStatus.clear()
self.mainWindow.lstDz.clear()
self.mainWindow.lstDzStatus.addItem(QListWidgetItem("NOK"))
self.mainWindow.lstDzStatus.item(0).setBackground(QColor(255, 64, 16))
self.mainWindow.lstDzStatus.item(0).setTextAlignment(Qt.AlignHCenter)
self.mainWindow.lblWpt.setAlignment(Qt.AlignHCenter)
for m,data in enumerate(check):
self.mainWindow.lstDz.addItem(QListWidgetItem("%s"%str(data[0])))
check = self.db.getZoneDismiss(int(numCompetitor.text()))
if len(check) == 0:
self.mainWindow.lstWptStatus.clear()
self.mainWindow.lstWpt.clear()
self.mainWindow.lstWptStatus.addItem(QListWidgetItem("OK"))
self.mainWindow.lstWptStatus.item(0).setBackground(QColor(133, 222, 84))
self.mainWindow.lstWptStatus.item(0).setTextAlignment(Qt.AlignHCenter)
else:
self.mainWindow.lstWpt.clear()
self.mainWindow.lstWptStatus.clear()
self.mainWindow.lstWptStatus.addItem(QListWidgetItem("NOK"))
self.mainWindow.lstWptStatus.item(0).setBackground(QColor(255, 64, 16))