forked from KDE/ghostwriter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sessionstatisticswidget.h
68 lines (54 loc) · 1.31 KB
/
sessionstatisticswidget.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/*
* SPDX-FileCopyrightText: 2016-2022 Megan Conkle <[email protected]>
*
* SPDX-License-Identifier: GPL-3.0-or-later
*/
#ifndef SESSIONSTATISTICSWIDGET_H
#define SESSIONSTATISTICSWIDGET_H
#include <QScopedPointer>
#include "abstractstatisticswidget.h"
namespace ghostwriter
{
/**
* Widget to display writing session statistics
*/
class SessionStatisticsWidgetPrivate;
class SessionStatisticsWidget : public AbstractStatisticsWidget
{
Q_OBJECT
Q_DECLARE_PRIVATE(SessionStatisticsWidget)
public:
/**
* Constructor.
*/
SessionStatisticsWidget(QWidget *parent = nullptr);
/**
* Destructor.
*/
virtual ~SessionStatisticsWidget();
public slots:
/**
* Sets the word count to display.
*/
void setWordCount(int value);
/**
* Sets the page count to display.
*/
void setPageCount(int value);
/**
* Sets the words per minute to display.
*/
void setWordsPerMinute(int percentage);
/**
* Sets the time spent writing.
*/
void setWritingTime(int minutes);
/**
* Sets the percentage of time spent idle (i.e., NOT writing).
*/
void setIdleTime(int percentage);
private:
QScopedPointer<SessionStatisticsWidgetPrivate> d_ptr;
};
} // namespace ghostwriter
#endif // SESSIONSTATISTICSWIDGET_H