Changeset 90559 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Aug 7, 2021 6:41:32 AM (3 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/networking/UIUpdateManager.cpp
r90541 r90559 34 34 #include "UINetworkCustomer.h" 35 35 #include "UINetworkRequest.h" 36 #include "UINotificationCenter.h" 36 37 #include "UIUpdateDefs.h" 37 38 #include "UIUpdateManager.h" … … 489 490 } 490 491 491 /* Create and configure the Extension Pack downloader: */492 UI DownloaderExtensionPack *pDl = UIDownloaderExtensionPack::create();492 /* Download extension pack: */ 493 UINotificationDownloaderExtensionPack *pNotification = new UINotificationDownloaderExtensionPack(GUI_ExtPackName); 493 494 /* After downloading finished => propose to install the Extension Pack: */ 494 connect(p Dl, &UIDownloaderExtensionPack::sigDownloadFinished,495 connect(pNotification, &UINotificationDownloaderExtensionPack::sigExtensionPackDownloaded, 495 496 this, &UIUpdateStepVirtualBoxExtensionPack::sltHandleDownloadedExtensionPack); 496 497 /* Also, destroyed downloader is a signal to finish the step: */ 497 connect(p Dl, &UIDownloaderExtensionPack::destroyed,498 connect(pNotification, &UINotificationDownloaderExtensionPack::sigDownloaderDestroyed, 498 499 this, &UIUpdateStepVirtualBoxExtensionPack::sigStepComplete); 499 /* Start downloading: */500 pDl->start();500 /* Append and start notification: */ 501 notificationCenter().append(pNotification); 501 502 } 502 503 -
trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.cpp
r90483 r90559 22 22 /* GUI includes: */ 23 23 #include "UICommon.h" 24 #include "UIDownloaderExtensionPack.h" 24 25 #include "UINotificationObjects.h" 25 26 … … 1485 1486 emit sigHostOnlyNetworkInterfaceRemoved(m_strInterfaceName); 1486 1487 } 1488 1489 1490 /********************************************************************************************************************************* 1491 * Class UINotificationDownloaderExtensionPack implementation. * 1492 *********************************************************************************************************************************/ 1493 1494 UINotificationDownloaderExtensionPack::UINotificationDownloaderExtensionPack(const QString &strPackName) 1495 : m_strPackName(strPackName) 1496 { 1497 } 1498 1499 QString UINotificationDownloaderExtensionPack::name() const 1500 { 1501 return UINotificationDownloader::tr("Downloading Extension Pack ..."); 1502 } 1503 1504 QString UINotificationDownloaderExtensionPack::details() const 1505 { 1506 return UINotificationProgress::tr("<b>Name:</b> %1").arg(m_strPackName); 1507 } 1508 1509 UIDownloader *UINotificationDownloaderExtensionPack::createDownloader() 1510 { 1511 /* Create and configure the Extension Pack downloader: */ 1512 UIDownloaderExtensionPack *pDownloader = UIDownloaderExtensionPack::create(); 1513 if (pDownloader) 1514 { 1515 connect(pDownloader, &UIDownloaderExtensionPack::sigDownloadFinished, 1516 this, &UINotificationDownloaderExtensionPack::sigExtensionPackDownloaded); 1517 return pDownloader; 1518 } 1519 return 0; 1520 } -
trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.h
r90483 r90559 1118 1118 }; 1119 1119 1120 /** UINotificationDownloader extension for Extension Pack downloading functionality. */ 1121 class SHARED_LIBRARY_STUFF UINotificationDownloaderExtensionPack : public UINotificationDownloader 1122 { 1123 Q_OBJECT; 1124 1125 signals: 1126 1127 /** Notifies listeners about extension pack downloaded. 1128 * @param strSource Brings the EP source. 1129 * @param strTarget Brings the EP target. 1130 * @param strDigest Brings the EP digest. */ 1131 void sigExtensionPackDownloaded(const QString &strSource, 1132 const QString &strTarget, 1133 const QString &strDigest); 1134 1135 public: 1136 1137 /** Constructs host-only network interface remove notification-progress. */ 1138 UINotificationDownloaderExtensionPack(const QString &strPackName); 1139 1140 protected: 1141 1142 /** Returns object name. */ 1143 virtual QString name() const /* override final */; 1144 /** Returns object details. */ 1145 virtual QString details() const /* override final */; 1146 /** Creates and returns started progress-wrapper. */ 1147 virtual UIDownloader *createDownloader() /* override final */; 1148 1149 private: 1150 1151 /** Holds the pack being dowloaded. */ 1152 QString m_strPackName; 1153 }; 1154 1120 1155 #endif /* !FEQT_INCLUDED_SRC_notificationcenter_UINotificationObjects_h */
Note:
See TracChangeset
for help on using the changeset viewer.