- Timestamp:
- Aug 11, 2008 6:08:17 PM (16 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox4
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox4/Makefile.kmk
r11162 r11344 498 498 # Sources containing local definitions of classes that use the Q_OBJECT macro. 499 499 VirtualBox4_QT_MOCSRCS = \ 500 src/VBoxSelectorWnd.cpp 500 src/VBoxSelectorWnd.cpp \ 501 src/VBoxDiskImageManagerDlg.cpp 501 502 ifdef VBOX_WITH_XPCOM 502 503 VirtualBox4_QT_MOCSRCS += \ -
trunk/src/VBox/Frontends/VirtualBox4/include/VBoxDiskImageManagerDlg.h
r10999 r11344 33 33 class DiskImageItem; 34 34 class VBoxToolBar; 35 class InfoPaneLabel;36 35 class VBoxProgressBar; 37 36 … … 41 40 Q_OBJECT; 42 41 43 enum TabIndex { HDTab = 0, 44 CDTab, 45 FDTab }; 42 enum TabIndex { HDTab = 0, CDTab, FDTab }; 46 43 47 44 public: 48 45 49 VBoxDiskImageManagerDlg (QWidget *aParent = NULL, Qt::WindowFlags aFlags = Qt::Dialog); 46 VBoxDiskImageManagerDlg (QWidget *aParent = 0, 47 Qt::WindowFlags aFlags = Qt::Dialog); 50 48 51 void setup (int aType, bool aDoSelect, const QUuid &aTargetVMId = QUuid(), bool aRefresh = true, CMachine aMachine = NULL, const QUuid &aHdId = QUuid(), const QUuid &aCdId = QUuid(), const QUuid &aFdId = QUuid()); 49 void setup (int aType, bool aDoSelect, const QUuid &aTargetVMId = QUuid(), 50 bool aRefresh = true, CMachine aMachine = 0, 51 const QUuid &aHdId = QUuid(), 52 const QUuid &aCdId = QUuid(), 53 const QUuid &aFdId = QUuid()); 52 54 53 55 static void showModeless (bool aRefresh = true); … … 56 58 QString selectedPath() const; 57 59 58 static QString composeHdToolTip (CHardDisk &aHd, VBoxMedia::Status aStatus, DiskImageItem *aItem = NULL); 59 static QString composeCdToolTip (CDVDImage &aCd, VBoxMedia::Status aStatus, DiskImageItem *aItem = NULL); 60 static QString composeFdToolTip (CFloppyImage &aFd, VBoxMedia::Status aStatus, DiskImageItem *aItem = NULL); 60 static QString composeHdToolTip (CHardDisk &aHd, VBoxMedia::Status aStatus, 61 DiskImageItem *aItem = 0); 62 static QString composeCdToolTip (CDVDImage &aCd, VBoxMedia::Status aStatus, 63 DiskImageItem *aItem = 0); 64 static QString composeFdToolTip (CFloppyImage &aFd, VBoxMedia::Status aStatus, 65 DiskImageItem *aItem = 0); 61 66 62 67 public slots: … … 69 74 virtual void closeEvent (QCloseEvent *aEvent); 70 75 virtual bool eventFilter (QObject *aObject, QEvent *aEvent); 71 /* @todo: Currently not used (Ported from Qt3): */72 virtual void machineStateChanged (const VBoxMachineStateChangeEvent &aEvent);73 76 74 77 private slots: … … 87 90 void releaseImage(); 88 91 89 void releaseDisk (const QUuid &aMachineId, const QUuid &aItemId, VBoxDefs::DiskType aDiskType); 92 void releaseDisk (const QUuid &aMachineId, const QUuid &aItemId, 93 VBoxDefs::DiskType aDiskType); 90 94 91 95 void processCurrentChanged (int index = -1); 92 void processCurrentChanged (QTreeWidgetItem *aItem, QTreeWidgetItem *aPrevItem = NULL);96 void processCurrentChanged (QTreeWidgetItem *aItem, QTreeWidgetItem *aPrevItem = 0); 93 97 void processDoubleClick (QTreeWidgetItem *aItem, int aColumn); 94 98 void showContextMenu (const QPoint &aPos); … … 100 104 QTreeWidget* currentTreeWidget() const; 101 105 102 QTreeWidgetItem *selectedItem (const QTreeWidget *aTree) const;103 DiskImageItem *toDiskImageItem (QTreeWidgetItem *aItem) const;106 QTreeWidgetItem* selectedItem (const QTreeWidget *aTree) const; 107 DiskImageItem* toDiskImageItem (QTreeWidgetItem *aItem) const; 104 108 105 109 void setCurrentItem (QTreeWidget *aTree, QTreeWidgetItem *aItem); 106 110 107 111 void addImageToList (const QString &aSource, VBoxDefs::DiskType aDiskType); 108 DiskImageItem* createImageNode (QTreeWidget *aTree, DiskImageItem *aRoot, const VBoxMedia &aMedia) const; 112 DiskImageItem* createImageNode (QTreeWidget *aTree, DiskImageItem *aRoot, 113 const VBoxMedia &aMedia) const; 109 114 110 115 DiskImageItem* createHdItem (QTreeWidget *aTree, const VBoxMedia &aMedia) const; … … 126 131 void clearInfoPanes(); 127 132 void prepareToRefresh (int aTotal = 0); 128 void createInfoString (InfoPaneLabel *&aInfo, QWidget* aRoot, bool aLeftRightMargin, int aRow, int aCol, int aRowSpan = 1, int aColSpan = 1) const;129 133 130 void makeWarningMark (DiskImageItem *aItem, VBoxMedia::Status aStatus, VBoxDefs::DiskType aType) const; 134 void makeWarningMark (DiskImageItem *aItem, VBoxMedia::Status aStatus, 135 VBoxDefs::DiskType aType) const; 131 136 132 137 static QString DVDImageUsage (const QUuid &aId, QString &aSnapshotUsage); … … 165 170 QAction *mRefreshAction; 166 171 167 /* The grid entries in the various information panels */168 InfoPaneLabel *mHdsPane1;169 InfoPaneLabel *mHdsPane2;170 InfoPaneLabel *mHdsPane3;171 InfoPaneLabel *mHdsPane4;172 InfoPaneLabel *mHdsPane5;173 InfoPaneLabel *mHdsPane6;174 InfoPaneLabel *mHdsPane7;175 InfoPaneLabel *mCdsPane1;176 InfoPaneLabel *mCdsPane2;177 InfoPaneLabel *mFdsPane1;178 InfoPaneLabel *mFdsPane2;179 180 172 /* Machine */ 181 173 CMachine mMachine; -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxDiskImageManagerDlg.cpp
r10999 r11344 28 28 29 29 /* Qt includes */ 30 #include <QLabel>31 30 #include <QDir> 32 31 #include <QFileInfo> … … 37 36 #include <QProgressBar> 38 37 38 39 39 class AddVDMUrlsEvent: public QEvent 40 40 { … … 109 109 { 110 110 mToolTip = aToolTip; 111 for (int i =0; i < treeWidget()->columnCount(); ++i)111 for (int i = 0; i < treeWidget()->columnCount(); ++ i) 112 112 QTreeWidgetItem::setToolTip (i, mToolTip); 113 113 } … … 170 170 }; 171 171 172 172 173 class DiskImageItemIterator : public QTreeWidgetItemIterator 173 174 { … … 181 182 QTreeWidgetItem *item = QTreeWidgetItemIterator::operator*(); 182 183 return item && item->type() == QITreeWidget::BasicItemType ? 183 static_cast<DiskImageItem*> (item) : NULL;184 static_cast<DiskImageItem*> (item) : 0; 184 185 } 185 186 … … 190 191 }; 191 192 192 class InfoPaneLabel : public QILabel193 {194 public:195 196 InfoPaneLabel (QWidget *aParent, QLabel *aLabel = 0)197 : QILabel (aParent), mLabel (aLabel) {}198 199 QLabel* label() const { return mLabel; }200 201 private:202 203 /* Private member vars */204 QLabel *mLabel;205 };206 193 207 194 class VBoxProgressBar: public QWidget 208 195 { 196 Q_OBJECT; 197 209 198 public: 210 199 … … 212 201 : QWidget (aParent) 213 202 { 203 mText = new QLabel (this); 204 mProgressBar = new QProgressBar (this); 205 mProgressBar->setTextVisible (false); 206 214 207 QHBoxLayout *layout = new QHBoxLayout (this); 215 208 VBoxGlobal::setLayoutMargin (layout, 0); 216 mText = new QLabel ();217 209 layout->addWidget (mText); 218 mProgressBar = new QProgressBar;219 /* The text is provided by our own label */220 mProgressBar->setTextVisible (false);221 210 layout->addWidget (mProgressBar); 222 211 } 223 212 224 public slots: 225 226 void setText (const QString& aText) { mText->setText (aText); } 213 void setText (const QString &aText) { mText->setText (aText); } 227 214 void setValue (int aValue) { mProgressBar->setValue (aValue); } 228 void setMinimum (int aValue) { mProgressBar->setMinimum (aValue); }229 215 void setMaximum (int aValue) { mProgressBar->setMaximum (aValue); } 230 void setRange (int aMin, int aMax) { mProgressBar->setRange (aMin, aMax); }231 232 QLabel *label() const { return mText; }233 QProgressBar *progressBar() const { return mProgressBar; }234 216 235 217 private: 236 218 237 /* Private member vars */ 238 QLabel *mText; 219 QLabel *mText; 239 220 QProgressBar *mProgressBar; 240 221 }; 241 222 242 VBoxDiskImageManagerDlg *VBoxDiskImageManagerDlg::mModelessDialog = NULL; 243 244 VBoxDiskImageManagerDlg::VBoxDiskImageManagerDlg (QWidget *aParent /* = NULL */, Qt::WindowFlags aFlags /* = 0 */) 223 224 VBoxDiskImageManagerDlg* VBoxDiskImageManagerDlg::mModelessDialog = 0; 225 226 VBoxDiskImageManagerDlg::VBoxDiskImageManagerDlg (QWidget *aParent /* = 0 */, 227 Qt::WindowFlags aFlags /* = 0 */) 245 228 : QIWithRetranslateUI2<QIMainDialog> (aParent, aFlags) 246 229 , mType (VBoxDefs::InvalidType) … … 261 244 262 245 /* Setup tab widget icons */ 263 twImages->setTabIcon (HDTab, mIconHD);264 twImages->setTabIcon (CDTab, mIconCD);265 twImages->setTabIcon (FDTab, mIconFD);266 267 connect ( twImages, SIGNAL (currentChanged (int)),246 mTwImages->setTabIcon (HDTab, mIconHD); 247 mTwImages->setTabIcon (CDTab, mIconCD); 248 mTwImages->setTabIcon (FDTab, mIconFD); 249 250 connect (mTwImages, SIGNAL (currentChanged (int)), 268 251 this, SLOT (processCurrentChanged (int))); 269 252 … … 272 255 mHdsTree->header()->setResizeMode (1, QHeaderView::ResizeToContents); 273 256 mHdsTree->header()->setResizeMode (2, QHeaderView::ResizeToContents); 274 mHdsTree->setSortingEnabled (true);257 mHdsTree->setSortingEnabled (true); 275 258 mHdsTree->setSupportedDropActions (Qt::LinkAction); 276 259 mHdsTree->installEventFilter (this); … … 284 267 mCdsTree->header()->setResizeMode (0, QHeaderView::Stretch); 285 268 mCdsTree->header()->setResizeMode (1, QHeaderView::ResizeToContents); 286 mCdsTree->setSortingEnabled (true);269 mCdsTree->setSortingEnabled (true); 287 270 mCdsTree->setSupportedDropActions (Qt::LinkAction); 288 271 mCdsTree->installEventFilter (this); … … 296 279 mFdsTree->header()->setResizeMode (0, QHeaderView::Stretch); 297 280 mFdsTree->header()->setResizeMode (1, QHeaderView::ResizeToContents); 298 mFdsTree->setSortingEnabled (true);281 mFdsTree->setSortingEnabled (true); 299 282 mFdsTree->setSupportedDropActions (Qt::LinkAction); 300 283 mFdsTree->installEventFilter (this); … … 346 329 ":/refresh_disabled_22px.png", ":/refresh_disabled_16px.png")); 347 330 348 //mActionsMenu->addAction (mEditAction);331 // mActionsMenu->addAction (mEditAction); 349 332 mActionsContextMenu->addAction (mRemoveAction); 350 333 mActionsContextMenu->addAction (mReleaseAction); … … 382 365 mActionsToolBar->addAction (mAddAction); 383 366 mActionsToolBar->addSeparator(); 384 //mActionsToolBar->addAction (mEditAction);367 // mActionsToolBar->addAction (mEditAction); 385 368 mActionsToolBar->addAction (mRemoveAction); 386 369 mActionsToolBar->addAction (mReleaseAction); … … 393 376 mActionsMenu->addAction (mAddAction); 394 377 mActionsMenu->addSeparator(); 395 //mActionsMenu->addAction (mEditAction);378 // mActionsMenu->addAction (mEditAction); 396 379 mActionsMenu->addAction (mRemoveAction); 397 380 mActionsMenu->addAction (mReleaseAction); … … 399 382 mActionsMenu->addAction (mRefreshAction); 400 383 401 // qApp->installEventFilter (this); 402 403 /* Setup information pane layouts */ 404 QGridLayout *hdsContainerLayout = new QGridLayout (mHdsContainer); 405 VBoxGlobal::setLayoutMargin (hdsContainerLayout, 5); 406 hdsContainerLayout->setSpacing (0); 407 QGridLayout *cdsContainerLayout = new QGridLayout (mCdsContainer); 408 VBoxGlobal::setLayoutMargin (cdsContainerLayout, 5); 409 cdsContainerLayout->setSpacing (0); 410 QGridLayout *fdsContainerLayout = new QGridLayout (mFdsContainer); 411 VBoxGlobal::setLayoutMargin (fdsContainerLayout, 5); 412 fdsContainerLayout->setSpacing (0); 413 /* Create info-pane for hd list-view */ 414 createInfoString (mHdsPane1, mHdsContainer, false, 0, 0, 1, 3); 415 createInfoString (mHdsPane2, mHdsContainer, true, 1, 0); 416 createInfoString (mHdsPane3, mHdsContainer, false, 1, 2); 417 createInfoString (mHdsPane4, mHdsContainer, true, 2, 0); 418 createInfoString (mHdsPane5, mHdsContainer, false, 2, 2); 419 /* Create info-pane for cd list-view */ 420 createInfoString (mCdsPane1, mCdsContainer, false, 0, 0); 421 createInfoString (mCdsPane2, mCdsContainer, false, 1, 0); 422 /* Create info-pane for fd list-view */ 423 createInfoString (mFdsPane1, mFdsContainer, false, 0, 0); 424 createInfoString (mFdsPane2, mFdsContainer, false, 1, 0); 384 /* Setup information pane */ 385 QList<QILabel*> paneList = findChildren<QILabel*>(); 386 foreach (QILabel *infoPane, paneList) 387 infoPane->setFullSizeSelection (true); 425 388 426 389 /* Enumeration progressbar creation */ … … 441 404 connect (mButtonBox, SIGNAL (helpRequested()), 442 405 &vboxProblem(), SLOT (showHelpHelpDialog())); 443 444 /* Applying language settings */445 retranslateUi();446 406 } 447 407 448 408 void VBoxDiskImageManagerDlg::setup (int aType, bool aDoSelect, 449 const QUuid &aTargetVMId /* = NULL*/,409 const QUuid &aTargetVMId /* = 0 */, 450 410 bool aRefresh /* = true */, 451 CMachine aMachine /* = NULL*/,411 CMachine aMachine /* = 0 */, 452 412 const QUuid &aHdId, 453 413 const QUuid &aCdId, … … 460 420 461 421 mType = aType; 462 twImages->setTabEnabled (HDTab, mType & VBoxDefs::HD);463 twImages->setTabEnabled (CDTab, mType & VBoxDefs::CD);464 twImages->setTabEnabled (FDTab, mType & VBoxDefs::FD);422 mTwImages->setTabEnabled (HDTab, mType & VBoxDefs::HD); 423 mTwImages->setTabEnabled (CDTab, mType & VBoxDefs::CD); 424 mTwImages->setTabEnabled (FDTab, mType & VBoxDefs::FD); 465 425 466 426 mDoSelect = aDoSelect; … … 468 428 mTargetVMId = aTargetVMId; 469 429 470 if (mDoSelect) 471 mButtonBox->button (QDialogButtonBox::Ok)->setText (tr ("&Select")); 472 else 473 mButtonBox->button (QDialogButtonBox::Cancel)->setVisible (false); 430 mButtonBox->button (QDialogButtonBox::Cancel)->setVisible (mDoSelect); 474 431 475 432 /* Listen to "media enumeration started" signals */ … … 527 484 if (QTreeWidgetItem *item = mFdsTree->topLevelItem (0)) 528 485 setCurrentItem (mFdsTree, item); 486 487 /* Applying language settings */ 488 retranslateUi(); 529 489 } 530 490 … … 535 495 { 536 496 mModelessDialog = 537 new VBoxDiskImageManagerDlg ( NULL, Qt::Window);497 new VBoxDiskImageManagerDlg (0, Qt::Window); 538 498 mModelessDialog->setAttribute (Qt::WA_DeleteOnClose); 539 499 mModelessDialog->setup (VBoxDefs::HD | VBoxDefs::CD | VBoxDefs::FD, 540 false, NULL, aRefresh);500 false, 0, aRefresh); 541 501 542 502 /* listen to events that may change the media status and refresh … … 648 608 case VBoxMedia::Error: 649 609 { 650 /// @todo (r=dmik) pa ass a complete VBoxMedia instance here651 // to get the result of blabla.GetAccessible() call f orm CUnknown610 /// @todo (r=dmik) pass a complete VBoxMedia instance here 611 // to get the result of blabla.GetAccessible() call from CUnknown 652 612 tip = tr ("<nobr><b>%1</b></nobr><br>" 653 613 "Error checking media accessibility", "HDD") … … 713 673 case VBoxMedia::Error: 714 674 { 715 /// @todo (r=dmik) pa ass a complete VBoxMedia instance here716 // to get the result of blabla.GetAccessible() call f orm CUnknown675 /// @todo (r=dmik) pass a complete VBoxMedia instance here 676 // to get the result of blabla.GetAccessible() call from CUnknown 717 677 tip = tr ("<nobr><b>%1</b></nobr><br>" 718 678 "Error checking media accessibility", "CD/DVD/Floppy") … … 780 740 case VBoxMedia::Error: 781 741 { 782 /// @todo (r=dmik) pa ass a complete VBoxMedia instance here783 // to get the result of blabla.GetAccessible() call f orm CUnknown742 /// @todo (r=dmik) pass a complete VBoxMedia instance here 743 // to get the result of blabla.GetAccessible() call from CUnknown 784 744 tip = tr ("<nobr><b>%1</b></nobr><br>" 785 745 "Error checking media accessibility", "CD/DVD/Floppy") … … 837 797 mRefreshAction->setStatusTip (tr ("Refresh the media list")); 838 798 839 mHdsPane1->label()->setText (QString ("<nobr>%1:</nobr>").arg (tr ("Location"))); 840 mHdsPane2->label()->setText (QString ("<nobr>%1:</nobr>").arg (tr ("Disk Type"))); 841 mHdsPane3->label()->setText (QString ("<nobr> %1:</nobr>").arg (tr ("Storage Type"))); 842 mHdsPane4->label()->setText (QString ("<nobr>%1:</nobr>").arg (tr ("Attached to"))); 843 mHdsPane5->label()->setText (QString ("<nobr> %1:</nobr>").arg (tr ("Snapshot"))); 844 mCdsPane1->label()->setText (QString ("<nobr>%1:</nobr>").arg (tr ("Location"))); 845 mCdsPane2->label()->setText (QString ("<nobr>%1:</nobr>").arg (tr ("Attached to"))); 846 mFdsPane1->label()->setText (QString ("<nobr>%1:</nobr>").arg (tr ("Location"))); 847 mFdsPane2->label()->setText (QString ("<nobr>%1:</nobr>").arg (tr ("Attached to"))); 799 mNewAction->setToolTip (mNewAction->text().remove ('&') + 800 QString (" (%1)").arg (mNewAction->shortcut().toString())); 801 mAddAction->setToolTip (mAddAction->text().remove ('&') + 802 QString (" (%1)").arg (mAddAction->shortcut().toString())); 803 // mEditAction->setToolTip (mEditAction->text().remove ('&') + 804 // QString (" (%1)").arg (mEditAction->shortcut().toString())); 805 mRemoveAction->setToolTip (mRemoveAction->text().remove ('&') + 806 QString (" (%1)").arg (mRemoveAction->shortcut().toString())); 807 mReleaseAction->setToolTip (mReleaseAction->text().remove ('&') + 808 QString (" (%1)").arg (mReleaseAction->shortcut().toString())); 809 mRefreshAction->setToolTip (mRefreshAction->text().remove ('&') + 810 QString (" (%1)").arg (mRefreshAction->shortcut().toString())); 848 811 849 812 mProgressBar->setText (tr ("Checking accessibility")); … … 856 819 #endif 857 820 821 if (mDoSelect) 822 mButtonBox->button (QDialogButtonBox::Ok)->setText (tr ("&Select")); 823 858 824 if (mHdsTree->model()->rowCount() || mCdsTree->model()->rowCount() || mFdsTree->model()->rowCount()) 859 825 refreshAll(); … … 862 828 void VBoxDiskImageManagerDlg::closeEvent (QCloseEvent *aEvent) 863 829 { 864 mModelessDialog = NULL;830 mModelessDialog = 0; 865 831 aEvent->accept(); 866 832 } … … 871 837 { 872 838 case QEvent::DragEnter: 839 { 840 QDragEnterEvent *deEvent = static_cast<QDragEnterEvent*> (aEvent); 841 if (deEvent->mimeData()->hasUrls()) 873 842 { 874 QDragEnterEvent *deEvent = static_cast<QDragEnterEvent*> (aEvent); 875 if (deEvent->mimeData()->hasUrls()) 843 QList<QUrl> urls = deEvent->mimeData()->urls(); 844 /* Sometimes urls has an empty Url entry. Filter them out. */ 845 urls.removeAll (QUrl()); 846 if (checkDndUrls (urls)) 876 847 { 877 QList<QUrl> urls = deEvent->mimeData()->urls(); 878 /* Sometimes urls has an empty Url entry. Filter them out. */ 879 urls.removeAll (QUrl()); 880 if (checkDndUrls (urls)) 881 { 882 deEvent->setDropAction (Qt::LinkAction); 883 deEvent->acceptProposedAction(); 884 } 848 deEvent->setDropAction (Qt::LinkAction); 849 deEvent->acceptProposedAction(); 885 850 } 886 return true;887 break;888 851 } 852 return true; 853 break; 854 } 889 855 case QEvent::Drop: 856 { 857 QDropEvent *dEvent = static_cast<QDropEvent*> (aEvent); 858 if (dEvent->mimeData()->hasUrls()) 890 859 { 891 QDropEvent *dEvent = static_cast<QDropEvent*> (aEvent); 892 if (dEvent->mimeData()->hasUrls()) 893 { 894 QList<QUrl> urls = dEvent->mimeData()->urls(); 895 /* Sometimes urls has an empty Url entry. Filter them out. */ 896 urls.removeAll (QUrl()); 897 AddVDMUrlsEvent *event = new AddVDMUrlsEvent (urls); 898 QApplication::postEvent (currentTreeWidget(), event); 899 dEvent->acceptProposedAction(); 900 } 901 return true; 902 break; 860 QList<QUrl> urls = dEvent->mimeData()->urls(); 861 /* Sometimes urls has an empty Url entry. Filter them out. */ 862 urls.removeAll (QUrl()); 863 AddVDMUrlsEvent *event = new AddVDMUrlsEvent (urls); 864 QApplication::postEvent (currentTreeWidget(), event); 865 dEvent->acceptProposedAction(); 903 866 } 867 return true; 868 break; 869 } 904 870 case VBoxDefs::AddVDMUrlsEventType: 905 871 { … … 918 884 } 919 885 920 /* @todo: Currently not used (Ported from Qt3): */921 void VBoxDiskImageManagerDlg::machineStateChanged (const VBoxMachineStateChangeEvent &aEvent)922 {923 /// @todo (r=dmik) IVirtualBoxCallback::OnMachineStateChange924 // must also expose the old state! In this case we won't need to cache925 // the state value in every class in GUI that uses this signal.926 927 switch (aEvent.state)928 {929 case KMachineState_PoweredOff:930 case KMachineState_Aborted:931 case KMachineState_Saved:932 case KMachineState_Starting:933 case KMachineState_Restoring:934 {935 refreshAll();936 break;937 }938 default:939 break;940 }941 }942 943 886 void VBoxDiskImageManagerDlg::mediaAdded (const VBoxMedia &aMedia) 944 887 { … … 947 890 return; 948 891 949 DiskImageItem *item = NULL;892 DiskImageItem *item = 0; 950 893 switch (aMedia.type) 951 894 { … … 993 936 return; 994 937 995 DiskImageItem *item = NULL;938 DiskImageItem *item = 0; 996 939 switch (aMedia.type) 997 940 { … … 1048 991 aType == VBoxDefs::CD ? mIconCD : 1049 992 aType == VBoxDefs::FD ? mIconFD : QIcon(); 1050 Assert (index != -1 && !set.isNull()); /* a type should be the correct one */1051 twImages->setTabIcon (index, set);993 Assert (index != -1 && !set.isNull()); /* aType should be the correct one */ 994 mTwImages->setTabIcon (index, set); 1052 995 } 1053 996 } … … 1056 999 { 1057 1000 /* Load default tab icons */ 1058 twImages->setTabIcon (HDTab, mIconHD);1059 twImages->setTabIcon (CDTab, mIconCD);1060 twImages->setTabIcon (FDTab, mIconFD);1001 mTwImages->setTabIcon (HDTab, mIconHD); 1002 mTwImages->setTabIcon (CDTab, mIconCD); 1003 mTwImages->setTabIcon (FDTab, mIconFD); 1061 1004 1062 1005 /* Load current media list */ … … 1144 1087 { 1145 1088 case VBoxDefs::HD: 1146 1147 1148 1149 1150 1151 1152 1153 1089 { 1090 filter = tr ("All hard disk images (*.vdi *.vmdk);;" 1091 "Virtual Disk images (*.vdi);;" 1092 "VMDK images (*.vmdk);;" 1093 "All files (*)"); 1094 title = tr ("Select a hard disk image file"); 1095 break; 1096 } 1154 1097 case VBoxDefs::CD: 1155 1156 1157 1158 1159 1160 1098 { 1099 filter = tr ("CD/DVD-ROM images (*.iso);;" 1100 "All files (*)"); 1101 title = tr ("Select a CD/DVD-ROM disk image file"); 1102 break; 1103 } 1161 1104 case VBoxDefs::FD: 1162 1163 1164 1165 1166 1167 1105 { 1106 filter = tr ("Floppy images (*.img);;" 1107 "All files (*)"); 1108 title = tr ("Select a floppy disk image file"); 1109 break; 1110 } 1168 1111 default: 1169 1112 AssertMsgFailed (("Selected tree should be equal to one item in VBoxDefs::DiskType.\n")); … … 1194 1137 { 1195 1138 case VBoxDefs::HD: 1139 { 1140 bool deleteImage = false; 1141 1142 /// @todo When creation of VMDK is implemented, we should 1143 /// enable image deletion for them as well (use 1144 /// GetStorageType() to define the correct cast). 1145 CHardDisk disk = item->media().disk; 1146 if (disk.GetStorageType() == KHardDiskStorageType_VirtualDiskImage && 1147 disk.GetParent().isNull() && /* must not be differencing (see below) */ 1148 item->status() == VBoxMedia::Ok) 1196 1149 { 1197 bool deleteImage = false; 1198 1150 int rc = vboxProblem().confirmHardDiskImageDeletion (this, src); 1151 if (rc == QIMessageBox::Cancel) 1152 return; 1153 deleteImage = rc == QIMessageBox::Yes; 1154 } 1155 else 1156 { 1157 /// @todo note that differencing images are always automatically 1158 /// deleted when unregistered, but the following message box 1159 /// doesn't mention it. I keep it as is for now because 1160 /// implementing the portability feature will most likely change 1161 /// this behavior (we'll update the message afterwards). 1162 if (!vboxProblem().confirmHardDiskUnregister (this, src)) 1163 return; 1164 } 1165 1166 CHardDisk hd = mVBox.UnregisterHardDisk (uuid); 1167 if (!mVBox.isOk()) 1168 vboxProblem().cannotUnregisterMedia (this, mVBox, type, src); 1169 else if (deleteImage) 1170 { 1199 1171 /// @todo When creation of VMDK is implemented, we should 1200 1172 /// enable image deletion for them as well (use 1201 1173 /// GetStorageType() to define the correct cast). 1202 CHardDisk disk = item->media().disk; 1203 if (disk.GetStorageType() == KHardDiskStorageType_VirtualDiskImage && 1204 disk.GetParent().isNull() && /* must not be differencing (see below) */ 1205 item->status() == VBoxMedia::Ok) 1206 { 1207 int rc = vboxProblem().confirmHardDiskImageDeletion (this, src); 1208 if (rc == QIMessageBox::Cancel) 1209 return; 1210 deleteImage = rc == QIMessageBox::Yes; 1211 } 1212 else 1213 { 1214 /// @todo note that differencing images are always automatically 1215 /// deleted when unregistered, but the following message box 1216 /// doesn't mention it. I keep it as is for now because 1217 /// implementing the portability feature will most likely change 1218 /// this behavior (we'll update the message afterwards). 1219 if (!vboxProblem().confirmHardDiskUnregister (this, src)) 1220 return; 1221 } 1222 1223 CHardDisk hd = mVBox.UnregisterHardDisk (uuid); 1224 if (!mVBox.isOk()) 1225 vboxProblem().cannotUnregisterMedia (this, mVBox, type, src); 1226 else if (deleteImage) 1227 { 1228 /// @todo When creation of VMDK is implemented, we should 1229 /// enable image deletion for them as well (use 1230 /// GetStorageType() to define the correct cast). 1231 CVirtualDiskImage vdi = CUnknown (hd); 1232 if (vdi.isOk()) 1233 vdi.DeleteImage(); 1234 if (!vdi.isOk()) 1235 vboxProblem().cannotDeleteHardDiskImage (this, vdi); 1236 } 1237 break; 1174 CVirtualDiskImage vdi = CUnknown (hd); 1175 if (vdi.isOk()) 1176 vdi.DeleteImage(); 1177 if (!vdi.isOk()) 1178 vboxProblem().cannotDeleteHardDiskImage (this, vdi); 1238 1179 } 1180 break; 1181 } 1239 1182 case VBoxDefs::CD: 1240 1183 mVBox.UnregisterDVDImage (uuid); … … 1267 1210 /* If it is a hard disk sub-item: */ 1268 1211 case VBoxDefs::HD: 1212 { 1213 CHardDisk hd = item->media().disk; 1214 QUuid machineId = hd.GetMachineId(); 1215 if (vboxProblem().confirmReleaseImage (this, 1216 mVBox.GetMachine (machineId).GetName())) 1269 1217 { 1270 CHardDisk hd = item->media().disk; 1271 QUuid machineId = hd.GetMachineId(); 1272 if (vboxProblem().confirmReleaseImage (this, 1273 mVBox.GetMachine (machineId).GetName())) 1274 { 1275 releaseDisk (machineId, itemId, VBoxDefs::HD); 1276 VBoxMedia media (item->media()); 1277 media.status = hd.GetAccessible() ? VBoxMedia::Ok : 1278 hd.isOk() ? VBoxMedia::Inaccessible : 1279 VBoxMedia::Error; 1280 vboxGlobal().updateMedia (media); 1281 } 1282 break; 1218 releaseDisk (machineId, itemId, VBoxDefs::HD); 1219 VBoxMedia media (item->media()); 1220 media.status = hd.GetAccessible() ? VBoxMedia::Ok : 1221 hd.isOk() ? VBoxMedia::Inaccessible : 1222 VBoxMedia::Error; 1223 vboxGlobal().updateMedia (media); 1283 1224 } 1225 break; 1226 } 1284 1227 /* If it is a cd/dvd sub-item: */ 1285 1228 case VBoxDefs::CD: 1229 { 1230 QString usage = item->totalUsage(); 1231 if (vboxProblem().confirmReleaseImage (this, usage)) 1286 1232 { 1287 QString usage = item->totalUsage(); 1288 if (vboxProblem().confirmReleaseImage (this, usage)) 1289 { 1290 QStringList permMachines = 1291 mVBox.GetDVDImageUsage (itemId, 1292 KResourceUsage_Permanent).split (' ', QString::SkipEmptyParts); 1293 for (QStringList::Iterator it = permMachines.begin(); 1294 it != permMachines.end(); ++it) 1295 releaseDisk (QUuid (*it), itemId, VBoxDefs::CD); 1296 1297 CDVDImage cd = mVBox.GetDVDImage (itemId); 1298 VBoxMedia media (item->media()); 1299 media.status = cd.GetAccessible() ? VBoxMedia::Ok : 1300 cd.isOk() ? VBoxMedia::Inaccessible : 1301 VBoxMedia::Error; 1302 vboxGlobal().updateMedia (media); 1303 } 1233 QStringList permMachines = 1234 mVBox.GetDVDImageUsage (itemId, 1235 KResourceUsage_Permanent).split (' ', QString::SkipEmptyParts); 1236 for (QStringList::Iterator it = permMachines.begin(); 1237 it != permMachines.end(); ++it) 1238 releaseDisk (QUuid (*it), itemId, VBoxDefs::CD); 1239 1240 CDVDImage cd = mVBox.GetDVDImage (itemId); 1241 VBoxMedia media (item->media()); 1242 media.status = cd.GetAccessible() ? VBoxMedia::Ok : 1243 cd.isOk() ? VBoxMedia::Inaccessible : 1244 VBoxMedia::Error; 1245 vboxGlobal().updateMedia (media); 1304 1246 } 1247 } 1305 1248 /* If it is a floppy sub-item: */ 1306 1249 case VBoxDefs::FD: 1250 { 1251 QString usage = item->totalUsage(); 1252 if (vboxProblem().confirmReleaseImage (this, usage)) 1307 1253 { 1308 QString usage = item->totalUsage(); 1309 if (vboxProblem().confirmReleaseImage (this, usage)) 1310 { 1311 QStringList permMachines = 1312 mVBox.GetFloppyImageUsage (itemId, 1313 KResourceUsage_Permanent).split (' ', QString::SkipEmptyParts); 1314 for (QStringList::Iterator it = permMachines.begin(); 1315 it != permMachines.end(); ++it) 1316 releaseDisk (QUuid (*it), itemId, VBoxDefs::FD); 1317 1318 CFloppyImage fd = mVBox.GetFloppyImage (itemId); 1319 VBoxMedia media (item->media()); 1320 media.status = fd.GetAccessible() ? VBoxMedia::Ok : 1321 fd.isOk() ? VBoxMedia::Inaccessible : 1322 VBoxMedia::Error; 1323 vboxGlobal().updateMedia (media); 1324 } 1254 QStringList permMachines = 1255 mVBox.GetFloppyImageUsage (itemId, 1256 KResourceUsage_Permanent).split (' ', QString::SkipEmptyParts); 1257 for (QStringList::Iterator it = permMachines.begin(); 1258 it != permMachines.end(); ++it) 1259 releaseDisk (QUuid (*it), itemId, VBoxDefs::FD); 1260 1261 CFloppyImage fd = mVBox.GetFloppyImage (itemId); 1262 VBoxMedia media (item->media()); 1263 media.status = fd.GetAccessible() ? VBoxMedia::Ok : 1264 fd.isOk() ? VBoxMedia::Inaccessible : 1265 VBoxMedia::Error; 1266 vboxGlobal().updateMedia (media); 1325 1267 } 1268 } 1326 1269 default: 1327 1270 AssertMsgFailed (("Selected tree should be equal to one item in VBoxDefs::DiskType.\n")); … … 1396 1339 QTreeWidget* VBoxDiskImageManagerDlg::treeWidget (VBoxDefs::DiskType aType) const 1397 1340 { 1398 QTreeWidget* tree = NULL;1341 QTreeWidget* tree = 0; 1399 1342 switch (aType) 1400 1343 { … … 1418 1361 { 1419 1362 VBoxDefs::DiskType type = VBoxDefs::InvalidType; 1420 switch ( twImages->currentIndex ())1363 switch (mTwImages->currentIndex ()) 1421 1364 { 1422 1365 case HDTab: … … 1430 1373 break; 1431 1374 default: 1432 AssertMsgFailed (("Page type %d unknown!\n", twImages->currentIndex ()));1375 AssertMsgFailed (("Page type %d unknown!\n", mTwImages->currentIndex ())); 1433 1376 break; 1434 1377 } … … 1450 1393 return selItems.first(); 1451 1394 else 1452 return NULL;1395 return 0; 1453 1396 } 1454 1397 … … 1457 1400 { 1458 1401 /* Convert the QTreeWidgetItem to a DiskImageItem if it is valid. */ 1459 DiskImageItem *item = NULL;1402 DiskImageItem *item = 0; 1460 1403 if (aItem && 1461 1404 aItem->type() == QITreeWidget::BasicItemType) 1462 item = static_cast <DiskImageItem 1405 item = static_cast <DiskImageItem*> (aItem); 1463 1406 1464 1407 return item; … … 1480 1423 QTreeWidget *tree = currentTreeWidget(); 1481 1424 tree->setFocus(); 1482 1483 /* Tab stop setup */1484 setTabOrder (mHdsTree, mHdsPane1);1485 setTabOrder (mHdsPane1, mHdsPane2);1486 setTabOrder (mHdsPane2, mHdsPane3);1487 setTabOrder (mHdsPane3, mHdsPane4);1488 setTabOrder (mHdsPane4, mHdsPane5);1489 1490 setTabOrder (mCdsTree, mCdsPane1);1491 setTabOrder (mCdsPane1, mCdsPane2);1492 1493 setTabOrder (mFdsTree, mFdsPane1);1494 setTabOrder (mFdsPane1, mFdsPane2);1495 1496 1425 processCurrentChanged (tree->currentItem()); 1497 1426 } 1498 1427 1499 void VBoxDiskImageManagerDlg::processCurrentChanged (QTreeWidgetItem *aItem, QTreeWidgetItem *aPrevItem /* = NULL */) 1428 void VBoxDiskImageManagerDlg::processCurrentChanged (QTreeWidgetItem *aItem, 1429 QTreeWidgetItem *aPrevItem /* = 0 */) 1500 1430 { 1501 1431 DiskImageItem *item = toDiskImageItem (aItem); … … 1569 1499 else 1570 1500 clearInfoPanes(); 1501 1502 mHdsContainer->setEnabled (item); 1503 mCdsContainer->setEnabled (item); 1504 mFdsContainer->setEnabled (item); 1571 1505 } 1572 1506 … … 1663 1597 const VBoxMedia &aMedia) const 1664 1598 { 1665 Assert (!(aTree == NULL && aRoot == NULL));1666 1667 DiskImageItem *item = NULL;1599 Assert (!(aTree == 0 && aRoot == 0)); 1600 1601 DiskImageItem *item = 0; 1668 1602 1669 1603 if (aRoot) … … 1822 1756 { 1823 1757 if (aId.isNull()) 1824 return NULL;1758 return 0; 1825 1759 1826 1760 DiskImageItemIterator iterator (aTree); … … 1829 1763 if ((*iterator)->uuid() == aId) 1830 1764 return *iterator; 1831 ++ iterator;1832 } 1833 return NULL;1765 ++ iterator; 1766 } 1767 return 0; 1834 1768 } 1835 1769 … … 1842 1776 if ((*iterator)->status() == aStatus) 1843 1777 return *iterator; 1844 ++ iterator;1845 } 1846 return NULL;1778 ++ iterator; 1779 } 1780 return 0; 1847 1781 } 1848 1782 … … 1856 1790 { 1857 1791 case VBoxDefs::HD: 1858 { 1859 CHardDisk hd = aItem->media().disk; 1860 QUuid machineId = hd.GetMachineId(); 1861 if (machineId.isNull() || 1862 (mVBox.GetMachine (machineId).GetState() != KMachineState_PoweredOff && 1863 mVBox.GetMachine (machineId).GetState() != KMachineState_Aborted)) 1792 { 1793 CHardDisk hd = aItem->media().disk; 1794 QUuid machineId = hd.GetMachineId(); 1795 if (machineId.isNull() || 1796 (mVBox.GetMachine (machineId).GetState() != KMachineState_PoweredOff && 1797 mVBox.GetMachine (machineId).GetState() != KMachineState_Aborted)) 1798 return false; 1799 break; 1800 } 1801 case VBoxDefs::CD: 1802 { 1803 /* Check if there is temporary usage: */ 1804 QStringList tempMachines = 1805 mVBox.GetDVDImageUsage (itemId, 1806 KResourceUsage_Temporary).split (' ', QString::SkipEmptyParts); 1807 if (!tempMachines.isEmpty()) 1808 return false; 1809 /* Only permanently mounted .iso could be released */ 1810 QStringList permMachines = 1811 mVBox.GetDVDImageUsage (itemId, 1812 KResourceUsage_Permanent).split (' ', QString::SkipEmptyParts); 1813 for (QStringList::Iterator it = permMachines.begin(); 1814 it != permMachines.end(); ++it) 1815 if (mVBox.GetMachine(QUuid (*it)).GetState() != KMachineState_PoweredOff && 1816 mVBox.GetMachine(QUuid (*it)).GetState() != KMachineState_Aborted) 1864 1817 return false; 1865 break; 1866 } 1867 case VBoxDefs::CD: 1868 { 1869 /* Check if there is temporary usage: */ 1870 QStringList tempMachines = 1871 mVBox.GetDVDImageUsage (itemId, 1872 KResourceUsage_Temporary).split (' ', QString::SkipEmptyParts); 1873 if (!tempMachines.isEmpty()) 1818 break; 1819 } 1820 case VBoxDefs::FD: 1821 { 1822 /* Check if there is temporary usage: */ 1823 QStringList tempMachines = 1824 mVBox.GetFloppyImageUsage (itemId, 1825 KResourceUsage_Temporary).split (' ', QString::SkipEmptyParts); 1826 if (!tempMachines.isEmpty()) 1827 return false; 1828 /* Only permanently mounted floppies could be released */ 1829 QStringList permMachines = 1830 mVBox.GetFloppyImageUsage (itemId, 1831 KResourceUsage_Permanent).split (' ', QString::SkipEmptyParts); 1832 for (QStringList::Iterator it = permMachines.begin(); 1833 it != permMachines.end(); ++it) 1834 if (mVBox.GetMachine(QUuid (*it)).GetState() != KMachineState_PoweredOff && 1835 mVBox.GetMachine(QUuid (*it)).GetState() != KMachineState_Aborted) 1874 1836 return false; 1875 /* Only permanently mounted .iso could be released */ 1876 QStringList permMachines = 1877 mVBox.GetDVDImageUsage (itemId, 1878 KResourceUsage_Permanent).split (' ', QString::SkipEmptyParts); 1879 for (QStringList::Iterator it = permMachines.begin(); 1880 it != permMachines.end(); ++it) 1881 if (mVBox.GetMachine(QUuid (*it)).GetState() != KMachineState_PoweredOff && 1882 mVBox.GetMachine(QUuid (*it)).GetState() != KMachineState_Aborted) 1883 return false; 1884 break; 1885 } 1886 case VBoxDefs::FD: 1887 { 1888 /* Check if there is temporary usage: */ 1889 QStringList tempMachines = 1890 mVBox.GetFloppyImageUsage (itemId, 1891 KResourceUsage_Temporary).split (' ', QString::SkipEmptyParts); 1892 if (!tempMachines.isEmpty()) 1893 return false; 1894 /* Only permanently mounted floppies could be released */ 1895 QStringList permMachines = 1896 mVBox.GetFloppyImageUsage (itemId, 1897 KResourceUsage_Permanent).split (' ', QString::SkipEmptyParts); 1898 for (QStringList::Iterator it = permMachines.begin(); 1899 it != permMachines.end(); ++it) 1900 if (mVBox.GetMachine(QUuid (*it)).GetState() != KMachineState_PoweredOff && 1901 mVBox.GetMachine(QUuid (*it)).GetState() != KMachineState_Aborted) 1902 return false; 1903 break; 1904 } 1837 break; 1838 } 1905 1839 default: 1906 1907 1908 1909 1840 { 1841 return false; 1842 break; 1843 } 1910 1844 } 1911 1845 return true; … … 2001 1935 } 2002 1936 2003 void VBoxDiskImageManagerDlg::createInfoString (InfoPaneLabel *&aInfo,2004 QWidget *aRoot,2005 bool aLeftRightMargin,2006 int aRow, int aCol,2007 int aRowSpan /* = 1 */, int aColSpan /* = 1 */) const2008 {2009 /* Create the label & the info pane itself */2010 QLabel *nameLabel = new QLabel (aRoot);2011 aInfo = new InfoPaneLabel (aRoot, nameLabel);2012 2013 /* We would the full size selection mode */2014 aInfo->setFullSizeSelection (true);2015 2016 /* Prevent the name columns from being expanded */2017 nameLabel->setSizePolicy (QSizePolicy::Fixed, QSizePolicy::Fixed);2018 2019 QGridLayout *rootLayout = qobject_cast<QGridLayout*> (aRoot->layout());2020 Assert (VALID_PTR (rootLayout));2021 2022 /* Add the two widgets */2023 rootLayout->addWidget (nameLabel, aRow, aCol, 1, 1);2024 int margin = aInfo->style()->pixelMetric (QStyle::PM_LayoutHorizontalSpacing);2025 #if QT_VERSION >= 0x0403002026 if (margin == -1)2027 margin = aInfo->style()->layoutSpacing (QSizePolicy::Label, QSizePolicy::Label, Qt::Horizontal);2028 #endif /* QT_VERSION >= 0x040300 */2029 if (aLeftRightMargin)2030 aInfo->setContentsMargins (margin, 0, margin, 0);2031 else2032 aInfo->setContentsMargins (margin, 0, 0, 0);2033 rootLayout->addWidget (aInfo, aRow, aCol + 1, aRowSpan, aColSpan);2034 }2035 2036 1937 void VBoxDiskImageManagerDlg::makeWarningMark (DiskImageItem *aItem, 2037 1938 VBoxMedia::Status aStatus, … … 2049 1950 aType == VBoxDefs::FD ? FDTab : -1; 2050 1951 Assert (index != -1); /* aType should be correct */ 2051 twImages->setTabIcon (index, icon);1952 mTwImages->setTabIcon (index, icon); 2052 1953 aItem->treeWidget()->scrollToItem (aItem, QAbstractItemView::EnsureVisible); 2053 1954 } … … 2067 1968 2068 1969 for (QStringList::Iterator it = permMachines.begin(); 2069 it != permMachines.end(); 2070 ++it) 1970 it != permMachines.end(); ++ it) 2071 1971 { 2072 1972 if (!usage.isEmpty()) … … 2080 1980 2081 1981 for (QStringList::Iterator it = tempMachines.begin(); 2082 it != tempMachines.end(); 2083 ++it) 1982 it != tempMachines.end(); ++ it) 2084 1983 { 2085 1984 /* Skip IDs that are in the permanent list */ … … 2114 2013 2115 2014 for (QStringList::Iterator it = permMachines.begin(); 2116 it != permMachines.end(); 2117 ++it) 2015 it != permMachines.end(); ++ it) 2118 2016 { 2119 2017 if (!usage.isEmpty()) … … 2127 2025 2128 2026 for (QStringList::Iterator it = tempMachines.begin(); 2129 it != tempMachines.end(); 2130 ++it) 2027 it != tempMachines.end(); ++ it) 2131 2028 { 2132 2029 /* Skip IDs that are in the permanent list */ … … 2186 2083 } 2187 2084 2085 #include "VBoxDiskImageManagerDlg.moc" 2086 -
trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxDiskImageManagerDlg.ui
r9868 r11344 39 39 <iconset resource="../VirtualBox.qrc" >:/diskim_16px.png</iconset> 40 40 </property> 41 <widget class="QWidget" name=" centralwidget" >41 <widget class="QWidget" name="mCentralWidget" > 42 42 <layout class="QHBoxLayout" > 43 43 <item> 44 44 <layout class="QVBoxLayout" > 45 45 <item> 46 <widget class="QTabWidget" name=" twImages" >46 <widget class="QTabWidget" name="mTwImages" > 47 47 <property name="sizePolicy" > 48 48 <sizepolicy vsizetype="Expanding" hsizetype="Preferred" > … … 54 54 <number>0</number> 55 55 </property> 56 <widget class="QWidget" name=" tbHardDisk" >56 <widget class="QWidget" name="mTbHD" > 57 57 <attribute name="title" > 58 <string> &HardDisks</string>58 <string>Hard &Disks</string> 59 59 </attribute> 60 60 <layout class="QVBoxLayout" > … … 101 101 <enum>QFrame::Sunken</enum> 102 102 </property> 103 <layout class="QGridLayout" > 104 <property name="leftMargin" > 105 <number>5</number> 106 </property> 107 <property name="topMargin" > 108 <number>5</number> 109 </property> 110 <property name="rightMargin" > 111 <number>5</number> 112 </property> 113 <property name="bottomMargin" > 114 <number>5</number> 115 </property> 116 <property name="verticalSpacing" > 117 <number>0</number> 118 </property> 119 <item row="0" column="0" > 120 <widget class="QLabel" name="mLbHD1" > 121 <property name="text" > 122 <string><nobr>Location:</nobr></string> 123 </property> 124 </widget> 125 </item> 126 <item row="0" column="1" colspan="3" > 127 <widget class="QILabel" name="mHdsPane1" > 128 <property name="sizePolicy" > 129 <sizepolicy vsizetype="Preferred" hsizetype="MinimumExpanding" > 130 <horstretch>0</horstretch> 131 <verstretch>0</verstretch> 132 </sizepolicy> 133 </property> 134 </widget> 135 </item> 136 <item row="1" column="0" > 137 <widget class="QLabel" name="mLbHD2" > 138 <property name="text" > 139 <string><nobr>Disk Type:</nobr></string> 140 </property> 141 </widget> 142 </item> 143 <item row="1" column="1" > 144 <widget class="QILabel" name="mHdsPane2" > 145 <property name="sizePolicy" > 146 <sizepolicy vsizetype="Preferred" hsizetype="MinimumExpanding" > 147 <horstretch>0</horstretch> 148 <verstretch>0</verstretch> 149 </sizepolicy> 150 </property> 151 </widget> 152 </item> 153 <item row="1" column="2" > 154 <widget class="QLabel" name="mLbHD3" > 155 <property name="text" > 156 <string><nobr>&nbsp;&nbsp;Storage Type:</nobr></string> 157 </property> 158 </widget> 159 </item> 160 <item row="1" column="3" > 161 <widget class="QILabel" name="mHdsPane3" > 162 <property name="sizePolicy" > 163 <sizepolicy vsizetype="Preferred" hsizetype="MinimumExpanding" > 164 <horstretch>0</horstretch> 165 <verstretch>0</verstretch> 166 </sizepolicy> 167 </property> 168 </widget> 169 </item> 170 <item row="2" column="0" > 171 <widget class="QLabel" name="mLbHD4" > 172 <property name="text" > 173 <string><nobr>Attached to:</nobr></string> 174 </property> 175 </widget> 176 </item> 177 <item row="2" column="1" > 178 <widget class="QILabel" name="mHdsPane4" > 179 <property name="sizePolicy" > 180 <sizepolicy vsizetype="Preferred" hsizetype="MinimumExpanding" > 181 <horstretch>0</horstretch> 182 <verstretch>0</verstretch> 183 </sizepolicy> 184 </property> 185 </widget> 186 </item> 187 <item row="2" column="2" > 188 <widget class="QLabel" name="mLbHD5" > 189 <property name="text" > 190 <string><nobr>&nbsp;&nbsp;Snapshot:</nobr></string> 191 </property> 192 </widget> 193 </item> 194 <item row="2" column="3" > 195 <widget class="QILabel" name="mHdsPane5" > 196 <property name="sizePolicy" > 197 <sizepolicy vsizetype="Preferred" hsizetype="MinimumExpanding" > 198 <horstretch>0</horstretch> 199 <verstretch>0</verstretch> 200 </sizepolicy> 201 </property> 202 </widget> 203 </item> 204 </layout> 103 205 </widget> 104 206 </item> 105 207 </layout> 106 208 </widget> 107 <widget class="QWidget" name=" tbCD" >209 <widget class="QWidget" name="mTbCD" > 108 210 <attribute name="title" > 109 211 <string>&CD/DVD Images</string> … … 147 249 <enum>QFrame::Sunken</enum> 148 250 </property> 251 <layout class="QGridLayout" > 252 <property name="leftMargin" > 253 <number>5</number> 254 </property> 255 <property name="topMargin" > 256 <number>5</number> 257 </property> 258 <property name="rightMargin" > 259 <number>5</number> 260 </property> 261 <property name="bottomMargin" > 262 <number>5</number> 263 </property> 264 <property name="verticalSpacing" > 265 <number>0</number> 266 </property> 267 <item row="0" column="0" > 268 <widget class="QLabel" name="mLbCD1" > 269 <property name="text" > 270 <string><nobr>Location:</nobr></string> 271 </property> 272 </widget> 273 </item> 274 <item row="0" column="1" > 275 <widget class="QILabel" name="mCdsPane1" > 276 <property name="sizePolicy" > 277 <sizepolicy vsizetype="Preferred" hsizetype="MinimumExpanding" > 278 <horstretch>0</horstretch> 279 <verstretch>0</verstretch> 280 </sizepolicy> 281 </property> 282 </widget> 283 </item> 284 <item row="1" column="0" > 285 <widget class="QLabel" name="mLbCD2" > 286 <property name="text" > 287 <string><nobr>Attached to:</nobr></string> 288 </property> 289 </widget> 290 </item> 291 <item row="1" column="1" > 292 <widget class="QILabel" name="mCdsPane2" > 293 <property name="sizePolicy" > 294 <sizepolicy vsizetype="Preferred" hsizetype="MinimumExpanding" > 295 <horstretch>0</horstretch> 296 <verstretch>0</verstretch> 297 </sizepolicy> 298 </property> 299 </widget> 300 </item> 301 </layout> 149 302 </widget> 150 303 </item> 151 304 </layout> 152 305 </widget> 153 <widget class="QWidget" name=" tbFloppy" >306 <widget class="QWidget" name="mTbFD" > 154 307 <attribute name="title" > 155 308 <string>&Floppy Images</string> … … 193 346 <enum>QFrame::Sunken</enum> 194 347 </property> 348 <layout class="QGridLayout" > 349 <property name="leftMargin" > 350 <number>5</number> 351 </property> 352 <property name="topMargin" > 353 <number>5</number> 354 </property> 355 <property name="rightMargin" > 356 <number>5</number> 357 </property> 358 <property name="bottomMargin" > 359 <number>5</number> 360 </property> 361 <property name="horizontalSpacing" > 362 <number>-1</number> 363 </property> 364 <property name="verticalSpacing" > 365 <number>0</number> 366 </property> 367 <item row="0" column="0" > 368 <widget class="QLabel" name="mLbFD1" > 369 <property name="text" > 370 <string><nobr>Location:</nobr></string> 371 </property> 372 </widget> 373 </item> 374 <item row="0" column="1" > 375 <widget class="QILabel" name="mFdsPane1" > 376 <property name="sizePolicy" > 377 <sizepolicy vsizetype="Preferred" hsizetype="MinimumExpanding" > 378 <horstretch>0</horstretch> 379 <verstretch>0</verstretch> 380 </sizepolicy> 381 </property> 382 </widget> 383 </item> 384 <item row="1" column="0" > 385 <widget class="QLabel" name="mLbFD2" > 386 <property name="text" > 387 <string><nobr>Attached to:</nobr></string> 388 </property> 389 </widget> 390 </item> 391 <item row="1" column="1" > 392 <widget class="QILabel" name="mFdsPane2" > 393 <property name="sizePolicy" > 394 <sizepolicy vsizetype="Preferred" hsizetype="MinimumExpanding" > 395 <horstretch>0</horstretch> 396 <verstretch>0</verstretch> 397 </sizepolicy> 398 </property> 399 </widget> 400 </item> 401 </layout> 195 402 </widget> 196 403 </item> … … 210 417 </layout> 211 418 </widget> 212 <widget class="QStatusBar" name=" statusBar" />419 <widget class="QStatusBar" name="mStatusBar" /> 213 420 </widget> 214 421 <customwidgets> … … 223 430 <header>QITreeWidget.h</header> 224 431 </customwidget> 432 <customwidget> 433 <class>QILabel</class> 434 <extends>QLabel</extends> 435 <header>QILabel.h</header> 436 </customwidget> 225 437 </customwidgets> 226 438 <resources>
Note:
See TracChangeset
for help on using the changeset viewer.