Changeset 44654 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Feb 12, 2013 1:05:12 PM (12 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsInput.cpp
r44528 r44654 69 69 { 70 70 /* Upload to cache: */ 71 m_cache.m_strHostCombo = m_pHostKeyEditor->combo() ;71 m_cache.m_strHostCombo = m_pHostKeyEditor->combo().toString(); 72 72 m_cache.m_fAutoCapture = m_pEnableAutoGrabCheckbox->isChecked(); 73 73 } -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIHostComboEditor.cpp
r44561 r44654 334 334 } 335 335 336 void UIHostComboEditor::setCombo(const QString &strKeyCombo)336 void UIHostComboEditor::setCombo(const UIHostComboWrapper &strCombo) 337 337 { 338 338 /* Cleanup old combo: */ 339 339 m_shownKeys.clear(); 340 340 /* Parse newly passed combo: */ 341 QList<int> keyCodeList = UIHostCombo::toKeyCodeList(str KeyCombo);341 QList<int> keyCodeList = UIHostCombo::toKeyCodeList(strCombo.toString()); 342 342 for (int i = 0; i < keyCodeList.size(); ++i) 343 343 if (int iKeyCode = keyCodeList[i]) … … 347 347 } 348 348 349 QStringUIHostComboEditor::combo() const349 UIHostComboWrapper UIHostComboEditor::combo() const 350 350 { 351 351 /* Compose current combination: */ -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIHostComboEditor.h
r44561 r44654 48 48 } 49 49 50 /* Host-combo wrapper: */ 51 class UIHostComboWrapper 52 { 53 public: 54 55 UIHostComboWrapper(const QString &strHostCombo = QString()) 56 : m_strHostCombo(strHostCombo) 57 {} 58 59 const QString& toString() const { return m_strHostCombo; } 60 61 private: 62 63 QString m_strHostCombo; 64 }; 65 Q_DECLARE_METATYPE(UIHostComboWrapper); 66 50 67 /* Host-combo editor widget: */ 51 68 class UIHostComboEditor : public QLineEdit 52 69 { 53 70 Q_OBJECT; 71 Q_PROPERTY(UIHostComboWrapper combo READ combo WRITE setCombo USER true); 54 72 55 73 public: … … 58 76 ~UIHostComboEditor(); 59 77 60 void setCombo(const QString &strKeyCombo);61 QStringcombo() const;78 void setCombo(const UIHostComboWrapper &strCombo); 79 UIHostComboWrapper combo() const; 62 80 63 81 public slots:
Note:
See TracChangeset
for help on using the changeset viewer.