~ubuntu-branches/ubuntu/wily/psi/wily-proposed

« back to all changes in this revision

Viewing changes to src/filetransdlg.h

  • Committer: Package Import Robot
  • Author(s): Jan Niehusmann
  • Date: 2014-07-01 21:49:34 UTC
  • mfrom: (6.1.7 sid)
  • Revision ID: package-import@ubuntu.com-20140701214934-gt4dkgm94byi4vnn
Tags: 0.15-1
* New upstream version
* set debhelper compat level to 9
* set Standards-Version to 3.9.5 (no further changes)
* add lintian override regarding license-problem-non-free-RFC
* use qconf to regenerate configure script
* implement hardening using buildflags instead of hardening-wrapper

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#ifndef FILETRANSDLG_H
2
2
#define FILETRANSDLG_H
3
3
 
 
4
#include <QItemDelegate>
4
5
#include "advwidget.h"
5
6
#include "ui_filetrans.h"
6
7
#include "s5b.h"
7
8
 
8
9
class PsiCon;
9
10
class PsiAccount;
 
11
class QPixmap;
 
12
class FileTransView;
10
13
namespace XMPP {
11
14
        class FileTransfer;
12
15
        class Jid;
32
35
        int totalSteps() const;
33
36
        bool resumeSupported() const;
34
37
        QString saveName() const;
 
38
        QString filePath() const;
 
39
        QPixmap fileIcon() const;
 
40
        
35
41
 
36
42
        void send(const Jid &to, const QString &fname, const QString &desc);
37
43
        void accept(const QString &saveName, const QString &fileName, qlonglong offset=0);
111
117
        FileTransDlg(PsiCon *);
112
118
        ~FileTransDlg();
113
119
 
114
 
        int addItem(const QString &filename, qlonglong size, const QString &peer, bool sending);
 
120
        int addItem(const QString &filename, const QString &path, const QPixmap &fileicon, qlonglong size, const QString &peer, bool sending);
115
121
        void setProgress(int id, int step, int total, qlonglong sent, int bytesPerSecond, bool updateAll=false);
116
122
        void setError(int id, const QString &reason);
117
123
        void removeItem(int id);
128
134
        void itemCancel(int);
129
135
        void itemOpenDest(int);
130
136
        void itemClear(int);
 
137
        void openFile(QModelIndex);
131
138
 
132
139
private:
133
140
        class Private;
134
141
        Private *d;
135
142
};
136
143
 
 
144
class FileTransDelegate : public QItemDelegate
 
145
{
 
146
        Q_OBJECT
 
147
public:
 
148
        FileTransDelegate(QObject* p);
 
149
        void paint(QPainter* mp, const QStyleOptionViewItem& option, const QModelIndex& index) const;
 
150
        QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const;
 
151
 
 
152
private:
 
153
        FileTransView* ftv;
 
154
};
 
155
 
137
156
#endif