本文整理汇总了Python中logs.Logs.add方法的典型用法代码示例。如果您正苦于以下问题:Python Logs.add方法的具体用法?Python Logs.add怎么用?Python Logs.add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类logs.Logs
的用法示例。
在下文中一共展示了Logs.add方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: LBPM
# 需要导入模块: from logs import Logs [as 别名]
# 或者: from logs.Logs import add [as 别名]
class LBPM(QtGui.QMainWindow):
setcollection="default"
def __init__(self, parent=None):
QtGui.QWidget.__init__(self, parent)
self.ui = Ui_ManageProjects()
self.ui.setupUi(self)
self.collection=LoadProjects()
self.ui.projectslist.clear()
self.ui.jobslist.setColumnWidth(0,200)
self.ui.jobslist.setColumnWidth(1,130)
self.ui.jobslist.setColumnWidth(2,120)
self.ui.linkslist.setColumnWidth(0,200)
now=datetime.date.today()
nt=datetime.time(0,0)
now=datetime.datetime.combine(now,nt)+datetime.timedelta(days=1)
self.ui.jobTime.setDateTime(now)
for i in self.collection.projects:
self.ui.projectslist.addItem(self.collection.projects[i].name)
self.ui.tabs.setDisabled(True)
self.ui.todaysFrame.setVisible(False)
self.todays=todays.Todays()
self.loadTodays()
self._statuses=[self.tr('New'),self.tr("In progress"),self.tr("Done")]
self.logs=Logs(self.ui.statusBar,self.tr("LBPM initialized"))
@QtCore.pyqtSlot()
def on_jobTimeCheck_clicked(self):
if self.ui.jobTime.isEnabled():
self.ui.jobTime.setDisabled(True)
else:
self.ui.jobTime.setDisabled(False)
def on_notetext_textChanged(self):
self.ui.noteSave.setEnabled(True)
def loadTodays(self):
self.ui.todaysJobsList.clear()
for job in self.todays.jobs:
project=job.project
name=job.name
try:
status=self.collection.projects[project].jobs[name][1]
notes=self.collection.projects[project].jobs[name][2]
deadline=self.collection.projects[project].jobs[name][0]
a = QtGui.QTreeWidgetItem(self.ui.todaysJobsList)
a.setText(0,project)
a.setText(1,name)
a.setText(2,status)
a.setText(3,deadline)
a.setText(4,notes)
a=guihelpers.jobStatusColor(a,status,self._statuses)
except:
deadline=None
status=None
@QtCore.pyqtSlot()
def on_op1_clicked(self):self.changeOp(1)
@QtCore.pyqtSlot()
def on_op2_clicked(self):self.changeOp(2)
@QtCore.pyqtSlot()
def on_op3_clicked(self):self.changeOp(3)
def changeOp(self,op):
if op==1: w=self.ui.projectsFrame
if op==2: w=self.ui.tabs
if op==3: w=self.ui.todaysFrame
if w.isVisible():
w.setVisible(False)
if op==3:
self.ui.op2.setEnabled(False)
self.ui.op2.setChecked(True)
self.ui.tabs.setVisible(True)
else:
w.setVisible(True)
if op==3:
self.ui.op2.setEnabled(True)
def on_actionAbout_activated(self):
guihelpers.about()
def jobNotesUpdate(self):
self.ui.jobNotes.clear()
self.ui.jobNotes.addItem(self.tr("None"))
for i in self.project.notes:
self.ui.jobNotes.addItem(i)
def clearall(self):
self.ui.noteslist.clear()
self.ui.docslist.clear()
self.ui.jobslist.clear()
self.ui.linkslist.clear()
#.........这里部分代码省略.........