-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLogNotebook.h
More file actions
94 lines (68 loc) · 2.04 KB
/
Copy pathLogNotebook.h
File metadata and controls
94 lines (68 loc) · 2.04 KB
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#pragma once
#include <QtWidgets/QMainWindow>
#include "ui_LogNotebook.h"
#include "SignInDialog.h"
#include "SignOutDialog.h"
#include <QtNetworkAuth>
#include "RemoveNameDialog.h"
class CloudDialog;
class LogNotebook : public QMainWindow
{
Q_OBJECT
public:
LogNotebook(QWidget *parent = Q_NULLPTR);
~LogNotebook();
/*
Cloud backup stuff
*/
QOAuth2AuthorizationCodeFlow* dropBox;
QDate lastCloudBackup; // last time data was backed up to dropbox
QString userName; // the user name of the person who is logged in
int backupFrequency = 7; // how often to backup to the cloud in days
void logIntoDB();
void logOutofDB();
void getLastDBBackup();
void backupToCloud(); // backs up data to dropbox
private:
Ui::LogNotebookClass ui;
void exportToCSV(QString fileName);
bool exportToExcel(QString fileName);
QFuture<bool> future;
QTimer* backupTimer; // checks every hour to see if it should back up localy. Back ups happen daily
CloudDialog* cloudManager;
RemoveNameDialog* removeNameDlg;
// calendar stuff
QDate startDate;
QDate endDate;
// name stuff
QString firstName;
QString lastName;
QString taskName;
void refreshList();
void checkIfDone();
public slots:
void checkBackup();
private slots:
void on_menuFile_triggered(QAction* action);
void on_menuEdit_triggered(QAction* action);
void on_menuOptions_triggered(QAction* action);
void on_menuAbout_triggered(QAction* action);
void finishedExport();
void uploadProgress(qint64 bytesSent, qint64 bytesTotal);
void uploadDone();
void loginDone();
void gotLastBackup();
void gotUsrName();
void cloudError(const QString& error, const QString& errorDescription, const QUrl& uri);
void newDates(Dates dates);
void on_taskCombo_currentTextChanged(const QString& text);
void on_search_textChanged(const QString& text);
void on_nameList_itemSelectionChanged();
void on_totalTime_textChanged(const QString& text);
void on_submitBtn_released();
void on_showTodayBtn_released();
void on_helpBtn_released();
void on_enterNewBtn_released();
signals:
void authenticated();
};