1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-27 18:18:10 +00:00
transmission/qt/details.h

134 lines
3.6 KiB
C
Raw Normal View History

2009-04-09 18:55:47 +00:00
/*
* This file Copyright (C) 2009 Charles Kerr <charles@transmissionbt.com>
*
* This file is licensed by the GPL version 2. Works owned by the
* Transmission project are granted a special exemption to clause 2(b)
* so that the bulk of its code can remain under the MIT license.
* This exemption does not extend to derived works not owned by
* the Transmission project.
*
* $Id$
2009-04-09 18:55:47 +00:00
*/
#ifndef DETAILS_DIALOG_H
#define DETAILS_DIALOG_H
#include <QDialog>
#include <QString>
#include <QMap>
#include <QSet>
#include <QTimer>
#include <QWidgetList>
2009-04-09 18:55:47 +00:00
#include "prefs.h"
class FileTreeView;
class QTreeView;
class QComboBox;
2009-04-09 18:55:47 +00:00
class QCheckBox;
class QDoubleSpinBox;
class QLabel;
class QRadioButton;
class QSpinBox;
class QTextBrowser;
class QTreeWidget;
class QTreeWidgetItem;
class Session;
class Torrent;
class TorrentModel;
2009-04-09 18:55:47 +00:00
class Details: public QDialog
{
Q_OBJECT
private slots:
void onTorrentChanged( );
void onTimer( );
public:
Details( Session&, TorrentModel&, QWidget * parent = 0 );
2009-04-09 18:55:47 +00:00
~Details( );
void setIds( const QSet<int>& ids );
2009-04-09 18:55:47 +00:00
private:
QWidget * createPeersTab( );
QWidget * createTrackerTab( );
QWidget * createInfoTab( );
QWidget * createFilesTab( );
QWidget * createOptionsTab( );
private:
QString trimToDesiredWidth( const QString& str );
void enableWhenChecked( QCheckBox *, QWidget * );
private:
Session& mySession;
TorrentModel& myModel;
QSet<int> myIds;
2009-04-09 18:55:47 +00:00
QTimer myTimer;
bool myHavePendingRefresh;
2009-04-09 18:55:47 +00:00
QLabel * myStateLabel;
QLabel * myHaveLabel;
QLabel * myDownloadedLabel;
QLabel * myUploadedLabel;
QLabel * myRatioLabel;
QLabel * myErrorLabel;
QLabel * myRunTimeLabel;
QLabel * myLastActivityLabel;
2009-04-09 18:55:47 +00:00
QCheckBox * mySessionLimitCheck;
QCheckBox * mySingleDownCheck;
QCheckBox * mySingleUpCheck;
QSpinBox * mySingleDownSpin;
QSpinBox * mySingleUpSpin;
QRadioButton * mySeedGlobalRadio;
QRadioButton * mySeedForeverRadio;
QRadioButton * mySeedCustomRadio;
QDoubleSpinBox * mySeedCustomSpin;
QSpinBox * myPeerLimitSpin;
QComboBox * myBandwidthPriorityCombo;
2009-04-09 18:55:47 +00:00
QLabel * mySizeLabel;
2009-04-09 18:55:47 +00:00
QLabel * myHashLabel;
QLabel * myPrivacyLabel;
QLabel * myOriginLabel;
QLabel * myLocationLabel;
2009-04-09 18:55:47 +00:00
QTextBrowser * myCommentBrowser;
QLabel * myTrackerLabel;
QLabel * myScrapeTimePrevLabel;
QLabel * myScrapeTimeNextLabel;
QLabel * myScrapeResponseLabel;
QLabel * myAnnounceTimePrevLabel;
QLabel * myAnnounceTimeNextLabel;
QLabel * myAnnounceResponseLabel;
QLabel * myAnnounceManualLabel;
QLabel * mySeedersLabel;
QLabel * myLeechersLabel;
QLabel * myTimesCompletedLabel;
QTreeWidget * myPeerTree;
QMap<QString,QTreeWidgetItem*> myPeers;
QWidgetList myWidgets;
2009-04-09 18:55:47 +00:00
FileTreeView * myFileTreeView;
private slots:
void onBandwidthPriorityChanged( int );
2009-04-09 18:55:47 +00:00
void onFilePriorityChanged( const QSet<int>& fileIndices, int );
void onFileWantedChanged( const QSet<int>& fileIndices, bool );
void onHonorsSessionLimitsToggled( bool );
void onDownloadLimitedToggled( bool );
void onDownloadLimitChanged( int );
void onUploadLimitedToggled( bool );
void onUploadLimitChanged( int );
void onSeedUntilChanged( bool );
void onSeedRatioLimitChanged( double );
void onMaxPeersChanged( int );
void refresh( );
2009-04-09 18:55:47 +00:00
};
#endif