Changeset 79516 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Jul 4, 2019 8:40:43 AM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 131799
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/softkeyboard/UISoftKeyboard.cpp
r79513 r79516 116 116 public: 117 117 118 void setName(const QString &strName) 119 { 120 m_strName = strName; 121 } 122 123 const QString &name() const 124 { 125 return m_strName; 126 } 118 void setName(const QString &strName); 119 const QString &name() const; 120 121 void setFileName(const QString &strName); 122 const QString &fileName() const; 123 124 void setUid(const QUuid &uid); 125 const QUuid &uid() const; 126 127 const QVector<UISoftKeyboardRow> &rows() const; 128 QVector<UISoftKeyboardRow> &rows(); 129 130 private: 127 131 128 132 QString m_strFileName; 129 133 QUuid m_uId; 130 131 const QVector<UISoftKeyboardRow> &rows() const132 {133 return m_rows;134 }135 136 QVector<UISoftKeyboardRow> &rows()137 {138 return m_rows;139 }140 141 private:142 143 134 QString m_strName; 144 135 QVector<UISoftKeyboardRow> m_rows; … … 726 717 }; 727 718 719 720 /********************************************************************************************************************************* 721 * UISoftKeyboardPhysicalLayout implementation. * 722 *********************************************************************************************************************************/ 723 724 void UISoftKeyboardPhysicalLayout::setName(const QString &strName) 725 { 726 m_strName = strName; 727 } 728 729 const QString &UISoftKeyboardPhysicalLayout::name() const 730 { 731 return m_strName; 732 } 733 734 void UISoftKeyboardPhysicalLayout::setFileName(const QString &strName) 735 { 736 m_strFileName = strName; 737 } 738 739 const QString &UISoftKeyboardPhysicalLayout::fileName() const 740 { 741 return m_strFileName; 742 } 743 744 void UISoftKeyboardPhysicalLayout::setUid(const QUuid &uid) 745 { 746 m_uId = uid; 747 } 748 749 const QUuid &UISoftKeyboardPhysicalLayout::uid() const 750 { 751 return m_uId; 752 } 753 754 const QVector<UISoftKeyboardRow> &UISoftKeyboardPhysicalLayout::rows() const 755 { 756 return m_rows; 757 } 758 759 QVector<UISoftKeyboardRow> &UISoftKeyboardPhysicalLayout::rows() 760 { 761 return m_rows; 762 } 728 763 729 764 /********************************************************************************************************************************* … … 780 815 m_pLayout->setShiftAltGrCaption(m_pKey->position(), m_pShiftAltGrCaptionEdit->text()); 781 816 } 782 783 817 m_pKey = pKey; 784 818 if (m_pSelectedKeyGroupBox) … … 835 869 m_pPhysicalLayoutCombo->clear(); 836 870 foreach (const UISoftKeyboardPhysicalLayout &physicalLayout, physicalLayouts) 837 m_pPhysicalLayoutCombo->addItem(physicalLayout.name(), physicalLayout. m_uId);871 m_pPhysicalLayoutCombo->addItem(physicalLayout.name(), physicalLayout.uid()); 838 872 } 839 873 … … 2091 2125 xmlWriter.writeTextElement("name", m_pCurrentKeyboardLayout->name()); 2092 2126 xmlWriter.writeTextElement("nativename", m_pCurrentKeyboardLayout->nativeName()); 2093 xmlWriter.writeTextElement("physicallayoutid", pPhysicalLayout-> m_uId.toString());2127 xmlWriter.writeTextElement("physicallayoutid", pPhysicalLayout->uid().toString()); 2094 2128 xmlWriter.writeTextElement("id", m_pCurrentKeyboardLayout->uid().toString()); 2095 2129 … … 2256 2290 return; 2257 2291 2258 if (m_pCurrentKeyboardLayout->physicalLayoutUuid() == m_physicalLayouts[iIndex]. m_uId)2259 return; 2260 m_pCurrentKeyboardLayout->setPhysicalLayoutUuid(m_physicalLayouts[iIndex]. m_uId);2292 if (m_pCurrentKeyboardLayout->physicalLayoutUuid() == m_physicalLayouts[iIndex].uid()) 2293 return; 2294 m_pCurrentKeyboardLayout->setPhysicalLayoutUuid(m_physicalLayouts[iIndex].uid()); 2261 2295 update(); 2262 2296 } … … 2533 2567 for (int i = 0; i < m_physicalLayouts.size(); ++i) 2534 2568 { 2535 if (m_physicalLayouts[i]. m_uId== uuid)2569 if (m_physicalLayouts[i].uid() == uuid) 2536 2570 return &(m_physicalLayouts[i]); 2537 2571 } … … 2705 2739 if (!m_xmlReader.readNextStartElement() || m_xmlReader.name() != "physicallayout") 2706 2740 return false; 2707 physicalLayout. m_strFileName = strFileName;2741 physicalLayout.setFileName(strFileName); 2708 2742 2709 2743 QXmlStreamAttributes attributes = m_xmlReader.attributes(); … … 2724 2758 physicalLayout.setName(m_xmlReader.readElementText()); 2725 2759 else if (m_xmlReader.name() == "id") 2726 physicalLayout. m_uId = m_xmlReader.readElementText();2760 physicalLayout.setUid(m_xmlReader.readElementText()); 2727 2761 else 2728 2762 m_xmlReader.skipCurrentElement();
Note:
See TracChangeset
for help on using the changeset viewer.