a lot of debug
This commit is contained in:
+27
-19
@@ -1,6 +1,7 @@
|
||||
#ifndef MAINWINDOW_H
|
||||
#define MAINWINDOW_H
|
||||
|
||||
#define QT_USE_FAST_CONCATENATION
|
||||
#define QT_USE_FAST_OPERATOR_PLUS
|
||||
#include "ui_mainwindow.h"
|
||||
#include "ui_configuration.h"
|
||||
#include "downloadfile.h"
|
||||
@@ -33,6 +34,8 @@
|
||||
#include <unistd.h>
|
||||
#include <magic.h>
|
||||
#include <QComboBox>
|
||||
#include <QStringBuilder>
|
||||
#include <pwd.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
namespace Ui { class MainWindow; }
|
||||
@@ -44,6 +47,8 @@ class Connexion
|
||||
int bandwidthLimit = 0;
|
||||
std::string bandwidthLimitUnit = "";
|
||||
std::string server;
|
||||
std::string service;
|
||||
|
||||
int port = 873;
|
||||
};
|
||||
|
||||
@@ -54,14 +59,15 @@ class Downloading
|
||||
std::string service;
|
||||
std::string path;
|
||||
std::string savePath;
|
||||
int pid = 0;
|
||||
|
||||
void clear();
|
||||
};
|
||||
|
||||
class About
|
||||
{
|
||||
public:
|
||||
QString title = "RsyncUI";
|
||||
QString version = "1.6";
|
||||
QString version = "1.8.3";
|
||||
QString author = "Daniel TARTAVEL-JEANNOT";
|
||||
QString licence = "GPL_V3";
|
||||
QString description;
|
||||
@@ -78,20 +84,7 @@ class MainWindow : public QMainWindow
|
||||
MainWindow(QWidget *parent = nullptr);
|
||||
~MainWindow();
|
||||
QProgressDialog *progress;
|
||||
void displayTree();
|
||||
void populateTree(QTreeWidgetItem * parent);
|
||||
void populateList();
|
||||
void listServices();
|
||||
bool validateServer(std::string server);
|
||||
bool isIpAddress(std::string server);
|
||||
QTreeWidgetItem * addTreeRoot(QString name, QString description, bool isDir);
|
||||
QTreeWidgetItem * addTreeChild(QTreeWidgetItem *parent, QString name, QString size, bool isDir);
|
||||
void scanDir(std::string server, int portN, QTreeWidgetItem *parent = NULL, std::string path = "" );
|
||||
void startDownloading();
|
||||
void loadSettings();
|
||||
void saveSettings();
|
||||
void closeEvent (QCloseEvent *event);
|
||||
|
||||
int pid = 0;
|
||||
Connexion connexion;
|
||||
Downloading downloading;
|
||||
downloadFile downloadO;
|
||||
@@ -108,6 +101,22 @@ class MainWindow : public QMainWindow
|
||||
{'P', 4}
|
||||
};
|
||||
|
||||
void displayTree();
|
||||
void populateTree(QTreeWidgetItem * parent);
|
||||
void populateList();
|
||||
void listServices();
|
||||
bool validateServer(std::string server);
|
||||
bool isIpAddress(std::string server);
|
||||
QTreeWidgetItem * addTreeRoot(QString name, QString description, bool isDir);
|
||||
QTreeWidgetItem * addTreeChild(QTreeWidgetItem *parent, QString name, QString size, bool isDir);
|
||||
void scanDir(std::string server, int portN, QTreeWidgetItem *parent = NULL, std::string path = "" );
|
||||
void startDownloading();
|
||||
void loadSettings();
|
||||
void saveSettings();
|
||||
void closeEvent (QCloseEvent *event);
|
||||
void saveDownloadList();
|
||||
void loadDownloadList();
|
||||
|
||||
private slots:
|
||||
|
||||
void on_listWidget_clicked();
|
||||
@@ -126,7 +135,7 @@ class MainWindow : public QMainWindow
|
||||
|
||||
void on_khistorycombobox_currentIndexChanged(int);
|
||||
|
||||
void on_DefaultSaveFolder_triggered();
|
||||
bool on_DefaultSaveFolder_triggered();
|
||||
|
||||
void on_connectButton_clicked();
|
||||
|
||||
@@ -137,7 +146,6 @@ public slots:
|
||||
|
||||
signals:
|
||||
void stopDownloading(int);
|
||||
// void accepted();
|
||||
};
|
||||
|
||||
#endif // MAINWINDOW_H
|
||||
|
||||
Reference in New Issue
Block a user