@ -48,7 +48,8 @@
@@ -48,7 +48,8 @@
# include "autoexpandabledialog.h"
# include "torrentfilterenum.h"
LabelFiltersList : : LabelFiltersList ( QWidget * parent ) : QListWidget ( parent ) {
LabelFiltersList : : LabelFiltersList ( QWidget * parent ) : QListWidget ( parent )
{
itemHover = 0 ;
// Accept drop
setAcceptDrops ( true ) ;
@ -59,9 +60,10 @@ LabelFiltersList::LabelFiltersList(QWidget *parent): QListWidget(parent) {
@@ -59,9 +60,10 @@ LabelFiltersList::LabelFiltersList(QWidget *parent): QListWidget(parent) {
# endif
}
void LabelFiltersList : : addItem ( QListWidgetItem * it ) {
void LabelFiltersList : : addItem ( QListWidgetItem * it )
{
Q_ASSERT ( count ( ) > = 2 ) ;
for ( int i = 2 ; i < count ( ) ; + + i ) {
for ( int i = 2 ; i < count ( ) ; + + i ) {
if ( item ( i ) - > text ( ) . localeAwareCompare ( it - > text ( ) ) > = 0 ) {
insertItem ( i , it ) ;
return ;
@ -70,7 +72,8 @@ void LabelFiltersList::addItem(QListWidgetItem *it) {
@@ -70,7 +72,8 @@ void LabelFiltersList::addItem(QListWidgetItem *it) {
QListWidget : : addItem ( it ) ;
}
QString LabelFiltersList : : labelFromRow ( int row ) const {
QString LabelFiltersList : : labelFromRow ( int row ) const
{
Q_ASSERT ( row > 1 ) ;
const QString & label = item ( row ) - > text ( ) ;
QStringList parts = label . split ( " " ) ;
@ -79,15 +82,16 @@ QString LabelFiltersList::labelFromRow(int row) const {
@@ -79,15 +82,16 @@ QString LabelFiltersList::labelFromRow(int row) const {
return parts . join ( " " ) ;
}
int LabelFiltersList : : rowFromLabel ( QString label ) const {
int LabelFiltersList : : rowFromLabel ( QString label ) const
{
Q_ASSERT ( ! label . isEmpty ( ) ) ;
for ( int i = 2 ; i < count ( ) ; + + i ) {
for ( int i = 2 ; i < count ( ) ; + + i )
if ( label = = labelFromRow ( i ) ) return i ;
}
return - 1 ;
}
void LabelFiltersList : : dragMoveEvent ( QDragMoveEvent * event ) {
void LabelFiltersList : : dragMoveEvent ( QDragMoveEvent * event )
{
if ( itemAt ( event - > pos ( ) ) & & row ( itemAt ( event - > pos ( ) ) ) > 0 ) {
if ( itemHover ) {
if ( itemHover ! = itemAt ( event - > pos ( ) ) ) {
@ -95,50 +99,56 @@ void LabelFiltersList::dragMoveEvent(QDragMoveEvent *event) {
@@ -95,50 +99,56 @@ void LabelFiltersList::dragMoveEvent(QDragMoveEvent *event) {
itemHover = itemAt ( event - > pos ( ) ) ;
setItemHover ( true ) ;
}
} else {
}
else {
itemHover = itemAt ( event - > pos ( ) ) ;
setItemHover ( true ) ;
}
event - > acceptProposedAction ( ) ;
} else {
}
else {
if ( itemHover )
setItemHover ( false ) ;
event - > ignore ( ) ;
}
}
void LabelFiltersList : : dropEvent ( QDropEvent * event ) {
void LabelFiltersList : : dropEvent ( QDropEvent * event )
{
qDebug ( " Drop Event in labels list " ) ;
if ( itemAt ( event - > pos ( ) ) ) {
if ( itemAt ( event - > pos ( ) ) )
emit torrentDropped ( row ( itemAt ( event - > pos ( ) ) ) ) ;
}
event - > ignore ( ) ;
setItemHover ( false ) ;
// Select current item again
currentItem ( ) - > setSelected ( true ) ;
}
void LabelFiltersList : : dragLeaveEvent ( QDragLeaveEvent * ) {
void LabelFiltersList : : dragLeaveEvent ( QDragLeaveEvent * )
{
if ( itemHover )
setItemHover ( false ) ;
// Select current item again
currentItem ( ) - > setSelected ( true ) ;
}
void LabelFiltersList : : setItemHover ( bool hover ) {
void LabelFiltersList : : setItemHover ( bool hover )
{
Q_ASSERT ( itemHover ) ;
if ( hover ) {
itemHover - > setData ( Qt : : DecorationRole , IconProvider : : instance ( ) - > getIcon ( " folder-documents.png " ) ) ;
itemHover - > setSelected ( true ) ;
//setCurrentItem(itemHover);
} else {
}
else {
itemHover - > setData ( Qt : : DecorationRole , IconProvider : : instance ( ) - > getIcon ( " inode-directory.png " ) ) ;
//itemHover->setSelected(false);
itemHover = 0 ;
}
}
StatusFiltersWidget : : StatusFiltersWidget ( QWidget * parent ) : QListWidget ( parent ) , m_shown ( false ) {
StatusFiltersWidget : : StatusFiltersWidget ( QWidget * parent ) : QListWidget ( parent ) , m_shown ( false )
{
setUniformItemSizes ( true ) ;
setVerticalScrollBarPolicy ( Qt : : ScrollBarAlwaysOff ) ;
// Height is fixed (sizeHint().height() is used)
@ -149,14 +159,16 @@ StatusFiltersWidget::StatusFiltersWidget(QWidget *parent) : QListWidget(parent),
@@ -149,14 +159,16 @@ StatusFiltersWidget::StatusFiltersWidget(QWidget *parent) : QListWidget(parent),
# endif
}
QSize StatusFiltersWidget : : sizeHint ( ) const {
QSize StatusFiltersWidget : : sizeHint ( ) const
{
QSize size = QListWidget : : sizeHint ( ) ;
// Height should be exactly the height of the content
size . setHeight ( contentsSize ( ) . height ( ) + 2 * frameWidth ( ) + 6 ) ;
size . setHeight ( contentsSize ( ) . height ( ) + 2 * frameWidth ( ) + 6 ) ;
return size ;
}
TransferListFiltersWidget : : TransferListFiltersWidget ( QWidget * parent , TransferListWidget * transferList ) : QFrame ( parent ) , transferList ( transferList ) , nb_labeled ( 0 ) , nb_torrents ( 0 ) {
TransferListFiltersWidget : : TransferListFiltersWidget ( QWidget * parent , TransferListWidget * transferList ) : QFrame ( parent ) , transferList ( transferList ) , nb_labeled ( 0 ) , nb_torrents ( 0 )
{
// Construct lists
vLayout = new QVBoxLayout ( ) ;
vLayout - > setContentsMargins ( 0 , 4 , 0 , 0 ) ;
@ -184,25 +196,25 @@ TransferListFiltersWidget::TransferListFiltersWidget(QWidget *parent, TransferLi
@@ -184,25 +196,25 @@ TransferListFiltersWidget::TransferListFiltersWidget(QWidget *parent, TransferLi
// Add status filters
QListWidgetItem * all = new QListWidgetItem ( statusFilters ) ;
all - > setData ( Qt : : DisplayRole , QVariant ( tr ( " All " ) + " (0) " ) ) ;
all - > setData ( Qt : : DecorationRole , QIcon ( " :/i cons/skin/filterall.png " ) ) ;
all - > setData ( Qt : : DecorationRole , QIcon ( " :/I cons/skin/filterall.png " ) ) ;
QListWidgetItem * downloading = new QListWidgetItem ( statusFilters ) ;
downloading - > setData ( Qt : : DisplayRole , QVariant ( tr ( " Downloading " ) + " (0) " ) ) ;
downloading - > setData ( Qt : : DecorationRole , QIcon ( " :/i cons/skin/downloading.png " ) ) ;
downloading - > setData ( Qt : : DecorationRole , QIcon ( " :/I cons/skin/downloading.png " ) ) ;
QListWidgetItem * completed = new QListWidgetItem ( statusFilters ) ;
completed - > setData ( Qt : : DisplayRole , QVariant ( tr ( " Completed " ) + " (0) " ) ) ;
completed - > setData ( Qt : : DecorationRole , QIcon ( " :/icons/skin/uploading.png " ) ) ;
QListWidgetItem * paused = new QListWidgetItem ( statusFilters ) ;
paused - > setData ( Qt : : DisplayRole , QVariant ( tr ( " Paused " ) + " (0) " ) ) ;
paused - > setData ( Qt : : DecorationRole , QIcon ( " :/icons/skin/paused.png " ) ) ;
completed - > setData ( Qt : : DecorationRole , QIcon ( " :/Icons/skin/uploading.png " ) ) ;
QListWidgetItem * resumed = new QListWidgetItem ( statusFilters ) ;
resumed - > setData ( Qt : : DisplayRole , QVariant ( tr ( " Resumed " ) + " (0) " ) ) ;
resumed - > setData ( Qt : : DecorationRole , QIcon ( " :/icons/skin/resumed.png " ) ) ;
resumed - > setData ( Qt : : DecorationRole , QIcon ( " :/Icons/skin/resumed.png " ) ) ;
QListWidgetItem * paused = new QListWidgetItem ( statusFilters ) ;
paused - > setData ( Qt : : DisplayRole , QVariant ( tr ( " Paused " ) + " (0) " ) ) ;
paused - > setData ( Qt : : DecorationRole , QIcon ( " :/Icons/skin/paused.png " ) ) ;
QListWidgetItem * active = new QListWidgetItem ( statusFilters ) ;
active - > setData ( Qt : : DisplayRole , QVariant ( tr ( " Active " ) + " (0) " ) ) ;
active - > setData ( Qt : : DecorationRole , QIcon ( " :/icons/skin/filteractive.png " ) ) ;
active - > setData ( Qt : : DecorationRole , QIcon ( " :/I cons/skin/filteractive.png " ) ) ;
QListWidgetItem * inactive = new QListWidgetItem ( statusFilters ) ;
inactive - > setData ( Qt : : DisplayRole , QVariant ( tr ( " Inactive " ) + " (0) " ) ) ;
inactive - > setData ( Qt : : DecorationRole , QIcon ( " :/i cons/skin/filterinactive.png " ) ) ;
inactive - > setData ( Qt : : DecorationRole , QIcon ( " :/I cons/skin/filterinactive.png " ) ) ;
// SIGNAL/SLOT
connect ( statusFilters , SIGNAL ( currentRowChanged ( int ) ) , transferList , SLOT ( applyStatusFilter ( int ) ) ) ;
@ -232,24 +244,28 @@ TransferListFiltersWidget::TransferListFiltersWidget(QWidget *parent, TransferLi
@@ -232,24 +244,28 @@ TransferListFiltersWidget::TransferListFiltersWidget(QWidget *parent, TransferLi
connect ( labelFilters , SIGNAL ( customContextMenuRequested ( QPoint ) ) , this , SLOT ( showLabelMenu ( QPoint ) ) ) ;
}
TransferListFiltersWidget : : ~ TransferListFiltersWidget ( ) {
TransferListFiltersWidget : : ~ TransferListFiltersWidget ( )
{
saveSettings ( ) ;
delete statusFilters ;
delete labelFilters ;
delete vLayout ;
}
StatusFiltersWidget * TransferListFiltersWidget : : getStatusFilters ( ) const {
StatusFiltersWidget * TransferListFiltersWidget : : getStatusFilters ( ) const
{
return statusFilters ;
}
void TransferListFiltersWidget : : saveSettings ( ) const {
void TransferListFiltersWidget : : saveSettings ( ) const
{
Preferences * const pref = Preferences : : instance ( ) ;
pref - > setTransSelFilter ( statusFilters - > currentRow ( ) ) ;
pref - > setTorrentLabels ( customLabels . keys ( ) ) ;
}
void TransferListFiltersWidget : : loadSettings ( ) {
void TransferListFiltersWidget : : loadSettings ( )
{
statusFilters - > setCurrentRow ( Preferences : : instance ( ) - > getTransSelFilter ( ) ) ;
const QStringList label_list = Preferences : : instance ( ) - > getTorrentLabels ( ) ;
foreach ( const QString & label , label_list ) {
@ -262,27 +278,29 @@ void TransferListFiltersWidget::loadSettings() {
@@ -262,27 +278,29 @@ void TransferListFiltersWidget::loadSettings() {
}
}
void TransferListFiltersWidget : : updateTorrentNumbers ( ) {
void TransferListFiltersWidget : : updateTorrentNumbers ( )
{
const TorrentStatusReport report = transferList - > getSourceModel ( ) - > getTorrentStatusReport ( ) ;
statusFilters - > item ( TorrentFilter : : ALL ) - > setData ( Qt : : DisplayRole , QVariant ( tr ( " All " ) + " ( " + QString : : number ( report . nb_active + report . nb_inactive ) + " ) " ) ) ;
statusFilters - > item ( TorrentFilter : : DOWNLOADING ) - > setData ( Qt : : DisplayRole , QVariant ( tr ( " Downloading " ) + " ( " + QString : : number ( report . nb_downloading ) + " ) " ) ) ;
statusFilters - > item ( TorrentFilter : : COMPLETED ) - > setData ( Qt : : DisplayRole , QVariant ( tr ( " Completed " ) + " ( " + QString : : number ( report . nb_seeding ) + " ) " ) ) ;
statusFilters - > item ( TorrentFilter : : PAUSED ) - > setData ( Qt : : DisplayRole , QVariant ( tr ( " Paused " ) + " ( " + QString : : number ( report . nb_paused ) + " ) " ) ) ;
statusFilters - > item ( TorrentFilter : : RESUMED ) - > setData ( Qt : : DisplayRole , QVariant ( tr ( " Resumed " ) + " ( " + QString : : number ( report . nb_active + report . nb_inactive - report . nb_paused ) + " ) " ) ) ;
statusFilters - > item ( TorrentFilter : : ACTIVE ) - > setData ( Qt : : DisplayRole , QVariant ( tr ( " Active " ) + " ( " + QString : : number ( report . nb_active ) + " ) " ) ) ;
statusFilters - > item ( TorrentFilter : : INACTIVE ) - > setData ( Qt : : DisplayRole , QVariant ( tr ( " Inactive " ) + " ( " + QString : : number ( report . nb_inactive ) + " ) " ) ) ;
statusFilters - > item ( TorrentFilter : : ALL ) - > setData ( Qt : : DisplayRole , QVariant ( tr ( " All " ) + " ( " + QString : : number ( report . nb_active + report . nb_inactive ) + " ) " ) ) ;
statusFilters - > item ( TorrentFilter : : DOWNLOADING ) - > setData ( Qt : : DisplayRole , QVariant ( tr ( " Downloading " ) + " ( " + QString : : number ( report . nb_downloading ) + " ) " ) ) ;
statusFilters - > item ( TorrentFilter : : COMPLETED ) - > setData ( Qt : : DisplayRole , QVariant ( tr ( " Completed " ) + " ( " + QString : : number ( report . nb_seeding ) + " ) " ) ) ;
statusFilters - > item ( TorrentFilter : : PAUSED ) - > setData ( Qt : : DisplayRole , QVariant ( tr ( " Paused " ) + " ( " + QString : : number ( report . nb_paused ) + " ) " ) ) ;
statusFilters - > item ( TorrentFilter : : RESUMED ) - > setData ( Qt : : DisplayRole , QVariant ( tr ( " Resumed " ) + " ( " + QString : : number ( report . nb_active + report . nb_inactive - report . nb_paused ) + " ) " ) ) ;
statusFilters - > item ( TorrentFilter : : ACTIVE ) - > setData ( Qt : : DisplayRole , QVariant ( tr ( " Active " ) + " ( " + QString : : number ( report . nb_active ) + " ) " ) ) ;
statusFilters - > item ( TorrentFilter : : INACTIVE ) - > setData ( Qt : : DisplayRole , QVariant ( tr ( " Inactive " ) + " ( " + QString : : number ( report . nb_inactive ) + " ) " ) ) ;
}
void TransferListFiltersWidget : : torrentDropped ( int row ) {
void TransferListFiltersWidget : : torrentDropped ( int row )
{
Q_ASSERT ( row > 0 ) ;
if ( row = = 1 ) {
if ( row = = 1 )
transferList - > setSelectionLabel ( " " ) ;
} else {
else
transferList - > setSelectionLabel ( labelFilters - > labelFromRow ( row ) ) ;
}
}
void TransferListFiltersWidget : : addLabel ( QString & label ) {
void TransferListFiltersWidget : : addLabel ( QString & label )
{
label = fsutils : : toValidFileSystemName ( label . trimmed ( ) ) ;
if ( label . isEmpty ( ) | | customLabels . contains ( label ) ) return ;
QListWidgetItem * newLabel = new QListWidgetItem ( ) ;
@ -293,7 +311,8 @@ void TransferListFiltersWidget::addLabel(QString& label) {
@@ -293,7 +311,8 @@ void TransferListFiltersWidget::addLabel(QString& label) {
Preferences : : instance ( ) - > addTorrentLabel ( label ) ;
}
void TransferListFiltersWidget : : showLabelMenu ( QPoint ) {
void TransferListFiltersWidget : : showLabelMenu ( QPoint )
{
QMenu labelMenu ( labelFilters ) ;
QAction * addAct = labelMenu . addAction ( IconProvider : : instance ( ) - > getIcon ( " list-add " ) , tr ( " Add label... " ) ) ;
QAction * removeAct = 0 ;
@ -339,18 +358,20 @@ void TransferListFiltersWidget::showLabelMenu(QPoint) {
@@ -339,18 +358,20 @@ void TransferListFiltersWidget::showLabelMenu(QPoint) {
if ( ok & & ! label . isEmpty ( ) ) {
if ( fsutils : : isValidFileSystemName ( label ) ) {
addLabel ( label ) ;
} else {
}
else {
QMessageBox : : warning ( this , tr ( " Invalid label name " ) , tr ( " Please don't use any special characters in the label name. " ) ) ;
invalid = true ;
}
}
} while ( invalid ) ;
} while ( invalid ) ;
return ;
}
}
}
void TransferListFiltersWidget : : removeSelectedLabel ( ) {
void TransferListFiltersWidget : : removeSelectedLabel ( )
{
const int row = labelFilters - > row ( labelFilters - > selectedItems ( ) . first ( ) ) ;
Q_ASSERT ( row > 1 ) ;
const QString & label = labelFilters - > labelFromRow ( row ) ;
@ -367,13 +388,13 @@ void TransferListFiltersWidget::removeSelectedLabel() {
@@ -367,13 +388,13 @@ void TransferListFiltersWidget::removeSelectedLabel() {
Preferences : : instance ( ) - > removeTorrentLabel ( label ) ;
}
void TransferListFiltersWidget : : removeUnusedLabels ( ) {
void TransferListFiltersWidget : : removeUnusedLabels ( )
{
QStringList unusedLabels ;
QHash < QString , int > : : const_iterator i ;
for ( i = customLabels . begin ( ) ; i ! = customLabels . end ( ) ; + + i ) {
for ( i = customLabels . begin ( ) ; i ! = customLabels . end ( ) ; + + i )
if ( i . value ( ) = = 0 )
unusedLabels < < i . key ( ) ;
}
foreach ( const QString & label , unusedLabels ) {
customLabels . remove ( label ) ;
delete labelFilters - > takeItem ( labelFilters - > rowFromLabel ( label ) ) ;
@ -381,8 +402,9 @@ void TransferListFiltersWidget::removeUnusedLabels() {
@@ -381,8 +402,9 @@ void TransferListFiltersWidget::removeUnusedLabels() {
}
}
void TransferListFiltersWidget : : applyLabelFilter ( int row ) {
switch ( row ) {
void TransferListFiltersWidget : : applyLabelFilter ( int row )
{
switch ( row ) {
case 0 :
transferList - > applyLabelFilterAll ( ) ;
break ;
@ -394,7 +416,8 @@ void TransferListFiltersWidget::applyLabelFilter(int row) {
@@ -394,7 +416,8 @@ void TransferListFiltersWidget::applyLabelFilter(int row) {
}
}
void TransferListFiltersWidget : : torrentChangedLabel ( TorrentModelItem * torrentItem , QString old_label , QString new_label ) {
void TransferListFiltersWidget : : torrentChangedLabel ( TorrentModelItem * torrentItem , QString old_label , QString new_label )
{
Q_UNUSED ( torrentItem ) ;
qDebug ( " Torrent label changed from %s to %s " , qPrintable ( old_label ) , qPrintable ( new_label ) ) ;
if ( ! old_label . isEmpty ( ) ) {
@ -404,7 +427,7 @@ void TransferListFiltersWidget::torrentChangedLabel(TorrentModelItem *torrentIte
@@ -404,7 +427,7 @@ void TransferListFiltersWidget::torrentChangedLabel(TorrentModelItem *torrentIte
customLabels . insert ( old_label , new_count ) ;
const int row = labelFilters - > rowFromLabel ( old_label ) ;
Q_ASSERT ( row > = 2 ) ;
labelFilters - > item ( row ) - > setText ( old_label + " ( " + QString : : number ( new_count ) + " ) " ) ;
labelFilters - > item ( row ) - > setText ( old_label + " ( " + QString : : number ( new_count ) + " ) " ) ;
}
- - nb_labeled ;
}
@ -416,13 +439,14 @@ void TransferListFiltersWidget::torrentChangedLabel(TorrentModelItem *torrentIte
@@ -416,13 +439,14 @@ void TransferListFiltersWidget::torrentChangedLabel(TorrentModelItem *torrentIte
customLabels . insert ( new_label , new_count ) ;
const int row = labelFilters - > rowFromLabel ( new_label ) ;
Q_ASSERT ( row > = 2 ) ;
labelFilters - > item ( row ) - > setText ( new_label + " ( " + QString : : number ( new_count ) + " ) " ) ;
labelFilters - > item ( row ) - > setText ( new_label + " ( " + QString : : number ( new_count ) + " ) " ) ;
+ + nb_labeled ;
}
updateStickyLabelCounters ( ) ;
}
void TransferListFiltersWidget : : handleNewTorrent ( TorrentModelItem * torrentItem ) {
void TransferListFiltersWidget : : handleNewTorrent ( TorrentModelItem * torrentItem )
{
QString label = torrentItem - > data ( TorrentModelItem : : TR_LABEL ) . toString ( ) ;
qDebug ( " New torrent was added with label: %s " , qPrintable ( label ) ) ;
if ( ! label . isEmpty ( ) ) {
@ -439,7 +463,7 @@ void TransferListFiltersWidget::handleNewTorrent(TorrentModelItem* torrentItem)
@@ -439,7 +463,7 @@ void TransferListFiltersWidget::handleNewTorrent(TorrentModelItem* torrentItem)
qDebug ( " torrentAdded, Row: %d " , row ) ;
Q_ASSERT ( row > = 2 ) ;
Q_ASSERT ( labelFilters - > item ( row ) ) ;
labelFilters - > item ( row ) - > setText ( label + " ( " + QString : : number ( new_count ) + " ) " ) ;
labelFilters - > item ( row ) - > setText ( label + " ( " + QString : : number ( new_count ) + " ) " ) ;
+ + nb_labeled ;
}
+ + nb_torrents ;
@ -449,7 +473,8 @@ void TransferListFiltersWidget::handleNewTorrent(TorrentModelItem* torrentItem)
@@ -449,7 +473,8 @@ void TransferListFiltersWidget::handleNewTorrent(TorrentModelItem* torrentItem)
updateStickyLabelCounters ( ) ;
}
void TransferListFiltersWidget : : torrentAboutToBeDeleted ( TorrentModelItem * torrentItem ) {
void TransferListFiltersWidget : : torrentAboutToBeDeleted ( TorrentModelItem * torrentItem )
{
Q_ASSERT ( torrentItem ) ;
QString label = torrentItem - > data ( TorrentModelItem : : TR_LABEL ) . toString ( ) ;
if ( ! label . isEmpty ( ) ) {
@ -458,7 +483,7 @@ void TransferListFiltersWidget::torrentAboutToBeDeleted(TorrentModelItem* torren
@@ -458,7 +483,7 @@ void TransferListFiltersWidget::torrentAboutToBeDeleted(TorrentModelItem* torren
customLabels . insert ( label , new_count ) ;
const int row = labelFilters - > rowFromLabel ( label ) ;
Q_ASSERT ( row > = 2 ) ;
labelFilters - > item ( row ) - > setText ( label + " ( " + QString : : number ( new_count ) + " ) " ) ;
labelFilters - > item ( row ) - > setText ( label + " ( " + QString : : number ( new_count ) + " ) " ) ;
- - nb_labeled ;
}
- - nb_torrents ;
@ -469,7 +494,8 @@ void TransferListFiltersWidget::torrentAboutToBeDeleted(TorrentModelItem* torren
@@ -469,7 +494,8 @@ void TransferListFiltersWidget::torrentAboutToBeDeleted(TorrentModelItem* torren
updateStickyLabelCounters ( ) ;
}
void TransferListFiltersWidget : : updateStickyLabelCounters ( ) {
labelFilters - > item ( 0 ) - > setText ( tr ( " All labels " ) + " ( " + QString : : number ( nb_torrents ) + " ) " ) ;
labelFilters - > item ( 1 ) - > setText ( tr ( " Unlabeled " ) + " ( " + QString : : number ( nb_torrents - nb_labeled ) + " ) " ) ;
void TransferListFiltersWidget : : updateStickyLabelCounters ( )
{
labelFilters - > item ( 0 ) - > setText ( tr ( " All labels " ) + " ( " + QString : : number ( nb_torrents ) + " ) " ) ;
labelFilters - > item ( 1 ) - > setText ( tr ( " Unlabeled " ) + " ( " + QString : : number ( nb_torrents - nb_labeled ) + " ) " ) ;
}