Changeset 44651 in vbox
- Timestamp:
- Feb 12, 2013 12:43:33 PM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 83742
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/widgets
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIHotKeyEditor.cpp
r44650 r44651 302 302 UIHotKey UIHotKeyEditor::hotKey() const 303 303 { 304 return m_pLineEdit->text(); 304 m_hotKey.setSequence(m_pLineEdit->text()); 305 return m_hotKey; 305 306 } 306 307 307 308 void UIHotKeyEditor::setHotKey(const UIHotKey &hotKey) 308 309 { 309 m_pLineEdit->setText(hotKey.toString()); 310 m_hotKey = hotKey; 311 m_pLineEdit->setText(hotKey.sequence()); 310 312 } 311 313 -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIHotKeyEditor.h
r44650 r44651 35 35 36 36 /* Constructors: */ 37 UIHotKey(const QString &strSequence = QString()) : m_strSequence(strSequence) {} 38 UIHotKey(const UIHotKey &other) : m_strSequence(other.toString()) {} 37 UIHotKey() {} 38 UIHotKey(const QString &strSequence) 39 : m_strSequence(strSequence) 40 {} 41 UIHotKey(const UIHotKey &other) 42 : m_strSequence(other.sequence()) 43 {} 39 44 40 /* API: Conversion stuff: */ 41 const QString& toString() const { return m_strSequence; } 45 /* API: Operators stuff: */ 46 UIHotKey& operator=(const UIHotKey &other) 47 { 48 m_strSequence = other.sequence(); 49 return *this; 50 } 51 52 /* API: Access stuff: */ 53 const QString& sequence() const { return m_strSequence; } 54 void setSequence(const QString &strSequence) { m_strSequence = strSequence; } 42 55 43 56 private: … … 83 96 84 97 /* Variables: */ 98 mutable UIHotKey m_hotKey; 85 99 QHBoxLayout *m_pMainLayout; 86 100 UIHotKeyLineEdit *m_pLineEdit;
Note:
See TracChangeset
for help on using the changeset viewer.