Changeset 64261 in vbox
- Timestamp:
- Oct 13, 2016 4:00:38 PM (8 years ago)
- svn:sync-xref-src-repo-rev:
- 111273
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsInput.cpp
r64259 r64261 53 53 54 54 55 /* Global settings / Input page / Cache / Shortcut cache item:*/55 /** Global settings / Input page / Cache / Shortcut cache item. */ 56 56 struct UIShortcutCacheItem 57 57 { 58 /** Constructs table row on the basis of passed arguments. 59 * @param strKey Brings the unique key inentifying held sequence. 60 * @param strDescription Brings the deescription for the held sequence. 61 * @param strCurrentSequence Brings the current held sequence. 62 * @param strDefaultSequence Brings the default held sequence. */ 58 63 UIShortcutCacheItem(const QString &strKey, 59 64 const QString &strDescription, … … 66 71 {} 67 72 73 /** Constructs table row on the basis of @a other one. */ 68 74 UIShortcutCacheItem(const UIShortcutCacheItem &other) 69 75 : key(other.key) … … 73 79 {} 74 80 75 UIShortcutCacheItem& operator=(const UIShortcutCacheItem &other) 76 { 81 /** Copies a table row from @a other one. */ 82 UIShortcutCacheItem &operator=(const UIShortcutCacheItem &other) 83 { 84 /* Reassign variables: */ 77 85 key = other.key; 78 86 description = other.description; 79 87 currentSequence = other.currentSequence; 80 88 defaultSequence = other.defaultSequence; 89 90 /* Return this: */ 81 91 return *this; 82 92 } 83 93 94 /** Returns whether this row equals to @a other. */ 84 95 bool operator==(const UIShortcutCacheItem &other) const 85 96 { 97 /* Compare by the key only: */ 86 98 return key == other.key; 87 99 } 88 100 101 /** Holds the key. */ 89 102 QString key; 103 /** Holds the description. */ 90 104 QString description; 105 /** Holds the current sequence. */ 91 106 QString currentSequence; 107 /** Holds the default sequence. */ 92 108 QString defaultSequence; 93 109 }; 94 110 95 /* Global settings / Input page / Cache / Shortcut cache: */ 111 112 /** Global settings / Input page / Cache / Shortcut cache. */ 96 113 typedef QList<UIShortcutCacheItem> UIShortcutCache; 97 114 98 /* Global settings / Input page / Cache: */ 115 116 /** Global settings / Input page / Cache. */ 99 117 class UISettingsCacheGlobalInput : public QObject 100 118 { … … 103 121 public: 104 122 123 /** Constructs cache passing @a pParent to the base-class. */ 105 124 UISettingsCacheGlobalInput(QObject *pParent) 106 125 : QObject(pParent) … … 108 127 {} 109 128 129 /** Holds the shortcut cache. */ 110 130 UIShortcutCache m_shortcuts; 131 132 /** Holds whether the keyboard auto-capture is enabled. */ 111 133 bool m_fAutoCapture; 112 134 }; 113 135 114 136 115 /* Global settings / Input page / Cache / Shortcut cache item sort functor:*/137 /** Global settings / Input page / Cache / Shortcut cache item sort functor. */ 116 138 class UIShortcutCacheItemFunctor 117 139 { 118 140 public: 119 141 142 /** Constructs cache sorting functor. 143 * @param iColumn Brings the column sorting should be done according to. 144 * @param m_order Brings the sorting order to be applied. */ 120 145 UIShortcutCacheItemFunctor(int iColumn, Qt::SortOrder order) 121 146 : m_iColumn(iColumn) 122 147 , m_order(order) 123 { 124 } 125 148 {} 149 150 /** Returns whether the @a item1 is more/less than the @a item2. 151 * @note Order depends on the one set through constructor, stored in m_order. */ 126 152 bool operator()(const UIShortcutCacheItem &item1, const UIShortcutCacheItem &item2) 127 153 { … … 139 165 private: 140 166 167 /** Holds the column sorting should be done according to. */ 141 168 int m_iColumn; 169 /** Holds the sorting order to be applied. */ 142 170 Qt::SortOrder m_order; 143 171 };
Note:
See TracChangeset
for help on using the changeset viewer.