-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFileTransferListWidget.h
55 lines (45 loc) · 1.18 KB
/
FileTransferListWidget.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
/*
* Better Chat plugin for TeamSpeak 3
* GPLv3 license
*
* Copyright (C) 2018 Luch (https://github.com/Luch00)
*/
#pragma once
#include <globals.h>
#include <QListWidget>
#include <file.h>
#include <QInputDialog>
#include <QMessageBox>
class FileTransferListWidget : public QWidget
{
Q_OBJECT
public:
FileTransferListWidget(QWidget *parent = 0);
~FileTransferListWidget();
void transferStatusChanged(anyID transferID, unsigned status);
void setDownloadDirectory(QString dir) const;
signals:
void showTransferCompletePop(QString filename);
void transferComplete(unsigned short transferId);
void transferCancelled(unsigned short transferId);
void transferFailed();
public slots :
void onFileUrlClicked(const QUrl &url);
private slots:
void onPwDialogAccepted(const QString &pw);
void onOwDialogAccepted();
void onTransferCancelled(int id) const;
void onClear() const;
private:
QListWidget* list;
QMap<anyID, File> filetransfers;
QInputDialog* pwDialog;
QMessageBox* owDialog;
QLineEdit* directory;
File temp;
void initPwDialog();
void initOverwriteDialog();
void checkForPassword();
void startDownload();
void addTransferItem(anyID transferId, QString filename);
};