Changeset 103339 in vbox for trunk/src/VBox
- Timestamp:
- Feb 13, 2024 4:49:47 PM (12 months ago)
- svn:sync-xref-src-repo-rev:
- 161648
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDefs.h
r103321 r103339 126 126 127 127 128 /** Storage-slot struct. */129 struct StorageSlot130 {131 StorageSlot() : bus(KStorageBus_Null), port(0), device(0) {}132 StorageSlot(const StorageSlot &other) : bus(other.bus), port(other.port), device(other.device) {}133 StorageSlot(KStorageBus otherBus, LONG iPort, LONG iDevice) : bus(otherBus), port(iPort), device(iDevice) {}134 StorageSlot& operator=(const StorageSlot &other) { bus = other.bus; port = other.port; device = other.device; return *this; }135 bool operator==(const StorageSlot &other) const { return bus == other.bus && port == other.port && device == other.device; }136 bool operator!=(const StorageSlot &other) const { return bus != other.bus || port != other.port || device != other.device; }137 bool operator<(const StorageSlot &other) const { return (bus < other.bus) ||138 (bus == other.bus && port < other.port) ||139 (bus == other.bus && port == other.port && device < other.device); }140 bool operator>(const StorageSlot &other) const { return (bus > other.bus) ||141 (bus == other.bus && port > other.port) ||142 (bus == other.bus && port == other.port && device > other.device); }143 bool isNull() const { return bus == KStorageBus_Null; }144 KStorageBus bus; LONG port; LONG device;145 };146 Q_DECLARE_METATYPE(StorageSlot);147 148 149 /** Storage-slot struct extension with exact controller name. */150 struct ExactStorageSlot : public StorageSlot151 {152 ExactStorageSlot(const QString &strController,153 KStorageBus enmBus, LONG iPort, LONG iDevice)154 : StorageSlot(enmBus, iPort, iDevice)155 , controller(strController)156 {}157 QString controller;158 };159 160 161 128 #endif /* !FEQT_INCLUDED_SRC_globals_UIDefs_h */ -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumDefs.h
r103338 r103339 33 33 34 34 /* Qt includes: */ 35 #include <QtGlobal> 35 36 #include <QString> 36 37 … … 40 41 /* COM includes: */ 41 42 #include "COMEnums.h" 42 43 /* Other VBox includes: */44 #include <VBox/com/defs.h>45 43 46 44 /* Forward declarations: */ … … 106 104 107 105 /** Medium-target constructor. */ 108 UIMediumTarget(const QString &strName = QString(), LONG iPort = 0, LONGiDevice = 0,106 UIMediumTarget(const QString &strName = QString(), qint32 iPort = 0, qint32 iDevice = 0, 109 107 UIMediumDeviceType aMediumType = UIMediumDeviceType_Invalid, 110 108 UIMediumTargetType aType = UIMediumTargetType_WithID, const QString &strData = QString()) … … 117 115 QString name; 118 116 /** Determines controller port. */ 119 LONGport;117 qint32 port; 120 118 /** Determines controller device. */ 121 LONGdevice;119 qint32 device; 122 120 123 121 /** Determines medium-target medium-type. */ … … 130 128 }; 131 129 130 /** Storage-slot struct. */ 131 struct StorageSlot 132 { 133 StorageSlot() : bus(KStorageBus_Null), port(0), device(0) {} 134 StorageSlot(const StorageSlot &other) : bus(other.bus), port(other.port), device(other.device) {} 135 StorageSlot(KStorageBus otherBus, qint32 iPort, qint32 iDevice) : bus(otherBus), port(iPort), device(iDevice) {} 136 StorageSlot& operator=(const StorageSlot &other) { bus = other.bus; port = other.port; device = other.device; return *this; } 137 bool operator==(const StorageSlot &other) const { return bus == other.bus && port == other.port && device == other.device; } 138 bool operator!=(const StorageSlot &other) const { return bus != other.bus || port != other.port || device != other.device; } 139 bool operator<(const StorageSlot &other) const { return (bus < other.bus) || 140 (bus == other.bus && port < other.port) || 141 (bus == other.bus && port == other.port && device < other.device); } 142 bool operator>(const StorageSlot &other) const { return (bus > other.bus) || 143 (bus == other.bus && port > other.port) || 144 (bus == other.bus && port == other.port && device > other.device); } 145 bool isNull() const { return bus == KStorageBus_Null; } 146 KStorageBus bus; qint32 port; qint32 device; 147 }; 148 149 /** Storage-slot struct extension with exact controller name. */ 150 struct ExactStorageSlot : public StorageSlot 151 { 152 ExactStorageSlot(const QString &strController, 153 KStorageBus enmBus, qint32 iPort, qint32 iDevice) 154 : StorageSlot(enmBus, iPort, iDevice) 155 , controller(strController) 156 {} 157 QString controller; 158 }; 159 132 160 /* Let QMetaType know about our types: */ 133 161 Q_DECLARE_METATYPE(UIMediumDeviceType); 134 162 Q_DECLARE_METATYPE(UIMediumTarget); 163 Q_DECLARE_METATYPE(StorageSlot); 135 164 136 165 #endif /* !FEQT_INCLUDED_SRC_medium_UIMediumDefs_h */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineDefs.h
r99098 r103339 38 38 39 39 /* GUI includes: */ 40 #include "UI Defs.h"40 #include "UIMediumDefs.h" // for StorageSlot 41 41 42 42 /* Other VBox includes: */ 43 #include <iprt/cdefs.h> 43 #include <iprt/cdefs.h> // for RT_BIT stuff 44 44 45 45 /** Machine window visual element types. */ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIStorageSettingsEditor.h
r103338 r103339 105 105 KDeviceType m_enmDeviceType; 106 106 /** Holds the port. */ 107 LONGm_iPort;107 qint32 m_iPort; 108 108 /** Holds the device. */ 109 LONGm_iDevice;109 qint32 m_iDevice; 110 110 /** Holds the medium ID. */ 111 111 QUuid m_uMediumId;
Note:
See TracChangeset
for help on using the changeset viewer.