Changeset 24294 in vbox for trunk/src/VBox/Frontends/VirtualBox/include
- Timestamp:
- Nov 3, 2009 4:13:57 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 54287
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/include/VBoxMedium.h
r23585 r24294 32 32 33 33 /** 34 * Cache used to override some attributes in the user-friendly "don't show diffs" mode. 35 */ 36 struct NoDiffsCache 37 { 38 NoDiffsCache() : isSet (false), state (KMediumState_NotCreated) {} 39 NoDiffsCache& operator= (const NoDiffsCache &aOther) 40 { 41 isSet = aOther.isSet; 42 state = aOther.state; 43 result = aOther.result; 44 toolTip = aOther.toolTip; 45 return *this; 46 } 47 48 bool isSet : 1; 49 50 KMediumState state; 51 COMResult result; 52 QString toolTip; 53 }; 54 55 /** 34 56 * Media descriptor for the GUI. 35 57 * … … 100 122 , mParent (0) { refresh(); } 101 123 124 VBoxMedium& operator= (const VBoxMedium &aOther); 125 102 126 void blockAndQueryState(); 103 127 void refresh(); … … 138 162 QString name (bool aNoDiffs = false) const { return aNoDiffs ? root().mName : mName; } 139 163 QString location (bool aNoDiffs = false) const { return aNoDiffs ? root().mLocation : mLocation; } 164 140 165 QString size (bool aNoDiffs = false) const { return aNoDiffs ? root().mSize : mSize; } 141 166 QString logicalSize (bool aNoDiffs = false) const { return aNoDiffs ? root().mLogicalSize : mLogicalSize; } 167 142 168 QString hardDiskFormat (bool aNoDiffs = false) const { return aNoDiffs ? root().mHardDiskFormat : mHardDiskFormat; } 143 169 QString hardDiskType (bool aNoDiffs = false) const { return aNoDiffs ? root().mHardDiskType : mHardDiskType; } 170 144 171 QString usage (bool aNoDiffs = false) const { return aNoDiffs ? root().mUsage : mUsage; } 172 QString tip() const { return mToolTip; } 173 174 const NoDiffsCache& cache() const { return mNoDiffs; } 145 175 146 176 /** … … 182 212 * Returns a parent medium. For non-hard disk media, this is always NULL. 183 213 */ 184 VBoxMedium *parent() const { return mParent; }185 186 VBoxMedium &root() const;214 VBoxMedium* parent() const { return mParent; } 215 216 VBoxMedium& root() const; 187 217 188 218 QString toolTip (bool aNoDiffs = false, bool aCheckRO = false, bool aNullAllowed = false) const; … … 216 246 217 247 QString mId; 248 QString mName; 218 249 QString mLocation; 219 QString mName; 250 220 251 QString mSize; 252 QString mLogicalSize; 221 253 222 254 QString mHardDiskFormat; 223 255 QString mHardDiskType; 224 QString mLogicalSize;225 256 226 257 QString mUsage; … … 235 266 VBoxMedium *mParent; 236 267 237 /** 238 * Used to override some attributes in the user-friendly "don't show diffs" 239 * mode. 240 */ 241 struct NoDiffs 242 { 243 NoDiffs() : isSet (false), state (KMediumState_NotCreated) {} 244 245 bool isSet : 1; 246 247 KMediumState state; 248 COMResult result; 249 QString toolTip; 250 } 251 mNoDiffs; 268 NoDiffsCache mNoDiffs; 269 270 static QString mTable; 271 static QString mRow; 252 272 }; 253 273
Note:
See TracChangeset
for help on using the changeset viewer.