forked from Shazib/CometFTP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathServerExplorer.h
75 lines (65 loc) · 1.84 KB
/
ServerExplorer.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
#ifndef COMET_SERVEREXPLORER_H
#define COMET_SERVEREXPLORER_H
#include <QWidget>
#include <QtWidgets>
#include "SFTPSite.h"
#include "SlidingStackedWidget.h"
#include "ServerFileModel.h"
#include "AddressBar.h"
class ServerExplorer : public QWidget
{
Q_OBJECT
public:
explicit ServerExplorer(QWidget *parent = 0);
std::string _host;
std::string _user;
std::string _port;
std::string _password;
signals:
void sendCredentials(std::string host, std::string user, std::string password, std::string port);
void sendDropData(QString type, QString source, QString desination, QString stfpType);
public slots:
private slots:
void bookmarkBtnPressed();
void sftpBtnPressed();
void connectBtnPressed();
void rowSelected(const QModelIndex indx);
void updatedPath(QString path);
void receiveDropData(QString type, QString source, QString destination, QString sftpType);
void addBookmark();
void setBookmarks();
void updateBookmarkView(int row);
void setTableData();
private:
QFrame* toolbar;
QWidget* explorerSlide;
QWidget* siteManager;
QWidget* bookmarkSlide;
QWidget* connectSlide;
void setupSiteManager();
QPushButton* bookmarkBtn;
QPushButton* sftpBtn;
QPushButton* connectBtn;
QPushButton* connectBookmarkBtn;
SFTPSite* site;
SlidingStackedWidget* mainSlider;
ServerFileModel* model;
//Connect Area
QLineEdit* host;
QLineEdit* user;
QLineEdit* password;
QLineEdit* port;
QString mainDir;
int animTime;
QTableView* table;
AddressBar* addressBar;
// Bookmarks
QStringList bookmarks;
QString encrypt(QString pass);
QString decrypt(QString encryptedPassword);
QListWidget* bookmarkTable;
QLabel* serverLbl;
QLabel* userLbl;
QPushButton* bookmarkConnect;
};
#endif // COMET_SERVEREXPLORER_H