qskIsStandardKeyInput added
This commit is contained in:
parent
d7d5c8cff3
commit
36c759dc41
@ -182,14 +182,14 @@ void QskBoundedInput::keyPressEvent( QKeyEvent* event )
|
||||
if ( !isReadOnly() )
|
||||
{
|
||||
if ( event->key() == Qt::Key_Up ||
|
||||
qskKeyMatches( event, QKeySequence::MoveToNextChar ) )
|
||||
qskIsStandardKeyInput( event, QKeySequence::MoveToNextChar ) )
|
||||
{
|
||||
increment( m_stepSize );
|
||||
return;
|
||||
}
|
||||
|
||||
if ( event->key() == Qt::Key_Down ||
|
||||
qskKeyMatches( event, QKeySequence::MoveToPreviousChar ) )
|
||||
qskIsStandardKeyInput( event, QKeySequence::MoveToPreviousChar ) )
|
||||
{
|
||||
increment( -m_stepSize );
|
||||
return;
|
||||
|
@ -114,7 +114,7 @@ qreal qskWheelIncrement( const QWheelEvent* event )
|
||||
|
||||
#endif
|
||||
|
||||
bool qskKeyMatches( const QKeyEvent* event, QKeySequence::StandardKey key )
|
||||
bool qskIsStandardKeyInput( const QKeyEvent* event, QKeySequence::StandardKey key )
|
||||
{
|
||||
#if 1
|
||||
return event->matches( key );
|
||||
|
@ -150,6 +150,6 @@ QSK_EXPORT qreal qskWheelIncrement( const QWheelEvent* );
|
||||
|
||||
#endif
|
||||
|
||||
QSK_EXPORT bool qskKeyMatches( const QKeyEvent*, QKeySequence::StandardKey );
|
||||
QSK_EXPORT bool qskIsStandardKeyInput( const QKeyEvent*, QKeySequence::StandardKey );
|
||||
|
||||
#endif
|
||||
|
@ -15,10 +15,10 @@ QSK_SYSTEM_STATE( QskPageIndicator, Selected, QskAspect::FirstSystemState << 1 )
|
||||
static int qskKeyIncrement(
|
||||
const QskPageIndicator* indicator, const QKeyEvent* event )
|
||||
{
|
||||
if ( qskKeyMatches( event, QKeySequence::MoveToNextChar ) )
|
||||
if ( qskIsStandardKeyInput( event, QKeySequence::MoveToNextChar ) )
|
||||
return 1;
|
||||
|
||||
if ( qskKeyMatches( event, QKeySequence::MoveToPreviousChar ) )
|
||||
if ( qskIsStandardKeyInput( event, QKeySequence::MoveToPreviousChar ) )
|
||||
return -1;
|
||||
|
||||
const auto key = event->key();
|
||||
|
@ -281,7 +281,7 @@ void QskDialogSubWindow::keyPressEvent( QKeyEvent* event )
|
||||
button->click();
|
||||
}
|
||||
|
||||
if ( qskKeyMatches( event, QKeySequence::Cancel ) )
|
||||
if ( qskIsStandardKeyInput( event, QKeySequence::Cancel ) )
|
||||
{
|
||||
// using shortcuts instead ???
|
||||
|
||||
|
@ -249,7 +249,7 @@ void QskDialogWindow::keyPressEvent( QKeyEvent* event )
|
||||
button->click();
|
||||
}
|
||||
|
||||
if ( qskKeyMatches( event, QKeySequence::Cancel ) )
|
||||
if ( qskIsStandardKeyInput( event, QKeySequence::Cancel ) )
|
||||
{
|
||||
// using shortcuts instead ???
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user