Changeset 50697 in vbox
- Timestamp:
- Mar 5, 2014 11:21:06 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumManager.cpp
r50368 r50697 54 54 55 55 56 /* Medium-item:*/56 /** QTreeWidgetItem extension representing Medium Manager item. */ 57 57 class UIMediumItem : public QTreeWidgetItem 58 58 { 59 59 public: 60 60 61 /* Medium-item type:*/61 /** UIMediumItem type for rtti needs. */ 62 62 enum { Type = QTreeWidgetItem::UserType + 1 }; 63 63 64 /* Constructor: Top-level item:*/64 /** Constructor for top-level item. */ 65 65 UIMediumItem(const UIMedium &medium, QTreeWidget *pParent) 66 66 : QTreeWidgetItem(pParent, Type) … … 68 68 { refresh(); } 69 69 70 /* Constructor: Child item:*/70 /** Constructor for child item. */ 71 71 UIMediumItem(const UIMedium &medium, UIMediumItem *pParent) 72 72 : QTreeWidgetItem(pParent, Type) … … 74 74 { refresh(); } 75 75 76 /* API: Refresh stuff:*/76 /** Refreshes item fully. */ 77 77 void refreshAll() 78 78 { … … 81 81 } 82 82 83 /* API: Medium stuff:*/83 /** Returns UIMedium wrapped by <i>this</i> item. */ 84 84 const UIMedium& medium() const { return m_medium; } 85 /** Defines UIMedium wrapped by <i>this</i> item. */ 85 86 void setMedium(const UIMedium &medium) 86 87 { … … 89 90 } 90 91 91 /* API: Medium-type stuff:*/92 /** Returns UIMediumType of the wrapped UIMedium. */ 92 93 UIMediumType mediumType() const { return m_medium.type(); } 93 94 94 /* API: State stuff:*/95 /** Returns KMediumState of the wrapped UIMedium. */ 95 96 KMediumState state() const { return m_medium.state(); } 96 97 97 /* API: ID stuff:*/98 /** Returns QString <i>ID</i> of the wrapped UIMedium. */ 98 99 QString id() const { return m_medium.id(); } 99 100 100 /* API: Location stuff:*/101 /** Returns QString <i>location</i> of the wrapped UIMedium. */ 101 102 QString location() const { return m_medium.location(); } 102 103 103 /* API: Hard-disk stuff:*/104 /** Returns QString <i>hard-disk format</i> of the wrapped UIMedium. */ 104 105 QString hardDiskFormat() const { return m_medium.hardDiskFormat(); } 106 /** Returns QString <i>hard-disk type</i> of the wrapped UIMedium. */ 105 107 QString hardDiskType() const { return m_medium.hardDiskType(); } 106 108 107 /* API: Details stuff:*/109 /** Returns QString <i>storage details</i> of the wrapped UIMedium. */ 108 110 QString details() const { return m_medium.storageDetails(); } 109 111 110 /* API: Tool-tip stuff:*/112 /** Returns QString <i>tool-tip</i> of the wrapped UIMedium. */ 111 113 QString toolTip() const { return m_medium.toolTip(); } 112 114 113 /* API: Usage stuff:*/115 /** Returns QString <i>usage</i> of the wrapped UIMedium. */ 114 116 QString usage() const { return m_medium.usage(); } 117 /** Returns whether wrapped UIMedium is used or not. */ 115 118 bool isUsed() const { return m_medium.isUsed(); } 119 /** Returns whether wrapped UIMedium is used in snapshots or not. */ 116 120 bool isUsedInSnapshots() const { return m_medium.isUsedInSnapshots(); } 117 121 118 /* API: Sorting stuff:*/122 /** Operator< reimplementation used for sorting purposes. */ 119 123 bool operator<(const QTreeWidgetItem &other) const 120 124 { … … 127 131 private: 128 132 129 /* Helper: Refresh stuff:*/133 /** Refreshes item information such as icon, text and tool-tip. */ 130 134 void refresh() 131 135 { … … 141 145 } 142 146 143 /* Variables:*/147 /** UIMedium wrapped by <i>this</i> item. */ 144 148 UIMedium m_medium; 145 149 };
Note:
See TracChangeset
for help on using the changeset viewer.