-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathTaskHistoryDialog.h
46 lines (35 loc) · 983 Bytes
/
TaskHistoryDialog.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
#ifndef TASKHISTORYDIALOG_H
#define TASKHISTORYDIALOG_H
#include <QDialog>
#include <QList>
#include "TaskLogger.h"
#include "QTableWidgetWithCopy.h"
namespace Ui {
class TaskHistoryDialog;
}
class QTableWidgetItem;
class Task;
class TaskItem;
class TaskHistoryDialog : public QDialog
{
Q_OBJECT
public:
explicit TaskHistoryDialog(QWidget *parent = 0);
~TaskHistoryDialog();
void showTask(Task *task);
static void setTaskItems(const QList<TaskItem *> *taskItems);
private:
Ui::TaskHistoryDialog *ui;
QTableWidgetWithCopy historyTable;
static const QList<TaskItem*> *taskItems;
QList<TaskSession> relevantSessions;
void setupHistoryTable();
QString getTaskName(int taskId);
private slots:
void taskChanged(int taskIndex);
void showSaveToFileDialog();
bool saveToCsv(QString filename);
QString getCsvLine(TaskSession session);
QTableWidgetItem *newReadOnlyItem(QString &text);
};
#endif // TASKHISTORYDIALOG_H