Skip to content

Commit a9aa0fd

Browse files
committed
-Productive/unproductive state in TaskIcon
1 parent 2657be2 commit a9aa0fd

2 files changed

Lines changed: 19 additions & 4 deletions

File tree

Tasker/mainui.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,20 @@ void MainUI::updateLiveSessionStatusText() {
238238
if (commitmentHub.getcurrentLiveSessionWidget().getCurrentState() ==
239239
LiveSessionState::Started) {
240240
liveSessionStatusText += LIVESSION_IN_PROGRESS;
241+
switch (Engine::Timer::getInstance()->timerHookState) {
242+
case Engine::Hook::HookState::productive: {
243+
qDebug() << "productive case";
244+
liveSessionStatusText += "(productive)";
245+
break;
246+
}
247+
case Engine::Hook::HookState::unproductive: {
248+
liveSessionStatusText += "(unproductive)";
249+
qDebug() << "unproductive case";
250+
break;
251+
}
252+
default:
253+
break;
254+
}
241255
} else if (commitmentHub.getcurrentLiveSessionWidget().getCurrentState() ==
242256
LiveSessionState::Paused) {
243257
liveSessionStatusText += LIVESESSION_PAUSED;

Tasker/mainui.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,16 @@
77
#include <memory>
88

99
#include "CommStatsQWidget.h"
10+
#include "Timer.h"
1011
#define ICONPATH ":/resources/clock-256.png"
1112

1213
/**
1314
Status strings for what is happening with the current live session.
1415
*/
15-
#define LIVESESSION_PENDING ":Pending"
16-
#define LIVESSION_IN_PROGRESS ":In Progress"
17-
#define LIVESSION_COMPLETE ":Completed"
18-
#define LIVESESSION_PAUSED ":Paused"
16+
#define LIVESESSION_PENDING "Pending"
17+
#define LIVESSION_IN_PROGRESS "In Progress"
18+
#define LIVESSION_COMPLETE "Completed"
19+
#define LIVESESSION_PAUSED "Paused"
1920

2021
/**
2122
* @brief The MainUI class is the one responsible

0 commit comments

Comments
 (0)