Merge 76742dd0e5
into 7acd0f9c63
This commit is contained in:
commit
ac6dd5e8ff
|
@ -383,6 +383,9 @@ void QskVirtualKeyboard::ensureButtons()
|
|||
connect( button, &QskPushButton::pressed,
|
||||
this, &QskVirtualKeyboard::buttonPressed );
|
||||
|
||||
connect( button, &QskPushButton::clicked,
|
||||
this, &QskVirtualKeyboard::buttonClicked );
|
||||
|
||||
m_data->keyButtons += button;
|
||||
}
|
||||
}
|
||||
|
@ -398,8 +401,28 @@ void QskVirtualKeyboard::ensureButtons()
|
|||
void QskVirtualKeyboard::buttonPressed()
|
||||
{
|
||||
const auto button = static_cast< const Button* >( sender() );
|
||||
|
||||
if ( button == nullptr )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
const int key = button->key();
|
||||
|
||||
if( qskIsAutorepeat( key ) )
|
||||
{
|
||||
Q_EMIT keySelected( key );
|
||||
}
|
||||
}
|
||||
|
||||
void QskVirtualKeyboard::buttonClicked()
|
||||
{
|
||||
auto button = static_cast< Button* >( sender() );
|
||||
|
||||
if( button == nullptr )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
const int key = button->key();
|
||||
|
||||
|
@ -428,9 +451,10 @@ void QskVirtualKeyboard::buttonPressed()
|
|||
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
{
|
||||
Q_EMIT keySelected( key );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -109,6 +109,8 @@ class QSK_EXPORT QskVirtualKeyboard : public QskBox
|
|||
private:
|
||||
void ensureButtons();
|
||||
void buttonPressed();
|
||||
void buttonClicked();
|
||||
|
||||
void updateKeyCodes();
|
||||
QskPushButton::Emphasis emphasisForType( KeyType );
|
||||
|
||||
|
|
Loading…
Reference in New Issue