2
* This file Copyright (C) 2009 Mnemosyne LLC
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.
13
#ifndef DETAILS_DIALOG_H
14
#define DETAILS_DIALOG_H
21
#include <QWidgetList>
35
class QTreeWidgetItem;
40
class Details: public QDialog
45
void onTorrentChanged( );
49
Details( Session&, TorrentModel&, QWidget * parent = 0 );
51
void setIds( const QSet<int>& ids );
54
QWidget * createPeersTab( );
55
QWidget * createTrackerTab( );
56
QWidget * createInfoTab( );
57
QWidget * createFilesTab( );
58
QWidget * createOptionsTab( );
61
QString trimToDesiredWidth( const QString& str );
62
void enableWhenChecked( QCheckBox *, QWidget * );
67
TorrentModel& myModel;
70
bool myHavePendingRefresh;
72
QLabel * myStateLabel;
74
QLabel * myDownloadedLabel;
75
QLabel * myUploadedLabel;
76
QLabel * myRatioLabel;
77
QLabel * myErrorLabel;
78
QLabel * myRunTimeLabel;
80
QLabel * myLastActivityLabel;
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;
96
QLabel * myPrivacyLabel;
97
QLabel * myOriginLabel;
98
QLabel * myLocationLabel;
99
QTextBrowser * myCommentBrowser;
101
QLabel * myTrackerLabel;
102
QLabel * myScrapeTimePrevLabel;
103
QLabel * myScrapeTimeNextLabel;
104
QLabel * myScrapeResponseLabel;
105
QLabel * myAnnounceTimePrevLabel;
106
QLabel * myAnnounceTimeNextLabel;
107
QLabel * myAnnounceResponseLabel;
108
QLabel * myAnnounceManualLabel;
110
QTreeWidget * myPeerTree;
111
QMap<QString,QTreeWidgetItem*> myPeers;
112
QWidgetList myWidgets;
114
FileTreeView * myFileTreeView;
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 );