summaryrefslogtreecommitdiffstats
path: root/src/gui/clientFileSendDialog.h
diff options
context:
space:
mode:
authorSebastian2010-05-12 19:42:27 +0200
committerSebastian2010-05-12 19:42:27 +0200
commitce3329047d378a14006ce74ec273ac59e3375303 (patch)
tree782430f270b4c7aca1b35d5b7813518e3797c555 /src/gui/clientFileSendDialog.h
downloadpvs-ce3329047d378a14006ce74ec273ac59e3375303.tar.gz
pvs-ce3329047d378a14006ce74ec273ac59e3375303.tar.xz
pvs-ce3329047d378a14006ce74ec273ac59e3375303.zip
initial import of latest svn version
Diffstat (limited to 'src/gui/clientFileSendDialog.h')
-rw-r--r--src/gui/clientFileSendDialog.h76
1 files changed, 76 insertions, 0 deletions
diff --git a/src/gui/clientFileSendDialog.h b/src/gui/clientFileSendDialog.h
new file mode 100644
index 0000000..d8afc3a
--- /dev/null
+++ b/src/gui/clientFileSendDialog.h
@@ -0,0 +1,76 @@
+/*
+ # Copyright (c) 2009, 2010 - OpenSLX Project, Computer Center University of
+ # Freiburg
+ #
+ # This program is free software distributed under the GPL version 2.
+ # See http://openslx.org/COPYING
+ #
+ # If you have any feedback please consult http://openslx.org/feedback and
+ # send your suggestions, praise, or complaints to feedback@openslx.org
+ #
+ # General information about OpenSLX can be found at http://openslx.org/
+ */
+
+#ifndef CLIENTFILESENDDIALOG_H_
+#define CLIENTFILESENDDIALOG_H_
+
+#include <QtGui>
+#include <QtNetwork>
+#include "pvsinterface.h"
+#include "ui_clientFileSendDialog.h"
+#include "ui_clientNicklistDialog.h"
+
+class ClientNicklistDialog: public QDialog,
+ private Ui::ClientNicklistDialogClass
+{
+Q_OBJECT
+
+public:
+ ClientNicklistDialog(QWidget *parent = 0);
+ ~ClientNicklistDialog();
+
+ QString getNick();
+
+private:
+ OrgOpenslxPvsInterface *_ifaceDBus;
+
+};
+
+////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////
+
+class ClientFileSendDialog: public QDialog,
+ private Ui::ClientFileSendDialogClass
+{
+Q_OBJECT
+
+public:
+ ClientFileSendDialog(QWidget *parent = 0);
+ ~ClientFileSendDialog();
+
+ void open();
+ void open(QString nick);
+ void open(QString nick, QString filename);
+
+private Q_SLOTS:
+ void sendHeader();
+ void receiveAck();
+ void sendFile();
+ void close();
+ void error(QAbstractSocket::SocketError error);
+
+private:
+ QString formatSize(qint64 size);
+
+ QTcpSocket *_socket;
+ QFile *_file;
+ qint64 _bytesToWrite;
+ int div;
+
+ ClientNicklistDialog *_clientNicklistDialog;
+ OrgOpenslxPvsInterface *_ifaceDBus;
+ QString _nickname;
+
+};
+
+#endif /* CLIENTFILESENDDIALOG_H_ */