qBittorrent
|
#include <peerlistwidget.h>
Public Types | |
enum | PeerListColumns { COUNTRY , IP , PORT , CONNECTION , FLAGS , CLIENT , PROGRESS , DOWN_SPEED , UP_SPEED , TOT_DOWN , TOT_UP , RELEVANCE , DOWNLOADING_PIECE , IP_HIDDEN , COL_COUNT } |
Public Member Functions | |
PeerListWidget (PropertiesWidget *parent) | |
~PeerListWidget () override | |
void | loadPeers (const BitTorrent::Torrent *torrent) |
void | updatePeerHostNameResolutionState () |
void | updatePeerCountryResolutionState () |
void | clear () |
Private Slots | |
void | loadSettings () |
void | saveSettings () const |
void | displayToggleColumnsMenu (const QPoint &) |
void | showPeerListMenu (const QPoint &) |
void | banSelectedPeers () |
void | copySelectedPeers () |
void | handleSortColumnChanged (int col) |
void | handleResolved (const QHostAddress &ip, const QString &hostname) const |
Private Member Functions | |
void | updatePeer (const BitTorrent::Torrent *torrent, const BitTorrent::PeerInfo &peer, bool &isNewPeer) |
void | wheelEvent (QWheelEvent *event) override |
Private Attributes | |
QStandardItemModel * | m_listModel = nullptr |
PeerListSortModel * | m_proxyModel = nullptr |
PropertiesWidget * | m_properties = nullptr |
Net::ReverseResolution * | m_resolver = nullptr |
QHash< PeerEndpoint, QStandardItem * > | m_peerItems |
QHash< QHostAddress, QSet< QStandardItem * > > | m_itemsByIP |
bool | m_resolveCountries |
Definition at line 55 of file peerlistwidget.h.
Enumerator | |
---|---|
COUNTRY | |
IP | |
PORT | |
CONNECTION | |
FLAGS | |
CLIENT | |
PROGRESS | |
DOWN_SPEED | |
UP_SPEED | |
TOT_DOWN | |
TOT_UP | |
RELEVANCE | |
DOWNLOADING_PIECE | |
IP_HIDDEN | |
COL_COUNT |
Definition at line 60 of file peerlistwidget.h.
|
explicit |
Definition at line 79 of file peerlistwidget.cpp.
References anonymous_namespace{advancedsettings.cpp}::COL_COUNT, copySelectedPeers(), displayToggleColumnsMenu(), handleSortColumnChanged(), Preferences::instance(), loadSettings(), m_listModel, m_proxyModel, m_resolveCountries, PROGRESS, Preferences::resolvePeerCountries(), saveSettings(), showPeerListMenu(), and updatePeerHostNameResolutionState().
|
override |
Definition at line 175 of file peerlistwidget.cpp.
References saveSettings().
|
privateslot |
Definition at line 315 of file peerlistwidget.cpp.
References BitTorrent::Session::banIP(), PropertiesWidget::getCurrentTorrent(), BitTorrent::Session::instance(), loadPeers(), LogMsg(), m_listModel, m_properties, and m_proxyModel.
Referenced by showPeerListMenu().
void PeerListWidget::clear | ( | ) |
Definition at line 364 of file peerlistwidget.cpp.
References m_itemsByIP, m_listModel, and m_peerItems.
Referenced by PropertiesWidget::clear().
|
privateslot |
Definition at line 344 of file peerlistwidget.cpp.
References m_listModel, and m_proxyModel.
Referenced by PeerListWidget(), and showPeerListMenu().
|
privateslot |
Definition at line 180 of file peerlistwidget.cpp.
References tstool::action, Preferences::instance(), m_listModel, and saveSettings().
Referenced by PeerListWidget().
|
privateslot |
Definition at line 495 of file peerlistwidget.cpp.
References m_itemsByIP.
Referenced by updatePeerHostNameResolutionState().
|
privateslot |
Definition at line 505 of file peerlistwidget.cpp.
References m_proxyModel, and PeerListSortModel::UnderlyingDataRole.
Referenced by PeerListWidget().
void PeerListWidget::loadPeers | ( | const BitTorrent::Torrent * | torrent | ) |
Definition at line 383 of file peerlistwidget.cpp.
References PeerEndpoint::address, asConst(), m_itemsByIP, m_listModel, m_peerItems, BitTorrent::Torrent::peers(), and updatePeer().
Referenced by banSelectedPeers(), PropertiesWidget::loadDynamicData(), updatePeerCountryResolutionState(), and updatePeerHostNameResolutionState().
|
privateslot |
Definition at line 373 of file peerlistwidget.cpp.
References Preferences::instance().
Referenced by PeerListWidget().
|
privateslot |
Definition at line 378 of file peerlistwidget.cpp.
References Preferences::instance(), and Preferences::setPeerListState().
Referenced by displayToggleColumnsMenu(), PeerListWidget(), and ~PeerListWidget().
|
privateslot |
Definition at line 263 of file peerlistwidget.cpp.
References tstool::action, PeersAdditionDialog::askForPeers(), banSelectedPeers(), copySelectedPeers(), PropertiesWidget::getCurrentTorrent(), UIThemeManager::getIcon(), UIThemeManager::instance(), BitTorrent::Torrent::isChecking(), BitTorrent::Torrent::isPrivate(), BitTorrent::Torrent::isQueued(), and m_properties.
Referenced by PeerListWidget().
|
private |
Definition at line 419 of file peerlistwidget.cpp.
References BitTorrent::PeerInfo::address(), BitTorrent::PeerInfo::client(), BitTorrent::PeerInfo::connectionType(), BitTorrent::PeerInfo::country(), Net::GeoIPManager::CountryName(), BitTorrent::PeerInfo::downloadingPieceIndex(), BitTorrent::TorrentInfo::filesForPiece(), BitTorrent::PeerInfo::flags(), BitTorrent::PeerInfo::flagsDescription(), Utils::Misc::friendlyUnit(), Utils::String::fromDouble(), UIThemeManager::getFlagIcon(), Preferences::getHideZeroValues(), BitTorrent::Torrent::hasMetadata(), BitTorrent::Torrent::info(), Preferences::instance(), UIThemeManager::instance(), m_itemsByIP, m_listModel, m_peerItems, m_resolveCountries, m_resolver, BitTorrent::PeerInfo::payloadDownSpeed(), BitTorrent::PeerInfo::payloadUpSpeed(), BitTorrent::PeerAddress::port, BitTorrent::PeerInfo::progress(), PROGRESS, BitTorrent::PeerInfo::relevance(), Net::ReverseResolution::resolve(), BitTorrent::PeerInfo::totalDownload(), BitTorrent::PeerInfo::totalUpload(), and PeerListSortModel::UnderlyingDataRole.
Referenced by loadPeers().
void PeerListWidget::updatePeerCountryResolutionState | ( | ) |
Definition at line 243 of file peerlistwidget.cpp.
References PropertiesWidget::getCurrentTorrent(), Preferences::instance(), loadPeers(), m_properties, m_resolveCountries, and Preferences::resolvePeerCountries().
Referenced by PropertiesWidget::reloadPreferences().
void PeerListWidget::updatePeerHostNameResolutionState | ( | ) |
Definition at line 225 of file peerlistwidget.cpp.
References PropertiesWidget::getCurrentTorrent(), handleResolved(), Preferences::instance(), Net::ReverseResolution::ipResolved(), loadPeers(), m_properties, and m_resolver.
Referenced by PeerListWidget(), and PropertiesWidget::reloadPreferences().
|
overrideprivate |
Definition at line 513 of file peerlistwidget.cpp.
|
private |
Definition at line 108 of file peerlistwidget.h.
Referenced by clear(), handleResolved(), loadPeers(), and updatePeer().
|
private |
Definition at line 103 of file peerlistwidget.h.
Referenced by banSelectedPeers(), clear(), copySelectedPeers(), displayToggleColumnsMenu(), loadPeers(), PeerListWidget(), and updatePeer().
|
private |
Definition at line 107 of file peerlistwidget.h.
Referenced by clear(), loadPeers(), and updatePeer().
|
private |
Definition at line 105 of file peerlistwidget.h.
Referenced by banSelectedPeers(), showPeerListMenu(), updatePeerCountryResolutionState(), and updatePeerHostNameResolutionState().
|
private |
Definition at line 104 of file peerlistwidget.h.
Referenced by banSelectedPeers(), copySelectedPeers(), handleSortColumnChanged(), and PeerListWidget().
|
private |
Definition at line 109 of file peerlistwidget.h.
Referenced by PeerListWidget(), updatePeer(), and updatePeerCountryResolutionState().
|
private |
Definition at line 106 of file peerlistwidget.h.
Referenced by updatePeer(), and updatePeerHostNameResolutionState().