儲存庫 vbox 的更動 62365
- 時間撮記:
- 2016-7-20 下午03:55:36 (8 年 以前)
- 位置:
- trunk/src/VBox/Frontends/VirtualBox/src
- 檔案:
-
- 修改 3 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendGlobal.cpp
r61210 r62365 1587 1587 { 1588 1588 QString strResult; 1589 /* Reusing translations from 'DetailsElementType': */1590 1589 switch (informationElementType) 1591 1590 { 1592 case InformationElementType_General: strResult = QApplication::translate("VBoxGlobal", "General", " DetailsElementType"); break;1593 case InformationElementType_Preview: strResult = QApplication::translate("VBoxGlobal", "Preview", " DetailsElementType"); break;1594 case InformationElementType_System: strResult = QApplication::translate("VBoxGlobal", "System", " DetailsElementType"); break;1595 case InformationElementType_Display: strResult = QApplication::translate("VBoxGlobal", "Display", " DetailsElementType"); break;1596 case InformationElementType_Storage: strResult = QApplication::translate("VBoxGlobal", "Storage", " DetailsElementType"); break;1597 case InformationElementType_Audio: strResult = QApplication::translate("VBoxGlobal", "Audio", " DetailsElementType"); break;1598 case InformationElementType_Network: strResult = QApplication::translate("VBoxGlobal", "Network", " DetailsElementType"); break;1599 case InformationElementType_Serial: strResult = QApplication::translate("VBoxGlobal", "Serial ports", " DetailsElementType"); break;1591 case InformationElementType_General: strResult = QApplication::translate("VBoxGlobal", "General", "InformationElementType"); break; 1592 case InformationElementType_Preview: strResult = QApplication::translate("VBoxGlobal", "Preview", "InformationElementType"); break; 1593 case InformationElementType_System: strResult = QApplication::translate("VBoxGlobal", "System", "InformationElementType"); break; 1594 case InformationElementType_Display: strResult = QApplication::translate("VBoxGlobal", "Display", "InformationElementType"); break; 1595 case InformationElementType_Storage: strResult = QApplication::translate("VBoxGlobal", "Storage", "InformationElementType"); break; 1596 case InformationElementType_Audio: strResult = QApplication::translate("VBoxGlobal", "Audio", "InformationElementType"); break; 1597 case InformationElementType_Network: strResult = QApplication::translate("VBoxGlobal", "Network", "InformationElementType"); break; 1598 case InformationElementType_Serial: strResult = QApplication::translate("VBoxGlobal", "Serial ports", "InformationElementType"); break; 1600 1599 #ifdef VBOX_WITH_PARALLEL_PORTS 1601 case InformationElementType_Parallel: strResult = QApplication::translate("VBoxGlobal", "Parallel ports", " DetailsElementType"); break;1600 case InformationElementType_Parallel: strResult = QApplication::translate("VBoxGlobal", "Parallel ports", "InformationElementType"); break; 1602 1601 #endif /* VBOX_WITH_PARALLEL_PORTS */ 1603 case InformationElementType_USB: strResult = QApplication::translate("VBoxGlobal", "USB", "DetailsElementType"); break; 1604 case InformationElementType_SF: strResult = QApplication::translate("VBoxGlobal", "Shared folders", "DetailsElementType"); break; 1605 case InformationElementType_UI: strResult = QApplication::translate("VBoxGlobal", "User interface", "DetailsElementType"); break; 1606 case InformationElementType_Description: strResult = QApplication::translate("VBoxGlobal", "Description", "DetailsElementType"); break; 1607 case InformationElementType_RuntimeAttributes: strResult = QApplication::translate("VBoxGlobal", "RuntimeAttributes", "DetailsElementType"); break; 1602 case InformationElementType_USB: strResult = QApplication::translate("VBoxGlobal", "USB", "InformationElementType"); break; 1603 case InformationElementType_SharedFolders: strResult = QApplication::translate("VBoxGlobal", "Shared folders", "InformationElementType"); break; 1604 case InformationElementType_UI: strResult = QApplication::translate("VBoxGlobal", "User interface", "InformationElementType"); break; 1605 case InformationElementType_Description: strResult = QApplication::translate("VBoxGlobal", "Description", "InformationElementType"); break; 1606 case InformationElementType_RuntimeAttributes: strResult = QApplication::translate("VBoxGlobal", "Runtime Attributes", "InformationElementType"); break; 1607 case InformationElementType_StorageStatistics: strResult = QApplication::translate("VBoxGlobal", "Storage statistics", "InformationElementType"); break; 1608 case InformationElementType_NetworkStatistics: strResult = QApplication::translate("VBoxGlobal", "Network Statistics", "InformationElementType"); break; 1608 1609 default: 1609 1610 { … … 1620 1621 /* Here we have some fancy stuff allowing us 1621 1622 * to search through the keys using 'case-insensitive' rule: */ 1622 QStringList keys; QList<InformationElementType> values; 1623 /* Reusing translations from 'DetailsElementType': */ 1624 keys << QApplication::translate("VBoxGlobal", "General", "DetailsElementType"); values << InformationElementType_General; 1625 keys << QApplication::translate("VBoxGlobal", "Preview", "DetailsElementType"); values << InformationElementType_Preview; 1626 keys << QApplication::translate("VBoxGlobal", "System", "DetailsElementType"); values << InformationElementType_System; 1627 keys << QApplication::translate("VBoxGlobal", "Display", "DetailsElementType"); values << InformationElementType_Display; 1628 keys << QApplication::translate("VBoxGlobal", "Storage", "DetailsElementType"); values << InformationElementType_Storage; 1629 keys << QApplication::translate("VBoxGlobal", "Audio", "DetailsElementType"); values << InformationElementType_Audio; 1630 keys << QApplication::translate("VBoxGlobal", "Network", "DetailsElementType"); values << InformationElementType_Network; 1631 keys << QApplication::translate("VBoxGlobal", "Serial ports", "DetailsElementType"); values << InformationElementType_Serial; 1623 QStringList keys; QList<InformationElementType> values; 1624 keys << QApplication::translate("VBoxGlobal", "General", "InformationElementType"); values << InformationElementType_General; 1625 keys << QApplication::translate("VBoxGlobal", "Preview", "InformationElementType"); values << InformationElementType_Preview; 1626 keys << QApplication::translate("VBoxGlobal", "System", "InformationElementType"); values << InformationElementType_System; 1627 keys << QApplication::translate("VBoxGlobal", "Display", "InformationElementType"); values << InformationElementType_Display; 1628 keys << QApplication::translate("VBoxGlobal", "Storage", "InformationElementType"); values << InformationElementType_Storage; 1629 keys << QApplication::translate("VBoxGlobal", "Audio", "InformationElementType"); values << InformationElementType_Audio; 1630 keys << QApplication::translate("VBoxGlobal", "Network", "InformationElementType"); values << InformationElementType_Network; 1631 keys << QApplication::translate("VBoxGlobal", "Serial ports", "InformationElementType"); values << InformationElementType_Serial; 1632 1632 #ifdef VBOX_WITH_PARALLEL_PORTS 1633 keys << QApplication::translate("VBoxGlobal", "Parallel ports", " DetailsElementType");values << InformationElementType_Parallel;1633 keys << QApplication::translate("VBoxGlobal", "Parallel ports", "InformationElementType"); values << InformationElementType_Parallel; 1634 1634 #endif /* VBOX_WITH_PARALLEL_PORTS */ 1635 keys << QApplication::translate("VBoxGlobal", "USB", "DetailsElementType"); values << InformationElementType_USB; 1636 keys << QApplication::translate("VBoxGlobal", "Shared folders", "DetailsElementType"); values << InformationElementType_SF; 1637 keys << QApplication::translate("VBoxGlobal", "User interface", "DetailsElementType"); values << InformationElementType_UI; 1638 keys << QApplication::translate("VBoxGlobal", "Description", "DetailsElementType"); values << InformationElementType_Description; 1639 keys << QApplication::translate("VBoxGlobal", "RuntimeAttributes", "DetailsElementType"); values << InformationElementType_RuntimeAttributes; 1635 keys << QApplication::translate("VBoxGlobal", "USB", "InformationElementType"); values << InformationElementType_USB; 1636 keys << QApplication::translate("VBoxGlobal", "Shared folders", "InformationElementType"); values << InformationElementType_SharedFolders; 1637 keys << QApplication::translate("VBoxGlobal", "User interface", "InformationElementType"); values << InformationElementType_UI; 1638 keys << QApplication::translate("VBoxGlobal", "Description", "InformationElementType"); values << InformationElementType_Description; 1639 keys << QApplication::translate("VBoxGlobal", "Runtime Attributes", "InformationElementType"); values << InformationElementType_RuntimeAttributes; 1640 keys << QApplication::translate("VBoxGlobal", "Storage statistics", "InformationElementType"); values << InformationElementType_StorageStatistics; 1641 keys << QApplication::translate("VBoxGlobal", "Network Statistics", "InformationElementType"); values << InformationElementType_NetworkStatistics; 1640 1642 /* Invalid type for unknown words: */ 1641 1643 if (!keys.contains(strInformationElementType, Qt::CaseInsensitive)) … … 1663 1665 #endif /* VBOX_WITH_PARALLEL_PORTS */ 1664 1666 case InformationElementType_USB: strResult = "usb"; break; 1665 case InformationElementType_S F:strResult = "sharedFolders"; break;1667 case InformationElementType_SharedFolders: strResult = "sharedFolders"; break; 1666 1668 case InformationElementType_UI: strResult = "userInterface"; break; 1667 1669 case InformationElementType_Description: strResult = "description"; break; … … 1694 1696 #endif /* VBOX_WITH_PARALLEL_PORTS */ 1695 1697 keys << "usb"; values << InformationElementType_USB; 1696 keys << "sharedFolders"; values << InformationElementType_S F;1698 keys << "sharedFolders"; values << InformationElementType_SharedFolders; 1697 1699 keys << "userInterface"; values << InformationElementType_UI; 1698 1700 keys << "description"; values << InformationElementType_Description; … … 1722 1724 #endif /* VBOX_WITH_PARALLEL_PORTS */ 1723 1725 case InformationElementType_USB: return UIIconPool::iconSet(":/usb_16px.png"); 1724 case InformationElementType_S F:return UIIconPool::iconSet(":/sf_16px.png");1726 case InformationElementType_SharedFolders: return UIIconPool::iconSet(":/sf_16px.png"); 1725 1727 case InformationElementType_UI: return UIIconPool::iconSet(":/interface_16px.png"); 1726 1728 case InformationElementType_Description: return UIIconPool::iconSet(":/description_16px.png"); 1727 1729 case InformationElementType_RuntimeAttributes: return UIIconPool::iconSet(":/state_running_16px.png"); 1730 case InformationElementType_StorageStatistics: return UIIconPool::iconSet(":/hd_16px.png"); 1731 case InformationElementType_NetworkStatistics: return UIIconPool::iconSet(":/nw_16px.png"); 1728 1732 default: 1729 1733 { -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.h
r61210 r62365 691 691 #endif /* VBOX_WITH_PARALLEL_PORTS */ 692 692 InformationElementType_USB, 693 InformationElementType_S F,693 InformationElementType_SharedFolders, 694 694 InformationElementType_UI, 695 695 InformationElementType_Description, 696 InformationElementType_SharedFolders,697 696 InformationElementType_RuntimeAttributes, 698 697 InformationElementType_StorageStatistics, -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/UIInformationDataItem.cpp
r61999 r62365 73 73 QVariant UIInformationDataItem::data(const QModelIndex &index, int role) const 74 74 { 75 Q_UNUSED(index); 76 Q_UNUSED(role); 75 switch (role) 76 { 77 case Qt::DisplayRole: 78 { 79 return gpConverter->toString(m_type); 80 } 81 break; 82 83 case Qt::UserRole + 2: 84 { 85 return m_type; 86 } 87 break; 88 89 default: 90 break; 91 } 92 77 93 /* Return null QVariant by default: */ 78 94 return QVariant(); … … 88 104 switch (role) 89 105 { 90 case Qt::DisplayRole:91 {92 return tr("General", "details report");93 }94 break;95 96 106 case Qt::DecorationRole: 97 107 { … … 109 119 break; 110 120 111 case Qt::UserRole + 2: 112 { 113 return m_type; 114 } 115 break; 116 117 default: 118 break; 119 } 120 return QVariant(); 121 default: 122 break; 123 } 124 125 /* Call to base-class: */ 126 return UIInformationDataItem::data(index, role); 121 127 } 122 128 … … 130 136 switch (role) 131 137 { 132 case Qt::DisplayRole:133 {134 return tr("System", "details report");135 }136 break;137 138 138 case Qt::DecorationRole: 139 139 { … … 208 208 break; 209 209 210 case Qt::UserRole + 2: 211 { 212 return m_type; 213 } 214 break; 215 216 default: 217 break; 218 } 219 return QVariant(); 210 default: 211 break; 212 } 213 214 /* Call to base-class: */ 215 return UIInformationDataItem::data(index, role); 220 216 } 221 217 … … 229 225 switch (role) 230 226 { 231 case Qt::DisplayRole:232 {233 return tr("Display", "details report");234 }235 break;236 237 227 case Qt::DecorationRole: 238 228 { … … 277 267 break; 278 268 279 case Qt::UserRole + 2: 280 { 281 return m_type; 282 } 283 break; 284 285 default: 286 break; 287 } 288 return QVariant(); 269 default: 270 break; 271 } 272 273 /* Call to base-class: */ 274 return UIInformationDataItem::data(index, role); 289 275 } 290 276 … … 298 284 switch (role) 299 285 { 300 case Qt::DisplayRole:301 {302 return tr("Storage");303 }304 break;305 286 306 287 case Qt::DecorationRole: … … 350 331 break; 351 332 352 case Qt::UserRole+2: 353 { 354 return m_type; 355 } 356 break; 357 358 default: 359 break; 360 } 361 return QVariant(); 333 default: 334 break; 335 } 336 337 /* Call to base-class: */ 338 return UIInformationDataItem::data(index, role); 362 339 } 363 340 … … 371 348 switch (role) 372 349 { 373 case Qt::DisplayRole:374 {375 return tr("Audio");376 }377 break;378 379 350 case Qt::DecorationRole: 380 351 { … … 398 369 break; 399 370 400 case Qt::UserRole + 2: 401 { 402 return m_type; 403 } 404 break; 405 406 default: 407 break; 408 } 409 return QVariant(); 371 default: 372 break; 373 } 374 375 /* Call to base-class: */ 376 return UIInformationDataItem::data(index, role); 410 377 } 411 378 … … 419 386 switch (role) 420 387 { 421 case Qt::DisplayRole:422 {423 return tr("Network");424 }425 break;426 427 388 case Qt::DecorationRole: 428 389 { … … 473 434 break; 474 435 475 case Qt::UserRole + 2: 476 { 477 return m_type; 478 } 479 break; 480 481 default: 482 break; 483 } 484 return QVariant(); 436 default: 437 break; 438 } 439 440 /* Call to base-class: */ 441 return UIInformationDataItem::data(index, role); 485 442 } 486 443 … … 494 451 switch (role) 495 452 { 496 case Qt::DisplayRole:497 {498 return tr("Serial Ports");499 }500 break;501 502 453 case Qt::DecorationRole: 503 454 { … … 536 487 break; 537 488 538 case Qt::UserRole + 2: 539 { 540 return m_type; 541 } 542 break; 543 544 default: 545 break; 546 } 547 return QVariant(); 489 default: 490 break; 491 } 492 493 /* Call to base-class: */ 494 return UIInformationDataItem::data(index, role); 548 495 } 549 496 … … 558 505 switch (role) 559 506 { 560 case Qt::DisplayRole:561 {562 return tr("Parallel Ports", "details report");563 }564 break;565 566 507 case Qt::DecorationRole: 567 508 { … … 589 530 break; 590 531 591 case Qt::UserRole + 2:592 {593 return m_type;594 }595 break;596 597 532 default: 598 533 break; … … 611 546 switch (role) 612 547 { 613 case Qt::DisplayRole:614 {615 return tr("USB", "details report");616 }617 break;618 619 548 case Qt::DecorationRole: 620 549 { … … 649 578 break; 650 579 651 case Qt::UserRole + 2: 652 { 653 return m_type; 654 } 655 break; 656 657 default: 658 break; 659 } 660 return QVariant(); 580 default: 581 break; 582 } 583 584 /* Call to base-class: */ 585 return UIInformationDataItem::data(index, role); 661 586 } 662 587 … … 671 596 switch (role) 672 597 { 673 case Qt::DisplayRole:674 {675 return tr("Shared Folders", "details report");676 }677 break;678 679 598 case Qt::DecorationRole: 680 599 { … … 695 614 break; 696 615 697 case Qt::UserRole + 2: 698 { 699 return m_type; 700 } 701 break; 702 703 default: 704 break; 705 } 706 return QVariant(); 616 default: 617 break; 618 } 619 620 /* Call to base-class: */ 621 return UIInformationDataItem::data(index, role); 707 622 } 708 623 … … 721 636 switch (role) 722 637 { 723 case Qt::DisplayRole:724 {725 return tr("Runtime Attributes", "details report");726 }727 break;728 729 638 case Qt::DecorationRole: 730 639 { … … 852 761 break; 853 762 854 case Qt::UserRole + 2: 855 { 856 return m_type; 857 } 858 break; 859 860 default: 861 break; 862 } 863 return QVariant(); 763 default: 764 break; 765 } 766 767 /* Call to base-class: */ 768 return UIInformationDataItem::data(index, role); 864 769 } 865 770 … … 917 822 switch (role) 918 823 { 919 case Qt::DisplayRole:920 {921 return tr("Network Statistics", "details report");922 }923 break;924 925 824 case Qt::DecorationRole: 926 825 { … … 951 850 break; 952 851 953 case Qt::UserRole + 2: 954 { 955 return m_type; 956 } 957 break; 958 959 default: 960 break; 961 } 962 return QVariant(); 852 default: 853 break; 854 } 855 856 /* Call to base-class: */ 857 return UIInformationDataItem::data(index, role); 963 858 } 964 859 … … 1022 917 1023 918 UIInformationDataStorageStatistics::UIInformationDataStorageStatistics(const CMachine &machine, const CConsole &console, UIInformationModel *pModel) 1024 : UIInformationDataItem(InformationElementType_ NetworkStatistics, machine, console, pModel)919 : UIInformationDataItem(InformationElementType_StorageStatistics, machine, console, pModel) 1025 920 { 1026 921 /* Storage statistics: */ … … 1179 1074 } 1180 1075 1181 1076 m_pTimer = new QTimer(this); 1182 1077 connect(m_pTimer, SIGNAL(timeout()), this, SLOT(sltProcessStatistics())); 1183 1078 /* Statistics page update: */ … … 1190 1085 switch (role) 1191 1086 { 1192 case Qt::DisplayRole:1193 {1194 return tr("Storage Statistics", "details report");1195 }1196 break;1197 1198 1087 case Qt::DecorationRole: 1199 1088 { … … 1296 1185 break; 1297 1186 1298 case Qt::UserRole + 2: 1299 { 1300 return m_type; 1301 } 1302 break; 1303 1304 default: 1305 break; 1306 } 1307 1308 return QVariant(); 1187 default: 1188 break; 1189 } 1190 1191 /* Call to base-class: */ 1192 return UIInformationDataItem::data(index, role); 1309 1193 } 1310 1194
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器