Changeset 1298 in vbox
- Timestamp:
- Mar 7, 2007 12:49:47 PM (18 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/ui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxDiskImageManagerDlg.ui
r852 r1298 538 538 <variable access="private">QPixmap pxInaccessible;</variable> 539 539 <variable access="private">QPixmap pxErroneous;</variable> 540 <variable access="private">QPixmap pxHD;</variable> 541 <variable access="private">QPixmap pxCD;</variable> 542 <variable access="private">QPixmap pxFD;</variable> 540 543 <variable access="private">CMachine cmachine;</variable> 541 544 <variable access="private">QPopupMenu *itemMenu;</variable> … … 631 634 <function access="protected">clearInfoPanes()</function> 632 635 <function access="protected">prepareToRefresh( int aTotal = 0 )</function> 636 <function access="protected">makeWarningMark( DiskImageItem*, VBoxMedia::Status, VBoxDefs::DiskType )</function> 633 637 </functions> 634 638 <layoutdefaults spacing="10" margin="10"/> -
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxDiskImageManagerDlg.ui.h
r1017 r1298 203 203 Assert (!pxErroneous.isNull()); 204 204 205 pxHD = QPixmap::fromMimeSource ("diskim_16px.png"); 206 pxCD = QPixmap::fromMimeSource ("cd_16px.png"); 207 pxFD = QPixmap::fromMimeSource ("fd_16px.png"); 205 208 206 209 /* setup tab widget icons */ … … 1096 1099 aItem->setStatus (status); 1097 1100 1098 if (aMedia.status == VBoxMedia::Inaccessible) 1099 aItem->setPixmap (0, pxInaccessible); 1100 else if (aMedia.status == VBoxMedia::Error) 1101 aItem->setPixmap (0, pxErroneous); 1101 makeWarningMark (aItem, aMedia.status, VBoxDefs::HD); 1102 1102 } 1103 1103 … … 1124 1124 aItem->setStatus (status); 1125 1125 1126 if (aMedia.status == VBoxMedia::Inaccessible) 1127 aItem->setPixmap (0, pxInaccessible); 1128 else if (aMedia.status == VBoxMedia::Error) 1129 aItem->setPixmap (0, pxErroneous); 1126 makeWarningMark (aItem, aMedia.status, VBoxDefs::CD); 1130 1127 } 1131 1128 … … 1152 1149 aItem->setStatus (status); 1153 1150 1154 if (aMedia.status == VBoxMedia::Inaccessible) 1155 aItem->setPixmap (0, pxInaccessible); 1156 else if (aMedia.status == VBoxMedia::Error) 1157 aItem->setPixmap (0, pxErroneous); 1151 makeWarningMark (aItem, aMedia.status, VBoxDefs::FD); 1158 1152 } 1159 1153 … … 1200 1194 VBoxMedia::Error; 1201 1195 createHdItem (0, aRoot, VBoxMedia (CUnknown (subHd), VBoxDefs::HD, status)); 1196 } 1197 } 1198 1199 1200 void VBoxDiskImageManagerDlg::makeWarningMark (DiskImageItem *aItem, 1201 VBoxMedia::Status aStatus, 1202 VBoxDefs::DiskType aType) 1203 { 1204 const QPixmap &pm = aStatus == VBoxMedia::Inaccessible ? pxInaccessible : 1205 aStatus == VBoxMedia::Error ? pxErroneous : QPixmap(); 1206 1207 if (!pm.isNull()) 1208 { 1209 aItem->setPixmap (0, pm); 1210 QIconSet iconSet (pm); 1211 QWidget *wt = aType == VBoxDefs::HD ? twImages->page (0) : 1212 aType == VBoxDefs::CD ? twImages->page (1) : 1213 aType == VBoxDefs::FD ? twImages->page (2) : 0; 1214 Assert (wt); /* aType should be correct */ 1215 twImages->changeTab (wt, iconSet, twImages->tabLabel (wt)); 1202 1216 } 1203 1217 } … … 1293 1307 void VBoxDiskImageManagerDlg::mediaEnumStarted() 1294 1308 { 1309 /* load default tab icons */ 1310 twImages->changeTab (twImages->page (0), 1311 QIconSet (pxHD), 1312 twImages->tabLabel (twImages->page (0))); 1313 twImages->changeTab (twImages->page (1), 1314 QIconSet (pxCD), 1315 twImages->tabLabel (twImages->page (1))); 1316 twImages->changeTab (twImages->page (2), 1317 QIconSet (pxFD), 1318 twImages->tabLabel (twImages->page (2))); 1319 1295 1320 /* load current media list */ 1296 1321 const VBoxMediaList &list = vboxGlobal().currentMediaList();
Note:
See TracChangeset
for help on using the changeset viewer.