VirtualBox

Changeset 81405 in vbox


Ignore:
Timestamp:
Oct 21, 2019 12:29:48 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
134119
Message:

FE/Qt: bugref:6699. Some cleanup.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/softkeyboard/UISoftKeyboard.cpp

    r81399 r81405  
    144144};
    145145
    146 struct UsageCode
    147 {
    148     LONG usageId;
    149     LONG usagePage;
    150     bool fRelease;
    151 };
    152 
    153146
    154147/*********************************************************************************************************************************
     
    196189
    197190    void setLockKey(int iKeyPosition, UISoftKeyboardKey *pKey);
    198     UISoftKeyboardKey *lockKey(int iKeyPosition) const;
    199191    void updateLockKeyStates(bool fCapsLockState, bool fNumLockState, bool fScrollLockState);
    200192    void reset();
     
    402394
    403395    void addScanCodePrefix(LONG scanCode);
    404     const QVector<LONG> &scanCodePrefix() const;
    405396
    406397    void setUsageId(LONG usageId);
     
    512503    bool isFromResources() const;
    513504
    514     void updateUIKeyCaptions(int iKeyPosition, UIKeyCaptions &newCaptions);
    515 
    516505    void setEditable(bool fEditable);
    517506    bool editable() const;
     
    520509    const QUuid &physicalLayoutUuid() const;
    521510
    522     void setKeyCapMap(const QMap<int, UIKeyCaptions> &keyCaptionsMap);
    523511    void addOrUpdateUIKeyCaptions(int iKeyPosition, const UIKeyCaptions &keyCaptions);
    524     UIKeyCaptions keyCaptions(int iKeyPosition);
     512    UIKeyCaptions keyCaptions(int iKeyPosition) const;
    525513
    526514    bool operator==(const UISoftKeyboardLayout &otherLayout);
     
    670658    virtual void mouseMoveEvent(QMouseEvent *pEvent) /* override */;
    671659    virtual void retranslateUi() /* override */;
    672 
    673 private slots:
    674 
    675     void sltPhysicalLayoutForLayoutChanged(int iIndex);
    676660
    677661private:
     
    923907{
    924908    m_lockKeys[iKeyPosition] = pKey;
    925 }
    926 
    927 UISoftKeyboardKey *UISoftKeyboardPhysicalLayout::lockKey(int iKeyPosition) const
    928 {
    929     return m_lockKeys.value(iKeyPosition, 0);
    930909}
    931910
     
    11801159    connect(m_pLayoutNativeNameEdit, &QLineEdit::textChanged, this, &UIKeyboardLayoutEditor::sltLayoutNativeNameChanged);
    11811160
    1182 
    11831161    m_pLayoutNameLabel = new QLabel;
    11841162    m_pLayoutNameEdit = new QLineEdit;
     
    15931571{
    15941572    m_scanCodePrefix << scanCodePrefix;
    1595 }
    1596 
    1597 const QVector<LONG> &UISoftKeyboardKey::scanCodePrefix() const
    1598 {
    1599     return m_scanCodePrefix;
    16001573}
    16011574
     
    17961769}
    17971770
    1798 void UISoftKeyboardLayout::updateUIKeyCaptions(int iKeyPosition, UIKeyCaptions &newCaptions)
    1799 {
    1800     if (!m_keyCaptionsMap.contains(iKeyPosition))
    1801         return;
    1802     m_keyCaptionsMap[iKeyPosition] = newCaptions;
    1803 }
    1804 
    18051771QString UISoftKeyboardLayout::nameString() const
    18061772{
     
    18751841}
    18761842
    1877 void UISoftKeyboardLayout::setKeyCapMap(const QMap<int, UIKeyCaptions> &keyCaptionsMap)
    1878 {
    1879     m_keyCaptionsMap = keyCaptionsMap;
    1880 }
    1881 
    18821843void UISoftKeyboardLayout::addOrUpdateUIKeyCaptions(int iKeyPosition, const UIKeyCaptions &keyCaptions)
    18831844{
     
    18891850}
    18901851
    1891 UIKeyCaptions UISoftKeyboardLayout::keyCaptions(int iKeyPosition)
     1852UIKeyCaptions UISoftKeyboardLayout::keyCaptions(int iKeyPosition) const
    18921853{
    18931854    return m_keyCaptionsMap[iKeyPosition];
     
    26442605}
    26452606
    2646 void UISoftKeyboardWidget::sltPhysicalLayoutForLayoutChanged(int iIndex)
    2647 {
    2648     if (!m_pCurrentKeyboardLayout)
    2649         return;
    2650     if (iIndex < 0 || iIndex >= m_physicalLayouts.size())
    2651         return;
    2652 
    2653     if (m_pCurrentKeyboardLayout->physicalLayoutUuid() == m_physicalLayouts[iIndex].uid())
    2654         return;
    2655     m_pCurrentKeyboardLayout->setPhysicalLayoutUuid(m_physicalLayouts[iIndex].uid());
    2656     update();
    2657 }
    2658 
    26592607void UISoftKeyboardWidget::setNewMinimumSize(const QSize &size)
    26602608{
     
    32153163    int iDefaultHeight = attributes.value("defaultHeight").toInt();
    32163164    QVector<UISoftKeyboardRow> &rows = physicalLayout.rows();
    3217     int iRowCount = 0;
     3165
    32183166    while (m_xmlReader.readNextStartElement())
    32193167    {
    32203168        if (m_xmlReader.name() == "row")
    3221         {
    32223169            parseRow(iDefaultWidth, iDefaultHeight, rows);
    3223             ++iRowCount;
    3224         }
    32253170        else if (m_xmlReader.name() == "name")
    32263171            physicalLayout.setName(m_xmlReader.readElementText());
     
    38213766            m_pKeyboardWidget->parentDialogDeactivated();
    38223767    }
    3823     else if (pEvent->type() == QEvent::WindowDeactivate)
    3824     {
    3825         if (m_pKeyboardWidget)
    3826             m_pKeyboardWidget->parentDialogDeactivated();
    3827     }
    3828 
    38293768    return QMainWindowWithRestorableGeometryAndRetranslateUi::event(pEvent);
    38303769}
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette