~ubuntu-branches/ubuntu/natty/transmission/natty

« back to all changes in this revision

Viewing changes to qt/.svn/text-base/details.h.svn-base

  • Committer: Bazaar Package Importer
  • Author(s): Jamie Strandboge
  • Date: 2010-01-07 10:50:13 UTC
  • Revision ID: james.westby@ubuntu.com-20100107105013-gcb78xrsnjr0jzb4
Tags: 1.80~b1-0ubuntu2
* SECURITY UPDATE: fix arbitrary file overwrite via crafted torrent file
  - debian/patches/CVE-2010-0012.patch: adjust metainfo.c to check for '../'
  - CVE-2010-0012
  - LP: #500625

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * This file Copyright (C) 2009 Mnemosyne LLC
 
3
 *
 
4
 * This file is licensed by the GPL version 2.  Works owned by the
 
5
 * Transmission project are granted a special exemption to clause 2(b)
 
6
 * so that the bulk of its code can remain under the MIT license.
 
7
 * This exemption does not extend to derived works not owned by
 
8
 * the Transmission project.
 
9
 *
 
10
 * $Id$
 
11
 */
 
12
 
 
13
#ifndef DETAILS_DIALOG_H
 
14
#define DETAILS_DIALOG_H
 
15
 
 
16
#include <QDialog>
 
17
#include <QString>
 
18
#include <QMap>
 
19
#include <QSet>
 
20
#include <QTimer>
 
21
#include <QWidgetList>
 
22
 
 
23
#include "prefs.h"
 
24
 
 
25
class FileTreeView;
 
26
class QTreeView;
 
27
class QComboBox;
 
28
class QCheckBox;
 
29
class QDoubleSpinBox;
 
30
class QLabel;
 
31
class QRadioButton;
 
32
class QSpinBox;
 
33
class QTextBrowser;
 
34
class QTreeWidget;
 
35
class QTreeWidgetItem;
 
36
class Session;
 
37
class Torrent;
 
38
class TorrentModel;
 
39
 
 
40
class Details: public QDialog
 
41
{
 
42
        Q_OBJECT
 
43
 
 
44
    private slots:
 
45
        void onTorrentChanged( );
 
46
        void onTimer( );
 
47
 
 
48
    public:
 
49
        Details( Session&, TorrentModel&, QWidget * parent = 0 );
 
50
        ~Details( );
 
51
        void setIds( const QSet<int>& ids );
 
52
 
 
53
    private:
 
54
        QWidget * createPeersTab( );
 
55
        QWidget * createTrackerTab( );
 
56
        QWidget * createInfoTab( );
 
57
        QWidget * createFilesTab( );
 
58
        QWidget * createOptionsTab( );
 
59
 
 
60
    private:
 
61
        QString trimToDesiredWidth( const QString& str );
 
62
        void enableWhenChecked( QCheckBox *, QWidget * );
 
63
 
 
64
    private:
 
65
 
 
66
        Session& mySession;
 
67
        TorrentModel& myModel;
 
68
        QSet<int> myIds;
 
69
        QTimer myTimer;
 
70
        bool myHavePendingRefresh;
 
71
 
 
72
        QLabel * myStateLabel;
 
73
        QLabel * myHaveLabel;
 
74
        QLabel * myDownloadedLabel;
 
75
        QLabel * myUploadedLabel;
 
76
        QLabel * myRatioLabel;
 
77
        QLabel * myErrorLabel;
 
78
        QLabel * myRunTimeLabel;
 
79
        QLabel * myETALabel;
 
80
        QLabel * myLastActivityLabel;
 
81
 
 
82
        QCheckBox * mySessionLimitCheck;
 
83
        QCheckBox * mySingleDownCheck;
 
84
        QCheckBox * mySingleUpCheck;
 
85
        QSpinBox * mySingleDownSpin;
 
86
        QSpinBox * mySingleUpSpin;
 
87
        QRadioButton * mySeedGlobalRadio;
 
88
        QRadioButton * mySeedForeverRadio;
 
89
        QRadioButton * mySeedCustomRadio;
 
90
        QDoubleSpinBox * mySeedCustomSpin;
 
91
        QSpinBox * myPeerLimitSpin;
 
92
        QComboBox * myBandwidthPriorityCombo;
 
93
 
 
94
        QLabel * mySizeLabel;
 
95
        QLabel * myHashLabel;
 
96
        QLabel * myPrivacyLabel;
 
97
        QLabel * myOriginLabel;
 
98
        QLabel * myLocationLabel;
 
99
        QTextBrowser * myCommentBrowser;
 
100
 
 
101
        QLabel * myTrackerLabel;
 
102
        QLabel * myScrapeTimePrevLabel;
 
103
        QLabel * myScrapeTimeNextLabel;
 
104
        QLabel * myScrapeResponseLabel;
 
105
        QLabel * myAnnounceTimePrevLabel;
 
106
        QLabel * myAnnounceTimeNextLabel;
 
107
        QLabel * myAnnounceResponseLabel;
 
108
        QLabel * myAnnounceManualLabel;
 
109
 
 
110
        QTreeWidget * myPeerTree;
 
111
        QMap<QString,QTreeWidgetItem*> myPeers;
 
112
        QWidgetList myWidgets;
 
113
 
 
114
        FileTreeView * myFileTreeView;
 
115
 
 
116
    private slots:
 
117
        void onBandwidthPriorityChanged( int );
 
118
        void onFilePriorityChanged( const QSet<int>& fileIndices, int );
 
119
        void onFileWantedChanged( const QSet<int>& fileIndices, bool );
 
120
        void onHonorsSessionLimitsToggled( bool );
 
121
        void onDownloadLimitedToggled( bool );
 
122
        void onDownloadLimitChanged( int );
 
123
        void onUploadLimitedToggled( bool );
 
124
        void onUploadLimitChanged( int );
 
125
        void onSeedUntilChanged( bool );
 
126
        void onSeedRatioLimitChanged( double );
 
127
        void onMaxPeersChanged( int );
 
128
        void refresh( );
 
129
};
 
130
 
 
131
#endif