forked from Shazib/CometFTP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainWindow.h
81 lines (66 loc) · 1.83 KB
/
MainWindow.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
#ifndef COMET_MAINWINDOW_H
#define COMET_MAINWINDOW_H
// Qt
#include <QFrame>
#include <QtWidgets>
// Libraries
#include <libssh/libssh.h>
#include <libssh/sftp.h>
// Classes
#include "ServerExplorer.h"
#include "LocalExplorer.h"
#include "StatusArea.h"
#include "SlidingStackedWidget.h"
#include "DownloadManager.h"
#include "About.h"
class MainWindow : public QFrame
{
Q_OBJECT
public:
explicit MainWindow(QFrame *parent = 0);
~MainWindow();
private:
// Widgets
QPushButton* btnQuit;
QPushButton* btnMax;
QPushButton* btnMin;
QPushButton* btnMenu;
StatusArea* statusArea;
LocalExplorer* localExplorer;
ServerExplorer* serverExplorer;
SlidingStackedWidget* mainContent;
DownloadManager* downloadManager;
// Layouts
QVBoxLayout* mainLayout;
QHBoxLayout* topLayout;
QHBoxLayout* topLeftLayout;
QHBoxLayout* topMiddleLayout;
QHBoxLayout* topRightLayout;
QHBoxLayout* bottomLayout;
QHBoxLayout* bottomLeftLayout;
QHBoxLayout* bottomRightLayout;
bool max; // For Window Maximising with frameless helper
int animTime; // For setting animation times on slides
bool switched;
QString bookmarks;
// SFTP Session
std::string host;
std::string password;
std::string user;
std::string port;
sftp_session sftp;
void connectSftp();
protected:
void createGuiComponents();
void createMainLayout();
private slots:
void maxSize();
void aboutClick();
public slots:
void switchSlides();
void recieveCredentials(std::string host, std::string user, std::string password, std::string port);
void recieveDropData(QString type, QString source, QString destination, QString stfpType);
signals:
void sendCredentials(std::string host, std::string user, std::string password, std::string port);
};
#endif // COMET_MAINWINDOW_H