Changeset 79398 in vbox
- Timestamp:
- Jun 27, 2019 3:53:30 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 131637
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/softkeyboard/UISoftKeyboard.cpp
r79387 r79398 34 34 #include <QStyle> 35 35 #include <QStackedWidget> 36 #include <QTableWidget> 36 37 #include <QToolButton> 37 38 #include <QXmlStreamReader> … … 491 492 /** Is called when the captions in UISoftKeyboardKey is changed and forward this changes to 492 493 * corresponding UISoftKeyboardLayout */ 493 void updateKeyCaptionsInLayout(UISoftKeyboardKey *pKey);494 //void updateKeyCaptionsInLayout(UISoftKeyboardKey *pKey); 494 495 void saveCurentLayoutToFile(); 495 496 void copyCurentLayout(); … … 688 689 void prepareObjects(); 689 690 690 QCheckBox *m_pShowNumPadCheckBox;691 QCheckBox *m_pShowOsMenuButtonsCheckBox;692 691 QCheckBox *m_pShowNumPadCheckBox; 692 QCheckBox *m_pShowOsMenuButtonsCheckBox; 693 QTableWidget *m_pColorSelectionTable; 693 694 }; 694 695 … … 2059 2060 } 2060 2061 2061 void UISoftKeyboardWidget::updateKeyCaptionsInLayout(UISoftKeyboardKey *pKey)2062 {2063 if (!m_pCurrentKeyboardLayout || !pKey)2064 return;2065 2066 /* Assuming the key captions are changed for the current layout: */2067 KeyCaptions newCaptions;2068 // newCaptions.m_strBase = pKey->baseCaption();2069 // newCaptions.m_strShift = pKey->shiftCaption();2070 // newCaptions.m_strAltGr = pKey->altGrCaption();2071 // newCaptions.m_strShiftAltGr = pKey->shiftAltGrCaption();2072 m_pCurrentKeyboardLayout->updateKeyCaptions(pKey->position(), newCaptions);2073 }2062 // void UISoftKeyboardWidget::updateKeyCaptionsInLayout(UISoftKeyboardKey *pKey) 2063 // { 2064 // if (!m_pCurrentKeyboardLayout || !pKey) 2065 // return; 2066 2067 // /* Assuming the key captions are changed for the current layout: */ 2068 // KeyCaptions newCaptions; 2069 // // newCaptions.m_strBase = pKey->baseCaption(); 2070 // // newCaptions.m_strShift = pKey->shiftCaption(); 2071 // // newCaptions.m_strAltGr = pKey->altGrCaption(); 2072 // // newCaptions.m_strShiftAltGr = pKey->shiftAltGrCaption(); 2073 // m_pCurrentKeyboardLayout->updateKeyCaptions(pKey->position(), newCaptions); 2074 // } 2074 2075 2075 2076 void UISoftKeyboardWidget::addLayout(const UISoftKeyboardLayout &newLayout) … … 2327 2328 m_iInitialWidthNoNumPad = qMax(m_iInitialWidthNoNumPad, iInitialWidthNoNumPad); 2328 2329 m_iInitialHeight = qMax(m_iInitialHeight, iInitialHeight); 2329 //printf("%s total key count: %d\n", qPrintable(strLayoutFileName), iKeyCount - 3 /* substract OS an menu keys */); 2330 2330 2331 return true; 2331 2332 } … … 2887 2888 , m_pShowNumPadCheckBox(0) 2888 2889 , m_pShowOsMenuButtonsCheckBox(0) 2890 , m_pColorSelectionTable(0) 2889 2891 { 2890 2892 prepareObjects(); … … 2920 2922 m_pShowOsMenuButtonsCheckBox = new QCheckBox; 2921 2923 2922 pSettingsLayout->addWidget(m_pShowNumPadCheckBox, 0, 0 );2923 pSettingsLayout->addWidget(m_pShowOsMenuButtonsCheckBox, 1, 0 );2924 pSettingsLayout->addWidget(m_pShowNumPadCheckBox, 0, 0, 1, 1); 2925 pSettingsLayout->addWidget(m_pShowOsMenuButtonsCheckBox, 1, 0, 1, 1); 2924 2926 2925 2927 connect(m_pShowNumPadCheckBox, &QCheckBox::toggled, this, &UISoftKeyboardSettingsWidget::sigShowNumPad); 2926 2928 connect(m_pShowOsMenuButtonsCheckBox, &QCheckBox::toggled, this, &UISoftKeyboardSettingsWidget::sigShowOSMenuKeys); 2927 2929 2930 m_pColorSelectionTable = new QTableWidget; 2931 pSettingsLayout->addWidget(m_pShowOsMenuButtonsCheckBox, 2, 0, 2, 1); 2932 m_pColorSelectionTable->setRowCount(3); 2933 m_pColorSelectionTable->setColumnCount(2); 2934 2935 2928 2936 QSpacerItem *pSpacer = new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Expanding); 2929 2937 if (pSpacer) 2930 pSettingsLayout->addItem(pSpacer, 2, 0);2938 pSettingsLayout->addItem(pSpacer, 4, 0); 2931 2939 2932 2940 setLayout(pSettingsLayout); … … 3060 3068 void UISoftKeyboard::sltKeyCaptionsEdited(UISoftKeyboardKey* pKey) 3061 3069 { 3070 Q_UNUSED(pKey); 3062 3071 if (m_pKeyboardWidget) 3063 {3064 m_pKeyboardWidget->updateKeyCaptionsInLayout(pKey);3065 3072 m_pKeyboardWidget->update(); 3066 }3067 3073 } 3068 3074
Note:
See TracChangeset
for help on using the changeset viewer.