Changeset 85957 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Aug 31, 2020 1:32:41 PM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 140152
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/settings/machine
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsUSBFilterDetails.cpp
r85956 r85957 30 30 UIMachineSettingsUSBFilterDetails::UIMachineSettingsUSBFilterDetails(QWidget *pParent /* = 0 */) 31 31 : QIWithRetranslateUI2<QIDialog>(pParent, Qt::Sheet) 32 , m_pLayoutMain(0)33 32 , m_pLabelName(0) 34 33 , m_pEditorName(0) … … 111 110 void UIMachineSettingsUSBFilterDetails::prepareWidgets() 112 111 { 113 m_pLayoutMain = new QGridLayout(this); 114 if (m_pLayoutMain) 112 /* Prepare main layout: */ 113 QGridLayout *pLayoutMain = new QGridLayout(this); 114 if (pLayoutMain) 115 115 { 116 m_pLayoutMain->setRowStretch(9, 1); 117 116 pLayoutMain->setRowStretch(9, 1); 117 118 /* Prepare name label: */ 118 119 m_pLabelName = new QLabel(this); 119 120 if (m_pLabelName) 120 121 { 121 122 m_pLabelName->setAlignment(Qt::AlignRight | Qt::AlignVCenter); 122 m_pLayoutMain->addWidget(m_pLabelName, 0, 0); 123 } 123 pLayoutMain->addWidget(m_pLabelName, 0, 0); 124 } 125 /* Prepare name editor: */ 124 126 m_pEditorName = new QLineEdit(this); 125 127 if (m_pEditorName) … … 129 131 m_pEditorName->setValidator(new QRegExpValidator(QRegExp(".+"), this)); 130 132 131 m_pLayoutMain->addWidget(m_pEditorName, 0, 1); 132 } 133 133 pLayoutMain->addWidget(m_pEditorName, 0, 1); 134 } 135 136 /* Prepare vendor ID label: */ 134 137 m_pLabelVendorID = new QLabel(this); 135 138 if (m_pLabelVendorID) 136 139 { 137 140 m_pLabelVendorID->setAlignment(Qt::AlignRight | Qt::AlignVCenter); 138 m_pLayoutMain->addWidget(m_pLabelVendorID, 1, 0); 139 } 141 pLayoutMain->addWidget(m_pLabelVendorID, 1, 0); 142 } 143 /* Prepare vendor ID editor: */ 140 144 m_pEditorVendorID = new QLineEdit(this); 141 145 if (m_pEditorVendorID) … … 145 149 m_pEditorVendorID->setValidator(new QRegExpValidator(QRegExp("[0-9a-fA-F]{0,4}"), this)); 146 150 147 m_pLayoutMain->addWidget(m_pEditorVendorID, 1, 1); 148 } 149 151 pLayoutMain->addWidget(m_pEditorVendorID, 1, 1); 152 } 153 154 /* Prepare product ID label: */ 150 155 m_pLabelProductID = new QLabel(this); 151 156 if (m_pLabelProductID) 152 157 { 153 158 m_pLabelProductID->setAlignment(Qt::AlignRight | Qt::AlignVCenter); 154 m_pLayoutMain->addWidget(m_pLabelProductID, 2, 0); 155 } 159 pLayoutMain->addWidget(m_pLabelProductID, 2, 0); 160 } 161 /* Prepare product ID editor: */ 156 162 m_pEditorProductID = new QLineEdit(this); 157 163 if (m_pEditorProductID) … … 161 167 m_pEditorProductID->setValidator(new QRegExpValidator(QRegExp("[0-9a-fA-F]{0,4}"), this)); 162 168 163 m_pLayoutMain->addWidget(m_pEditorProductID, 2, 1); 164 } 165 169 pLayoutMain->addWidget(m_pEditorProductID, 2, 1); 170 } 171 172 /* Prepare revision label: */ 166 173 m_pLabelRevision = new QLabel(this); 167 174 if (m_pLabelRevision) 168 175 { 169 176 m_pLabelRevision->setAlignment(Qt::AlignRight | Qt::AlignVCenter); 170 m_pLayoutMain->addWidget(m_pLabelRevision, 3, 0); 171 } 177 pLayoutMain->addWidget(m_pLabelRevision, 3, 0); 178 } 179 /* Prepare revision editor: */ 172 180 m_pEditorRevision = new QLineEdit(this); 173 181 if (m_pEditorRevision) … … 177 185 m_pEditorRevision->setValidator(new QRegExpValidator(QRegExp("[0-9a-fA-F]{0,4}"), this)); 178 186 179 m_pLayoutMain->addWidget(m_pEditorRevision, 3, 1); 180 } 181 187 pLayoutMain->addWidget(m_pEditorRevision, 3, 1); 188 } 189 190 /* Prepare manufacturer label: */ 182 191 m_pLabelManufacturer = new QLabel(this); 183 192 if (m_pLabelManufacturer) 184 193 { 185 194 m_pLabelManufacturer->setAlignment(Qt::AlignRight | Qt::AlignVCenter); 186 m_pLayoutMain->addWidget(m_pLabelManufacturer, 4, 0); 187 } 195 pLayoutMain->addWidget(m_pLabelManufacturer, 4, 0); 196 } 197 /* Prepare manufacturer editor: */ 188 198 m_pEditorManufacturer = new QLineEdit(this); 189 199 if (m_pEditorManufacturer) … … 191 201 if (m_pLabelManufacturer) 192 202 m_pLabelManufacturer->setBuddy(m_pEditorManufacturer); 193 m_pLayoutMain->addWidget(m_pEditorManufacturer, 4, 1); 194 } 195 203 pLayoutMain->addWidget(m_pEditorManufacturer, 4, 1); 204 } 205 206 /* Prepare product label: */ 196 207 m_pLabelProduct = new QLabel(this); 197 208 if (m_pLabelProduct) 198 209 { 199 210 m_pLabelProduct->setAlignment(Qt::AlignRight | Qt::AlignVCenter); 200 m_pLayoutMain->addWidget(m_pLabelProduct, 5, 0); 201 } 211 pLayoutMain->addWidget(m_pLabelProduct, 5, 0); 212 } 213 /* Prepare product editor: */ 202 214 m_pEditorProduct = new QLineEdit(this); 203 215 if (m_pEditorProduct) … … 205 217 if (m_pLabelProduct) 206 218 m_pLabelProduct->setBuddy(m_pEditorProduct); 207 m_pLayoutMain->addWidget(m_pEditorProduct, 5, 1); 208 } 209 219 pLayoutMain->addWidget(m_pEditorProduct, 5, 1); 220 } 221 222 /* Prepare serial NO label: */ 210 223 m_pLabelSerialNo = new QLabel(this); 211 224 if (m_pLabelSerialNo) 212 225 { 213 226 m_pLabelSerialNo->setAlignment(Qt::AlignRight | Qt::AlignVCenter); 214 m_pLayoutMain->addWidget(m_pLabelSerialNo, 6, 0); 215 } 227 pLayoutMain->addWidget(m_pLabelSerialNo, 6, 0); 228 } 229 /* Prepare serial NO editor: */ 216 230 m_pEditorSerialNo = new QLineEdit(this); 217 231 if (m_pEditorSerialNo) … … 219 233 if (m_pLabelSerialNo) 220 234 m_pLabelSerialNo->setBuddy(m_pEditorSerialNo); 221 m_pLayoutMain->addWidget(m_pEditorSerialNo, 6, 1); 222 } 223 235 pLayoutMain->addWidget(m_pEditorSerialNo, 6, 1); 236 } 237 238 /* Prepare port label: */ 224 239 m_pLabelPort = new QLabel(this); 225 240 if (m_pLabelPort) 226 241 { 227 242 m_pLabelPort->setAlignment(Qt::AlignRight | Qt::AlignVCenter); 228 m_pLayoutMain->addWidget(m_pLabelPort, 7, 0); 229 } 243 pLayoutMain->addWidget(m_pLabelPort, 7, 0); 244 } 245 /* Prepare port editor: */ 230 246 m_pEditorPort = new QLineEdit(this); 231 247 if (m_pEditorPort) … … 235 251 m_pEditorPort->setValidator(new QRegExpValidator(QRegExp("[0-9]*"), this)); 236 252 237 m_pLayoutMain->addWidget(m_pEditorPort, 7, 1); 238 } 239 253 pLayoutMain->addWidget(m_pEditorPort, 7, 1); 254 } 255 256 /* Prepare remote label: */ 240 257 m_pLabelRemote = new QLabel(this); 241 258 if (m_pLabelRemote) 242 259 { 243 260 m_pLabelRemote->setAlignment(Qt::AlignRight | Qt::AlignVCenter); 244 m_pLayoutMain->addWidget(m_pLabelRemote, 8, 0); 245 } 261 pLayoutMain->addWidget(m_pLabelRemote, 8, 0); 262 } 263 /* Prepare remote combo: */ 246 264 m_pComboRemote = new QComboBox(this); 247 265 if (m_pComboRemote) … … 253 271 m_pComboRemote->insertItem(UIMachineSettingsUSB::ModeOff, QString()); /* No */ 254 272 255 m_pLayoutMain->addWidget(m_pComboRemote, 8, 1); 256 } 257 273 pLayoutMain->addWidget(m_pComboRemote, 8, 1); 274 } 275 276 /* Prepare button-box: */ 258 277 m_pButtonBox = new QIDialogButtonBox(this); 259 278 if (m_pButtonBox) 260 279 { 261 280 m_pButtonBox->setStandardButtons(QDialogButtonBox::Cancel | QDialogButtonBox::Ok); 262 m_pLayoutMain->addWidget(m_pButtonBox, 10, 0, 1, 2);281 pLayoutMain->addWidget(m_pButtonBox, 10, 0, 1, 2); 263 282 } 264 283 } -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsUSBFilterDetails.h
r85956 r85957 28 28 /* Forward declarations: */ 29 29 class QComboBox; 30 class QGridLayout;31 30 class QLabel; 32 31 class QLineEdit; … … 57 56 /** @name Widgets 58 57 * @{ */ 59 /** Holds the main layout instance. */60 QGridLayout *m_pLayoutMain;61 58 /** Holds the name label instance. */ 62 59 QLabel *m_pLabelName;
Note:
See TracChangeset
for help on using the changeset viewer.