- Timestamp:
- Sep 9, 2015 2:46:10 PM (9 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackend.h
r55401 r57668 159 159 template<> QString toInternalString(const DetailsElementType &detailsElementType); 160 160 template<> DetailsElementType fromInternalString<DetailsElementType>(const QString &strDetailsElementType); 161 template<> QIcon toIcon(const DetailsElementType &detailsElementType); 161 162 template<> QString toInternalString(const PreviewUpdateIntervalType &previewUpdateIntervalType); 162 163 template<> PreviewUpdateIntervalType fromInternalString<PreviewUpdateIntervalType>(const QString &strPreviewUpdateIntervalType); -
trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendGlobal.cpp
r56098 r57668 977 977 } 978 978 979 /* QIcon <= DetailsElementType: */ 980 template<> QIcon toIcon(const DetailsElementType &detailsElementType) 981 { 982 switch (detailsElementType) 983 { 984 case DetailsElementType_General: return UIIconPool::iconSet(":/machine_16px.png"); 985 case DetailsElementType_Preview: return UIIconPool::iconSet(":/machine_16px.png"); 986 case DetailsElementType_System: return UIIconPool::iconSet(":/chipset_16px.png"); 987 case DetailsElementType_Display: return UIIconPool::iconSet(":/vrdp_16px.png"); 988 case DetailsElementType_Storage: return UIIconPool::iconSet(":/hd_16px.png"); 989 case DetailsElementType_Audio: return UIIconPool::iconSet(":/sound_16px.png"); 990 case DetailsElementType_Network: return UIIconPool::iconSet(":/nw_16px.png"); 991 case DetailsElementType_Serial: return UIIconPool::iconSet(":/serial_port_16px.png"); 992 #ifdef VBOX_WITH_PARALLEL_PORTS 993 case DetailsElementType_Parallel: return UIIconPool::iconSet(":/parallel_port_16px.png"); 994 #endif /* VBOX_WITH_PARALLEL_PORTS */ 995 case DetailsElementType_USB: return UIIconPool::iconSet(":/usb_16px.png"); 996 case DetailsElementType_SF: return UIIconPool::iconSet(":/sf_16px.png"); 997 case DetailsElementType_UI: return UIIconPool::iconSet(":/interface_16px.png"); 998 case DetailsElementType_Description: return UIIconPool::iconSet(":/description_16px.png"); 999 default: 1000 { 1001 AssertMsgFailed(("No icon for details element type=%d", detailsElementType)); 1002 break; 1003 } 1004 } 1005 return QIcon(); 1006 } 1007 979 1008 /* QString <= PreviewUpdateIntervalType: */ 980 1009 template<> QString toInternalString(const PreviewUpdateIntervalType &previewUpdateIntervalType) -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsElements.cpp
r56226 r57668 62 62 } 63 63 64 UIGDetailsElementInterface::UIGDetailsElementInterface(UIGDetailsSet *pParent, DetailsElementType elementType, bool fOpened)65 : UIGDetailsElement(pParent, elementType, fOpened)64 UIGDetailsElementInterface::UIGDetailsElementInterface(UIGDetailsSet *pParent, DetailsElementType type, bool fOpened) 65 : UIGDetailsElement(pParent, type, fOpened) 66 66 , m_pThread(0) 67 67 { 68 /* Assign corresponding icon: */ 69 setIcon(gpConverter->toIcon(elementType())); 70 71 /* Translate finally: */ 72 retranslateUi(); 68 73 } 69 74 … … 71 76 { 72 77 cleanupThread(); 78 } 79 80 void UIGDetailsElementInterface::retranslateUi() 81 { 82 /* Assign corresponding name: */ 83 setName(gpConverter->toString(elementType())); 73 84 } 74 85 … … 160 171 } 161 172 162 UIGDetailsElementGeneral::UIGDetailsElementGeneral(UIGDetailsSet *pParent, bool fOpened)163 : UIGDetailsElementInterface(pParent, DetailsElementType_General, fOpened)164 {165 /* Icon: */166 setIcon(UIIconPool::iconSet(":/machine_16px.png"));167 168 /* Translate: */169 retranslateUi();170 }171 172 void UIGDetailsElementGeneral::retranslateUi()173 {174 setName(gpConverter->toString(DetailsElementType_General));175 }176 177 173 UIGDetailsUpdateThread* UIGDetailsElementGeneral::createUpdateThread() 178 174 { … … 201 197 setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); 202 198 203 /* Translate : */199 /* Translate finally: */ 204 200 retranslateUi(); 205 201 } … … 215 211 void UIGDetailsElementPreview::retranslateUi() 216 212 { 217 setName(gpConverter->toString(DetailsElementType_Preview)); 213 /* Assign corresponding name: */ 214 setName(gpConverter->toString(elementType())); 218 215 } 219 216 … … 371 368 372 369 COMBase::CleanupCOM(); 373 }374 375 UIGDetailsElementSystem::UIGDetailsElementSystem(UIGDetailsSet *pParent, bool fOpened)376 : UIGDetailsElementInterface(pParent, DetailsElementType_System, fOpened)377 {378 /* Icon: */379 setIcon(UIIconPool::iconSet(":/chipset_16px.png"));380 381 /* Translate: */382 retranslateUi();383 }384 385 void UIGDetailsElementSystem::retranslateUi()386 {387 setName(gpConverter->toString(DetailsElementType_System));388 370 } 389 371 … … 504 486 505 487 COMBase::CleanupCOM(); 506 }507 508 UIGDetailsElementDisplay::UIGDetailsElementDisplay(UIGDetailsSet *pParent, bool fOpened)509 : UIGDetailsElementInterface(pParent, DetailsElementType_Display, fOpened)510 {511 /* Icon: */512 setIcon(UIIconPool::iconSet(":/vrdp_16px.png"));513 514 /* Translate: */515 retranslateUi();516 }517 518 void UIGDetailsElementDisplay::retranslateUi()519 {520 setName(gpConverter->toString(DetailsElementType_Display));521 488 } 522 489 … … 613 580 } 614 581 615 UIGDetailsElementStorage::UIGDetailsElementStorage(UIGDetailsSet *pParent, bool fOpened)616 : UIGDetailsElementInterface(pParent, DetailsElementType_Storage, fOpened)617 {618 /* Icon: */619 setIcon(UIIconPool::iconSet(":/hd_16px.png"));620 621 /* Translate: */622 retranslateUi();623 }624 625 void UIGDetailsElementStorage::retranslateUi()626 {627 setName(gpConverter->toString(DetailsElementType_Storage));628 }629 630 582 UIGDetailsUpdateThread* UIGDetailsElementStorage::createUpdateThread() 631 583 { … … 675 627 676 628 COMBase::CleanupCOM(); 677 }678 679 UIGDetailsElementAudio::UIGDetailsElementAudio(UIGDetailsSet *pParent, bool fOpened)680 : UIGDetailsElementInterface(pParent, DetailsElementType_Audio, fOpened)681 {682 /* Icon: */683 setIcon(UIIconPool::iconSet(":/sound_16px.png"));684 685 /* Translate: */686 retranslateUi();687 }688 689 void UIGDetailsElementAudio::retranslateUi()690 {691 setName(gpConverter->toString(DetailsElementType_Audio));692 629 } 693 630 … … 800 737 } 801 738 802 UIGDetailsElementNetwork::UIGDetailsElementNetwork(UIGDetailsSet *pParent, bool fOpened)803 : UIGDetailsElementInterface(pParent, DetailsElementType_Network, fOpened)804 {805 /* Icon: */806 setIcon(UIIconPool::iconSet(":/nw_16px.png"));807 808 /* Translate: */809 retranslateUi();810 }811 812 void UIGDetailsElementNetwork::retranslateUi()813 {814 setName(gpConverter->toString(DetailsElementType_Network));815 }816 817 739 UIGDetailsUpdateThread* UIGDetailsElementNetwork::createUpdateThread() 818 740 { … … 870 792 } 871 793 872 UIGDetailsElementSerial::UIGDetailsElementSerial(UIGDetailsSet *pParent, bool fOpened)873 : UIGDetailsElementInterface(pParent, DetailsElementType_Serial, fOpened)874 {875 /* Icon: */876 setIcon(UIIconPool::iconSet(":/serial_port_16px.png"));877 878 /* Translate: */879 retranslateUi();880 }881 882 void UIGDetailsElementSerial::retranslateUi()883 {884 setName(gpConverter->toString(DetailsElementType_Serial));885 }886 887 794 UIGDetailsUpdateThread* UIGDetailsElementSerial::createUpdateThread() 888 795 { … … 933 840 934 841 COMBase::CleanupCOM(); 935 }936 937 UIGDetailsElementParallel::UIGDetailsElementParallel(UIGDetailsSet *pParent, bool fOpened)938 : UIGDetailsElementInterface(pParent, DetailsElementType_Parallel, fOpened)939 {940 /* Icon: */941 setIcon(UIIconPool::iconSet(":/parallel_port_16px.png"));942 943 /* Translate: */944 retranslateUi();945 }946 947 void UIGDetailsElementParallel::retranslateUi()948 {949 setName(gpConverter->toString(DetailsElementType_Parallel));950 842 } 951 843 … … 1013 905 } 1014 906 1015 UIGDetailsElementUSB::UIGDetailsElementUSB(UIGDetailsSet *pParent, bool fOpened)1016 : UIGDetailsElementInterface(pParent, DetailsElementType_USB, fOpened)1017 {1018 /* Icon: */1019 setIcon(UIIconPool::iconSet(":/usb_16px.png"));1020 1021 /* Translate: */1022 retranslateUi();1023 }1024 1025 void UIGDetailsElementUSB::retranslateUi()1026 {1027 setName(gpConverter->toString(DetailsElementType_USB));1028 }1029 1030 907 UIGDetailsUpdateThread* UIGDetailsElementUSB::createUpdateThread() 1031 908 { … … 1066 943 1067 944 COMBase::CleanupCOM(); 1068 }1069 1070 UIGDetailsElementSF::UIGDetailsElementSF(UIGDetailsSet *pParent, bool fOpened)1071 : UIGDetailsElementInterface(pParent, DetailsElementType_SF, fOpened)1072 {1073 /* Icon: */1074 setIcon(UIIconPool::iconSet(":/sf_16px.png"));1075 1076 /* Translate: */1077 retranslateUi();1078 }1079 1080 void UIGDetailsElementSF::retranslateUi()1081 {1082 setName(gpConverter->toString(DetailsElementType_SF));1083 945 } 1084 946 … … 1187 1049 } 1188 1050 1189 UIGDetailsElementUI::UIGDetailsElementUI(UIGDetailsSet *pParent, bool fOpened)1190 : UIGDetailsElementInterface(pParent, DetailsElementType_UI, fOpened)1191 {1192 /* Icon: */1193 setIcon(UIIconPool::iconSet(":/interface_16px.png"));1194 1195 /* Translate: */1196 retranslateUi();1197 }1198 1199 void UIGDetailsElementUI::retranslateUi()1200 {1201 setName(gpConverter->toString(DetailsElementType_UI));1202 }1203 1204 1051 UIGDetailsUpdateThread* UIGDetailsElementUI::createUpdateThread() 1205 1052 { … … 1242 1089 } 1243 1090 1244 UIGDetailsElementDescription::UIGDetailsElementDescription(UIGDetailsSet *pParent, bool fOpened)1245 : UIGDetailsElementInterface(pParent, DetailsElementType_Description, fOpened)1246 {1247 /* Icon: */1248 setIcon(UIIconPool::iconSet(":/description_16px.png"));1249 1250 /* Translate: */1251 retranslateUi();1252 }1253 1254 void UIGDetailsElementDescription::retranslateUi()1255 {1256 setName(gpConverter->toString(DetailsElementType_Description));1257 }1258 1259 1091 UIGDetailsUpdateThread* UIGDetailsElementDescription::createUpdateThread() 1260 1092 { -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsElements.h
r55401 r57668 66 66 67 67 /* Constructor/destructor: */ 68 UIGDetailsElementInterface(UIGDetailsSet *pParent, DetailsElementType elementType, bool fOpened);68 UIGDetailsElementInterface(UIGDetailsSet *pParent, DetailsElementType type, bool fOpened); 69 69 ~UIGDetailsElementInterface(); 70 70 71 71 protected: 72 73 /* Helper: Translate stuff: */ 74 void retranslateUi(); 72 75 73 76 /* Helpers: Update stuff: */ … … 114 117 115 118 /* Constructor: */ 116 UIGDetailsElementGeneral(UIGDetailsSet *pParent, bool fOpened); 117 118 private: 119 120 /* Helper: Translate stuff: */ 121 void retranslateUi(); 119 UIGDetailsElementGeneral(UIGDetailsSet *pParent, bool fOpened) 120 : UIGDetailsElementInterface(pParent, DetailsElementType_General, fOpened) {} 121 122 private: 122 123 123 124 /* Helper: Update stuff: */ … … 183 184 184 185 /* Constructor: */ 185 UIGDetailsElementSystem(UIGDetailsSet *pParent, bool fOpened); 186 187 private: 188 189 /* Helper: Translate stuff: */ 190 void retranslateUi(); 186 UIGDetailsElementSystem(UIGDetailsSet *pParent, bool fOpened) 187 : UIGDetailsElementInterface(pParent, DetailsElementType_System, fOpened) {} 188 189 private: 191 190 192 191 /* Helper: Update stuff: */ … … 219 218 220 219 /* Constructor: */ 221 UIGDetailsElementDisplay(UIGDetailsSet *pParent, bool fOpened); 222 223 private: 224 225 /* Helper: Translate stuff: */ 226 void retranslateUi(); 220 UIGDetailsElementDisplay(UIGDetailsSet *pParent, bool fOpened) 221 : UIGDetailsElementInterface(pParent, DetailsElementType_Display, fOpened) {} 222 223 private: 227 224 228 225 /* Helper: Update stuff: */ … … 255 252 256 253 /* Constructor: */ 257 UIGDetailsElementStorage(UIGDetailsSet *pParent, bool fOpened); 258 259 private: 260 261 /* Helper: Translate stuff: */ 262 void retranslateUi(); 254 UIGDetailsElementStorage(UIGDetailsSet *pParent, bool fOpened) 255 : UIGDetailsElementInterface(pParent, DetailsElementType_Storage, fOpened) {} 256 257 private: 263 258 264 259 /* Helper: Update stuff: */ … … 291 286 292 287 /* Constructor: */ 293 UIGDetailsElementAudio(UIGDetailsSet *pParent, bool fOpened); 294 295 private: 296 297 /* Helper: Translate stuff: */ 298 void retranslateUi(); 288 UIGDetailsElementAudio(UIGDetailsSet *pParent, bool fOpened) 289 : UIGDetailsElementInterface(pParent, DetailsElementType_Audio, fOpened) {} 290 291 private: 299 292 300 293 /* Helper: Update stuff: */ … … 328 321 329 322 /* Constructor: */ 330 UIGDetailsElementNetwork(UIGDetailsSet *pParent, bool fOpened); 331 332 private: 333 334 /* Helper: Translate stuff: */ 335 void retranslateUi(); 323 UIGDetailsElementNetwork(UIGDetailsSet *pParent, bool fOpened) 324 : UIGDetailsElementInterface(pParent, DetailsElementType_Network, fOpened) {} 325 326 private: 336 327 337 328 /* Helper: Update stuff: */ … … 364 355 365 356 /* Constructor: */ 366 UIGDetailsElementSerial(UIGDetailsSet *pParent, bool fOpened); 367 368 private: 369 370 /* Helper: Translate stuff: */ 371 void retranslateUi(); 357 UIGDetailsElementSerial(UIGDetailsSet *pParent, bool fOpened) 358 : UIGDetailsElementInterface(pParent, DetailsElementType_Serial, fOpened) {} 359 360 private: 372 361 373 362 /* Helper: Update stuff: */ … … 401 390 402 391 /* Constructor: */ 403 UIGDetailsElementParallel(UIGDetailsSet *pParent, bool fOpened); 404 405 private: 406 407 /* Helper: Translate stuff: */ 408 void retranslateUi(); 392 UIGDetailsElementParallel(UIGDetailsSet *pParent, bool fOpened) 393 : UIGDetailsElementInterface(pParent, DetailsElementType_Parallel, fOpened) {} 394 395 private: 409 396 410 397 /* Helper: Update stuff: */ … … 438 425 439 426 /* Constructor: */ 440 UIGDetailsElementUSB(UIGDetailsSet *pParent, bool fOpened); 441 442 private: 443 444 /* Helper: Translate stuff: */ 445 void retranslateUi(); 427 UIGDetailsElementUSB(UIGDetailsSet *pParent, bool fOpened) 428 : UIGDetailsElementInterface(pParent, DetailsElementType_USB, fOpened) {} 429 430 private: 446 431 447 432 /* Helper: Update stuff: */ … … 474 459 475 460 /* Constructor: */ 476 UIGDetailsElementSF(UIGDetailsSet *pParent, bool fOpened); 477 478 private: 479 480 /* Helper: Translate stuff: */ 481 void retranslateUi(); 461 UIGDetailsElementSF(UIGDetailsSet *pParent, bool fOpened) 462 : UIGDetailsElementInterface(pParent, DetailsElementType_SF, fOpened) {} 463 464 private: 482 465 483 466 /* Helper: Update stuff: */ … … 510 493 511 494 /* Constructor: */ 512 UIGDetailsElementUI(UIGDetailsSet *pParent, bool fOpened); 513 514 private: 515 516 /* Helper: Translate stuff: */ 517 void retranslateUi(); 495 UIGDetailsElementUI(UIGDetailsSet *pParent, bool fOpened) 496 : UIGDetailsElementInterface(pParent, DetailsElementType_UI, fOpened) {} 497 498 private: 518 499 519 500 /* Helper: Update stuff: */ … … 546 527 547 528 /* Constructor: */ 548 UIGDetailsElementDescription(UIGDetailsSet *pParent, bool fOpened); 549 550 private: 551 552 /* Helper: Translate stuff: */ 553 void retranslateUi(); 529 UIGDetailsElementDescription(UIGDetailsSet *pParent, bool fOpened) 530 : UIGDetailsElementInterface(pParent, DetailsElementType_Description, fOpened) {} 531 532 private: 554 533 555 534 /* Helper: Update stuff: */
Note:
See TracChangeset
for help on using the changeset viewer.