root/trunk/qt4-gui/src/dialogs/filedlg.h

Revision 5837, 2.3 kB (checked in by eugene, 12 months ago)

P.S. Happy recompiling ;-)

  • Property svn:eol-style set to native
Line 
1/*
2 * This file is part of Licq, an instant messaging client for UNIX.
3 * Copyright (C) 1999-2006 Licq developers
4 *
5 * Licq is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * Licq is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with Licq; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18 */
19
20#ifndef FILEDLG_H
21#define FILEDLG_H
22
23#include <QTimer>
24#include <QWidget>
25
26#include <licq_filetransfer.h>
27
28class CFileTransferManager;
29class QLabel;
30class QProgressBar;
31class QPushButton;
32class QSocketNotifier;
33
34namespace LicqQtGui
35{
36class InfoField;
37class MLEdit;
38
39class FileDlg : public QWidget
40{
41   Q_OBJECT
42public:
43  FileDlg(const char* szId, unsigned long nPPID, QWidget* parent = 0);
44  virtual ~FileDlg();
45
46  bool SendFiles(ConstFileList filelist, unsigned short nPort);
47  bool ReceiveFiles();
48
49  unsigned short LocalPort();
50  QString Id()  { return myId; }
51  unsigned long PPID()  { return m_nPPID; }
52
53private:
54   QLabel* lblTransferFileName;
55   QLabel* lblLocalFileName;
56   QLabel* lblFileSize;
57   QLabel* lblTrans;
58   QLabel* lblBatch;
59   QLabel* lblTime;
60   QLabel* lblBPS;
61   QLabel* lblETA;
62   InfoField* nfoFileSize;
63   InfoField* nfoTransferFileName;
64   InfoField* nfoTotalFiles;
65   InfoField* nfoBatchSize;
66   InfoField* nfoLocalFileName;
67   InfoField* nfoBPS;
68   InfoField* nfoETA;
69   InfoField* nfoTime;
70   QPushButton* btnCancel;
71   QPushButton* btnOpen;
72   QPushButton* btnOpenDir;
73   MLEdit* mleStatus;
74   QProgressBar* barTransfer;
75   QProgressBar* barBatchTransfer;
76
77   CFileTransferManager* ftman;
78
79   QString myId;
80   unsigned long m_nPPID;
81   QSocketNotifier* sn;
82
83   QTimer m_tUpdate;
84
85   QString encodeFSize(unsigned long size);
86
87private slots:
88  void slot_ft();
89  void slot_update();
90  void slot_cancel();
91  void slot_open();
92  void slot_opendir();
93};
94
95} // namespace LicqQtGui
96
97#endif
Note: See TracBrowser for help on using the browser.