plus petit clavier
This commit is contained in:
parent
f388e5e488
commit
cd6c661b28
@ -135,7 +135,7 @@ void VirtualKeyboard::setupNumericKeys()
|
||||
for (const QString& key : m_numericLayout) {
|
||||
QPushButton* button = new QPushButton(key);
|
||||
button->setObjectName("numericKey");
|
||||
button->setFixedSize(100, 100);
|
||||
button->setFixedSize(60, 60);
|
||||
connect(button, &QPushButton::clicked, this, &VirtualKeyboard::onKeyPressed);
|
||||
m_numericKeys.append(button);
|
||||
numericLayout->addWidget(button);
|
||||
@ -146,7 +146,7 @@ void VirtualKeyboard::setupNumericKeys()
|
||||
for (const QString& key : specialChars) {
|
||||
QPushButton* button = new QPushButton(key);
|
||||
button->setObjectName("specialKey");
|
||||
button->setFixedSize(100, 100);
|
||||
button->setFixedSize(60, 60);
|
||||
connect(button, &QPushButton::clicked, this, &VirtualKeyboard::onKeyPressed);
|
||||
numericLayout->addWidget(button);
|
||||
}
|
||||
@ -165,7 +165,7 @@ void VirtualKeyboard::setupAlphabeticKeys()
|
||||
for (int i = 0; i < 10; ++i) {
|
||||
QPushButton* button = new QPushButton(m_qwertyLayout[i]);
|
||||
button->setObjectName("alphabeticKey");
|
||||
button->setFixedSize(100, 100);
|
||||
button->setFixedSize(60, 60);
|
||||
connect(button, &QPushButton::clicked, this, &VirtualKeyboard::onKeyPressed);
|
||||
m_alphabeticKeys.append(button);
|
||||
firstRow->addWidget(button);
|
||||
@ -182,7 +182,7 @@ void VirtualKeyboard::setupAlphabeticKeys()
|
||||
for (int i = 10; i < 19; ++i) {
|
||||
QPushButton* button = new QPushButton(m_qwertyLayout[i]);
|
||||
button->setObjectName("alphabeticKey");
|
||||
button->setFixedSize(100, 100);
|
||||
button->setFixedSize(60, 60);
|
||||
connect(button, &QPushButton::clicked, this, &VirtualKeyboard::onKeyPressed);
|
||||
m_alphabeticKeys.append(button);
|
||||
secondRow->addWidget(button);
|
||||
@ -199,7 +199,7 @@ void VirtualKeyboard::setupAlphabeticKeys()
|
||||
// Shift button
|
||||
m_shiftButton = new QPushButton("⇧");
|
||||
m_shiftButton->setObjectName("functionKey");
|
||||
m_shiftButton->setFixedSize(120, 100);
|
||||
m_shiftButton->setFixedSize(80, 60);
|
||||
m_shiftButton->setCheckable(true);
|
||||
connect(m_shiftButton, &QPushButton::clicked, this, &VirtualKeyboard::onShiftPressed);
|
||||
thirdRow->addWidget(m_shiftButton);
|
||||
@ -207,7 +207,7 @@ void VirtualKeyboard::setupAlphabeticKeys()
|
||||
for (int i = 19; i < 26; ++i) {
|
||||
QPushButton* button = new QPushButton(m_qwertyLayout[i]);
|
||||
button->setObjectName("alphabeticKey");
|
||||
button->setFixedSize(100, 100);
|
||||
button->setFixedSize(60, 60);
|
||||
connect(button, &QPushButton::clicked, this, &VirtualKeyboard::onKeyPressed);
|
||||
m_alphabeticKeys.append(button);
|
||||
thirdRow->addWidget(button);
|
||||
@ -216,7 +216,7 @@ void VirtualKeyboard::setupAlphabeticKeys()
|
||||
// Backspace button
|
||||
m_backspaceButton = new QPushButton("⌫");
|
||||
m_backspaceButton->setObjectName("functionKey");
|
||||
m_backspaceButton->setFixedSize(120, 100);
|
||||
m_backspaceButton->setFixedSize(80, 60);
|
||||
connect(m_backspaceButton, &QPushButton::clicked, this, &VirtualKeyboard::onBackspacePressed);
|
||||
thirdRow->addWidget(m_backspaceButton);
|
||||
|
||||
@ -233,7 +233,7 @@ void VirtualKeyboard::setupFunctionKeys()
|
||||
// Caps Lock
|
||||
m_capsLockButton = new QPushButton("Caps");
|
||||
m_capsLockButton->setObjectName("functionKey");
|
||||
m_capsLockButton->setFixedSize(150, 100);
|
||||
m_capsLockButton->setFixedSize(80, 60);
|
||||
m_capsLockButton->setCheckable(true);
|
||||
connect(m_capsLockButton, &QPushButton::clicked, this, &VirtualKeyboard::onCapsLockPressed);
|
||||
m_functionLayout->addWidget(m_capsLockButton);
|
||||
@ -241,14 +241,14 @@ void VirtualKeyboard::setupFunctionKeys()
|
||||
// Space bar
|
||||
m_spaceButton = new QPushButton("Espace");
|
||||
m_spaceButton->setObjectName("spaceKey");
|
||||
m_spaceButton->setFixedSize(500, 100);
|
||||
m_spaceButton->setFixedSize(240, 60);
|
||||
connect(m_spaceButton, &QPushButton::clicked, this, &VirtualKeyboard::onSpacePressed);
|
||||
m_functionLayout->addWidget(m_spaceButton);
|
||||
|
||||
// Enter
|
||||
m_enterButton = new QPushButton("↵");
|
||||
m_enterButton->setObjectName("functionKey");
|
||||
m_enterButton->setFixedSize(150, 100);
|
||||
m_enterButton->setFixedSize(80, 60);
|
||||
connect(m_enterButton, &QPushButton::clicked, this, &VirtualKeyboard::onEnterPressed);
|
||||
m_functionLayout->addWidget(m_enterButton);
|
||||
|
||||
@ -257,7 +257,7 @@ void VirtualKeyboard::setupFunctionKeys()
|
||||
for (const QString& key : punctuation) {
|
||||
QPushButton* button = new QPushButton(key);
|
||||
button->setObjectName("punctuationKey");
|
||||
button->setFixedSize(100, 100);
|
||||
button->setFixedSize(60, 60);
|
||||
connect(button, &QPushButton::clicked, this, &VirtualKeyboard::onKeyPressed);
|
||||
m_functionLayout->addWidget(button);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user