Lines 1228-1238
void KeySelectorControl::finish()
Link Here
|
1228 |
treeItem->setData( ACTION_COL, Qt::UserRole, |
1228 |
treeItem->setData( ACTION_COL, Qt::UserRole, |
1229 |
QVariant( qfu( p_config_item->psz_name ) ) ); |
1229 |
QVariant( qfu( p_config_item->psz_name ) ) ); |
1230 |
|
1230 |
|
1231 |
QString keys = qfu( p_config_item->value.psz ); |
1231 |
QString keys = qfu(p_config_item->value.psz ? _(p_config_item->value.psz) : ""); |
1232 |
treeItem->setText( HOTKEY_COL, keys ); |
1232 |
treeItem->setText( HOTKEY_COL, keys ); |
1233 |
treeItem->setToolTip( HOTKEY_COL, qtr("Double click to change.\nDelete key to remove.") ); |
1233 |
treeItem->setToolTip( HOTKEY_COL, qtr("Double click to change.\nDelete key to remove.") ); |
1234 |
treeItem->setToolTip( GLOBAL_HOTKEY_COL, qtr("Double click to change.\nDelete key to remove.") ); |
1234 |
treeItem->setToolTip( GLOBAL_HOTKEY_COL, qtr("Double click to change.\nDelete key to remove.") ); |
1235 |
treeItem->setData( HOTKEY_COL, Qt::UserRole, QVariant( keys ) ); |
1235 |
treeItem->setData( HOTKEY_COL, Qt::UserRole, QVariant( p_config_item->value.psz ) ); |
1236 |
table->addTopLevelItem( treeItem ); |
1236 |
table->addTopLevelItem( treeItem ); |
1237 |
continue; |
1237 |
continue; |
1238 |
} |
1238 |
} |
Lines 1313-1319
void KeySelectorControl::selectKey( QTreeWidgetItem *keyItem, int column )
Link Here
|
1313 |
|
1313 |
|
1314 |
if( d->result() == QDialog::Accepted ) |
1314 |
if( d->result() == QDialog::Accepted ) |
1315 |
{ |
1315 |
{ |
1316 |
QString newKey = VLCKeyToString( d->keyValue ); |
1316 |
QString newKey = VLCKeyToString( d->keyValue, false ); |
1317 |
|
1317 |
|
1318 |
/* In case of conflict, reset other keys*/ |
1318 |
/* In case of conflict, reset other keys*/ |
1319 |
if( d->conflicts ) |
1319 |
if( d->conflicts ) |
Lines 1331-1337
void KeySelectorControl::selectKey( QTreeWidgetItem *keyItem, int column )
Link Here
|
1331 |
} |
1331 |
} |
1332 |
} |
1332 |
} |
1333 |
|
1333 |
|
1334 |
keyItem->setText( column, newKey ); |
1334 |
keyItem->setText( column, VLCKeyToString( d->keyValue, true ) ); |
1335 |
keyItem->setData( column, Qt::UserRole, newKey ); |
1335 |
keyItem->setData( column, Qt::UserRole, newKey ); |
1336 |
} |
1336 |
} |
1337 |
else if( d->result() == 2 ) |
1337 |
else if( d->result() == 2 ) |
Lines 1448-1454
void KeyInputDialog::setExistingkeysSet( const QSet<QString> *keyset )
Link Here
|
1448 |
void KeyInputDialog::checkForConflicts( int i_vlckey, const QString &sequence ) |
1448 |
void KeyInputDialog::checkForConflicts( int i_vlckey, const QString &sequence ) |
1449 |
{ |
1449 |
{ |
1450 |
QList<QTreeWidgetItem *> conflictList = |
1450 |
QList<QTreeWidgetItem *> conflictList = |
1451 |
table->findItems( VLCKeyToString( i_vlckey ), Qt::MatchExactly, |
1451 |
table->findItems( VLCKeyToString( i_vlckey, true ), Qt::MatchExactly, |
1452 |
b_global ? 2 : 1 ); |
1452 |
b_global ? 2 : 1 ); |
1453 |
|
1453 |
|
1454 |
if( conflictList.count() && |
1454 |
if( conflictList.count() && |
Lines 1491-1497
void KeyInputDialog::keyPressEvent( QKeyEvent *e )
Link Here
|
1491 |
int i_vlck = qtEventToVLCKey( e ); |
1491 |
int i_vlck = qtEventToVLCKey( e ); |
1492 |
QKeySequence sequence( e->key() | e->modifiers() ); |
1492 |
QKeySequence sequence( e->key() | e->modifiers() ); |
1493 |
selected->setText( qtr( "Key or combination: " ) |
1493 |
selected->setText( qtr( "Key or combination: " ) |
1494 |
+ QString("<b>%1</b>").arg( VLCKeyToString( i_vlck ) ) ); |
1494 |
+ QString("<b>%1</b>").arg( VLCKeyToString( i_vlck, true ) ) ); |
1495 |
checkForConflicts( i_vlck, sequence.toString() ); |
1495 |
checkForConflicts( i_vlck, sequence.toString() ); |
1496 |
keyValue = i_vlck; |
1496 |
keyValue = i_vlck; |
1497 |
} |
1497 |
} |
Lines 1499-1505
void KeyInputDialog::keyPressEvent( QKeyEvent *e )
Link Here
|
1499 |
void KeyInputDialog::wheelEvent( QWheelEvent *e ) |
1499 |
void KeyInputDialog::wheelEvent( QWheelEvent *e ) |
1500 |
{ |
1500 |
{ |
1501 |
int i_vlck = qtWheelEventToVLCKey( e ); |
1501 |
int i_vlck = qtWheelEventToVLCKey( e ); |
1502 |
selected->setText( qtr( "Key: " ) + VLCKeyToString( i_vlck ) ); |
1502 |
selected->setText( qtr( "Key: " ) + VLCKeyToString( i_vlck, true ) ); |
1503 |
checkForConflicts( i_vlck, QString() ); |
1503 |
checkForConflicts( i_vlck, QString() ); |
1504 |
keyValue = i_vlck; |
1504 |
keyValue = i_vlck; |
1505 |
} |
1505 |
} |