forked from Uplimg-old/Uplimg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
screenmanager.h
executable file
·103 lines (76 loc) · 2.06 KB
/
screenmanager.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
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
95
96
97
98
99
100
101
102
103
/**
This file (c) by : - Martin Hammerchmidt alias Imote
This file is licensed under a
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
You should have received a copy of the license along with this
work. If not, see <http://creativecommons.org/licenses/by-nc-sa/4.0/>.
If you have contributed to this file, add your name to authors list.
*/
#ifndef SCREENMANAGER_H
#define SCREENMANAGER_H
#include <iostream>
#include <memory>
#include <QApplication>
#include <QScreen>
#include <QGuiApplication>
#include <QPixmap>
#include <QStandardPaths>
#include <QString>
#include <QTime>
#include <QDate>
#include <QSettings>
#include <QLabel>
#include <QColor>
#include <QBitmap>
#include <QRgb>
#include <QObject>
#include <string>
#include <SFML/Network.hpp>
#include "selectareaband.h"
#include "uploadMethod/ftpupload.h"
#include "uploadMethod/httppostupload.h"
#include "paste/pastewindow.h"
#include "containers/pastecontent.h"
#include "shared.h"
enum Direction
{
LEFT,
RIGHT
};
class SystemTrayIcon;
class FileManager : public QObject
{
Q_OBJECT
public:
FileManager(SystemTrayIcon * parent);
~FileManager();
File captureSelectedZone(const File &file);
File captureFullScreen(File &file);
void startPastMode();
void sendFileTroughHTTP(const File &file);
void sendFileTroughFTP(const File &file);
void sendFileTroughUplimgWeb(const File &file);
protected:
SystemTrayIcon * parent;
QSettings settings;
const int darkenFactor;
QPixmap darkenPicture(const QPixmap &picture);
QPixmap originalScreenshot;
File lastFile;
SelectAreaBand * fullScreenPicture;
QScreen * screen;
short screenNumber; //store the screen id
PasteWindow * paste;
HTTPPostUpload * http;
FTPUpload * ftp;
public slots:
void areaPictureTaken(QRect);
void areaPictureCanceled();
void autoSendFile(const File &file);
void fileSendedTroughHTTP();
void fileSendedTroughFTP();
void pasteReady(PasteContent const &paste);
signals:
void canSend();
};
#endif // SCREENMANAGER_H