Changeset 10080


Ignore:
Timestamp:
Feb 2, 2010, 7:52:57 AM (12 years ago)
Author:
charles
Message:

(trunk qt) "Priority Selection in `Add' Window" -- implemented for Qt client

Location:
trunk/qt
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/qt/options.cc

    r9890 r10080  
    1515
    1616#include <QCheckBox>
     17#include <QComboBox>
    1718#include <QDialogButtonBox>
    1819#include <QEvent>
     
    100101        myTree->hideColumn( 1 ); // hide the % done, since we've no way of knowing
    101102
     103    QComboBox * m = new QComboBox;
     104    m->addItem( tr( "High" ),   TR_PRI_HIGH );
     105    m->addItem( tr( "Normal" ), TR_PRI_NORMAL );
     106    m->addItem( tr( "Low" ),    TR_PRI_LOW );
     107    m->setCurrentIndex( 1 ); // Normal
     108    myPriorityCombo = m;
     109    l = new QLabel( tr( "Torrent &priority:" ) );
     110    l->setBuddy( m );
     111    layout->addWidget( l, ++row, 0, Qt::AlignLeft );
     112    layout->addWidget( m, row, 1 );
     113
    102114    if( session.isLocal( ) )
    103115    {
     
    275287    // paused
    276288    tr_bencDictAddBool( args, "paused", !myStartCheck->isChecked( ) );
     289
     290    // priority
     291    const int index = myPriorityCombo->currentIndex( );
     292    const int priority = myPriorityCombo->itemData(index).toInt( );
     293    tr_bencDictAddInt( args, "bandwidthPriority", priority );
    277294
    278295    // files-unwanted
  • trunk/qt/options.h

    r9868 r10080  
    3131class Prefs;
    3232class QCheckBox;
     33class QComboBox;
    3334class Session;
    3435
     
    8081        QCheckBox * myStartCheck;
    8182        QCheckBox * myTrashCheck;
     83        QComboBox * myPriorityCombo;
    8284        QPushButton * myFileButton;
    8385        QPushButton * myDestinationButton;
Note: See TracChangeset for help on using the changeset viewer.