예제 #1
0
 def readCounters(self):
     """Read counters"""
     self.lblTimeSpent.setStringValue_(fh.secToTimeStr(
             self.tasks.timings.spentSeconds))
     self.lblSlackingTime.setStringValue_(fh.secToTimeStr(
             self.tasks.timings.slackingSeconds))
     self.lblTimeLeft.setStringValue_(fh.secToTimeStr(
             self.tasks.timings.leftSeconds))
     self.lblTimeSpentCurr.setStringValue_(fh.secToTimeStr(
             self.tasks.timings.currentSeconds))
     self.lblWorkTill.setStringValue_(fh.timeStructToTimeStr(
             self.tasks.timings.workTillTime))
예제 #2
0
 def readCounters(self):
     """Read counters"""
     self.lblTimeSpent.setStringValue_(
         fh.secToTimeStr(self.tasks.timings.spentSeconds))
     self.lblSlackingTime.setStringValue_(
         fh.secToTimeStr(self.tasks.timings.slackingSeconds))
     self.lblTimeLeft.setStringValue_(
         fh.secToTimeStr(self.tasks.timings.leftSeconds))
     self.lblTimeSpentCurr.setStringValue_(
         fh.secToTimeStr(self.tasks.timings.currentSeconds))
     self.lblWorkTill.setStringValue_(
         fh.timeStructToTimeStr(self.tasks.timings.workTillTime))
예제 #3
0
    def generateChart(self):
        self.graphView.setScrollView(self.scrollView)

        stat = Statistics(self.startDate, self.endDate)

        if self.reportType == "tasks":
            self.graphView.setData(stat.countTasks(), self.reportType)

        elif self.reportType == "projects":
            self.graphView.setData(stat.countProjects(), self.reportType)

        elif self.reportType == "slacking":
            self.graphView.setData(stat.countSlacking(), self.reportType)

        self.graphView.setScale(stat.maxValue)
        self.lblWorkTotal.setStringValue_(secToTimeStr(stat.totalWork))
        self.lblAvgWork.setStringValue_(secToTimeStr(stat.avgWork))
        self.lblSlackTotal.setStringValue_(secToTimeStr(stat.totalSlacking))
        self.lblAvgSlack.setStringValue_(secToTimeStr(stat.avgSlacking))
        self.graphView.setNeedsDisplay_(True)