Changeset 94737 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Apr 28, 2022 2:26:49 PM (3 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMainEventListener.cpp
r94734 r94737 68 68 #include "CStorageControllerChangedEvent.h" 69 69 #include "CStorageDeviceChangedEvent.h" 70 #include "CUpdateAgent.h" 71 #include "CUpdateAgentAvailableEvent.h" 72 #include "CUpdateAgentErrorEvent.h" 73 #include "CUpdateAgentStateChangedEvent.h" 74 #include "CUpdateAgentSettingsChangedEvent.h" 70 75 #include "CUSBDevice.h" 71 76 #include "CUSBDeviceStateChangedEvent.h" … … 215 220 qRegisterMetaType<KGuestMonitorChangedEventType>("KGuestMonitorChangedEventType"); 216 221 qRegisterMetaType<CGuestSession>("CGuestSession"); 222 qRegisterMetaType<CUpdateAgent>("CUpdateAgent"); 223 qRegisterMetaType<KUpdateChannel>("KUpdateChannel"); 224 qRegisterMetaType<KUpdateSeverity>("KUpdateSeverity"); 225 qRegisterMetaType<KUpdateState>("KUpdateState"); 217 226 } 218 227 … … 601 610 break; 602 611 } 612 case KVBoxEventType_OnUpdateAgentAvailable: 613 { 614 CUpdateAgentAvailableEvent comEventSpecific(pEvent); 615 emit sigUpdateAgentAvailable(comEventSpecific.GetAgent(), 616 comEventSpecific.GetVersion(), comEventSpecific.GetChannel(), 617 comEventSpecific.GetSeverity(), comEventSpecific.GetDownloadURL(), 618 comEventSpecific.GetWebURL(), comEventSpecific.GetReleaseNotes()); 619 break; 620 } 621 case KVBoxEventType_OnUpdateAgentError: 622 { 623 CUpdateAgentErrorEvent comEventSpecific(pEvent); 624 emit sigUpdateAgentError(comEventSpecific.GetAgent(), comEventSpecific.GetMsg(), comEventSpecific.GetRcError()); 625 break; 626 } 627 case KVBoxEventType_OnUpdateAgentStateChanged: 628 { 629 CUpdateAgentStateChangedEvent comEventSpecific(pEvent); 630 emit sigUpdateAgentStateChanged(comEventSpecific.GetAgent(), comEventSpecific.GetState()); 631 break; 632 } 633 case KVBoxEventType_OnUpdateAgentSettingsChanged: 634 { 635 CUpdateAgentSettingsChangedEvent comEventSpecific(pEvent); 636 emit sigUpdateAgentSettingsChanged(comEventSpecific.GetAgent(), comEventSpecific.GetAttributeHint()); 637 break; 638 } 603 639 default: break; 604 640 } -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMainEventListener.h
r94734 r94737 39 39 #include "CNetworkAdapter.h" 40 40 #include "CUSBDevice.h" 41 #include "CUpdateAgent.h" 41 42 #include "CVirtualBoxErrorInfo.h" 42 43 … … 189 190 /** @} */ 190 191 192 /** @name Update agent signals 193 * @{ */ 194 /** Notifies about an available update of an update agent. */ 195 void sigUpdateAgentAvailable(CUpdateAgent, QString, KUpdateChannel, KUpdateSeverity, QString, QString, QString); 196 /** Notifies about an error of an update agent. */ 197 void sigUpdateAgentError(CUpdateAgent, QString, long); 198 /** Notifies about a state change of an update agent. */ 199 void sigUpdateAgentStateChanged(CUpdateAgent, KUpdateState); 200 /** Notifies about update agent @a comAgent settings change. */ 201 void sigUpdateAgentSettingsChanged(CUpdateAgent comAgent, const QString &strAttributeHint); 202 /** @} */ 203 191 204 /** @name Progress related signals 192 205 * @{ */ -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIVirtualBoxEventHandler.cpp
r94734 r94737 78 78 * @param fRegistered Brings whether medium is registered or unregistered. */ 79 79 void sigMediumRegistered(const QUuid &uMediumId, KDeviceType enmMediumType, bool fRegistered); 80 /** Notifies about an available update of an update agent. */ 81 void sigUpdateAgentAvailable(CUpdateAgent, QString, KUpdateChannel, KUpdateSeverity, QString, QString, QString); 82 /** Notifies about an error of an update agent. */ 83 void sigUpdateAgentError(CUpdateAgent, QString, long); 84 /** Notifies about a state change of an update agent. */ 85 void sigUpdateAgentStateChanged(CUpdateAgent, KUpdateState); 86 /** Notifies about update agent @a comAgent settings change. */ 87 void sigUpdateAgentSettingsChanged(CUpdateAgent comAgent, const QString &strAttributeHint); 80 88 81 89 public: … … 174 182 << KVBoxEventType_OnMediumChanged 175 183 << KVBoxEventType_OnMediumConfigChanged 176 << KVBoxEventType_OnMediumRegistered; 184 << KVBoxEventType_OnMediumRegistered 185 << KVBoxEventType_OnUpdateAgentAvailable 186 << KVBoxEventType_OnUpdateAgentStateChanged 187 << KVBoxEventType_OnUpdateAgentError 188 << KVBoxEventType_OnUpdateAgentSettingsChanged; 177 189 178 190 /* Register event listener for event source aggregator: */ … … 238 250 connect(m_pQtListener->getWrapped(), SIGNAL(sigMediumRegistered(QUuid, KDeviceType, bool)), 239 251 this, SIGNAL(sigMediumRegistered(QUuid, KDeviceType, bool)), 252 Qt::DirectConnection); 253 connect(m_pQtListener->getWrapped(), SIGNAL(sigUpdateAgentAvailable(CUpdateAgent, QString, KUpdateChannel, KUpdateSeverity, 254 QString, QString, QString)), 255 this, SIGNAL(sigUpdateAgentAvailable(CUpdateAgent, QString, KUpdateChannel, KUpdateSeverity, 256 QString, QString, QString)), 257 Qt::DirectConnection); 258 connect(m_pQtListener->getWrapped(), SIGNAL(sigUpdateAgentError(CUpdateAgent, QString, long)), 259 this, SIGNAL(sigUpdateAgentError(CUpdateAgent, QString, long)), 260 Qt::DirectConnection); 261 connect(m_pQtListener->getWrapped(), SIGNAL(sigUpdateAgentStateChanged(CUpdateAgent, KUpdateState)), 262 this, SIGNAL(sigUpdateAgentStateChanged(CUpdateAgent, KUpdateState)), 263 Qt::DirectConnection); 264 connect(m_pQtListener->getWrapped(), SIGNAL(sigUpdateAgentSettingsChanged(CUpdateAgent, QString)), 265 this, SIGNAL(sigUpdateAgentSettingsChanged(CUpdateAgent, QString)), 240 266 Qt::DirectConnection); 241 267 } … … 357 383 this, SIGNAL(sigMediumRegistered(QUuid, KDeviceType, bool)), 358 384 Qt::QueuedConnection); 385 connect(m_pProxy, SIGNAL(sigUpdateAgentAvailable(CUpdateAgent, QString, KUpdateChannel, KUpdateSeverity, 386 QString, QString, QString)), 387 this, SIGNAL(sigUpdateAgentAvailable(CUpdateAgent, QString, KUpdateChannel, KUpdateSeverity, 388 QString, QString, QString)), 389 Qt::DirectConnection); 390 connect(m_pProxy, SIGNAL(sigUpdateAgentError(CUpdateAgent, QString, long)), 391 this, SIGNAL(sigUpdateAgentError(CUpdateAgent, QString, long)), 392 Qt::DirectConnection); 393 connect(m_pProxy, SIGNAL(sigUpdateAgentStateChanged(CUpdateAgent, KUpdateState)), 394 this, SIGNAL(sigUpdateAgentStateChanged(CUpdateAgent, KUpdateState)), 395 Qt::DirectConnection); 396 connect(m_pProxy, SIGNAL(sigUpdateAgentSettingsChanged(CUpdateAgent, QString)), 397 this, SIGNAL(sigUpdateAgentSettingsChanged(CUpdateAgent, QString)), 398 Qt::QueuedConnection); 359 399 } 360 400 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIVirtualBoxEventHandler.h
r94734 r94737 32 32 #include "CMedium.h" 33 33 #include "CMediumAttachment.h" 34 #include "CUpdateAgent.h" 34 35 35 36 /* Forward declarations: */ … … 86 87 * @param fRegistered Brings whether medium is registered or unregistered. */ 87 88 void sigMediumRegistered(const QUuid &uMediumId, KDeviceType enmMediumType, bool fRegistered); 89 /** Notifies about an available update of an update agent. */ 90 void sigUpdateAgentAvailable(CUpdateAgent, QString, KUpdateChannel, KUpdateSeverity, QString, QString, QString); 91 /** Notifies about an error of an update agent. */ 92 void sigUpdateAgentError(CUpdateAgent, QString, long); 93 /** Notifies about a state change of an update agent. */ 94 void sigUpdateAgentStateChanged(CUpdateAgent, KUpdateState); 95 /** Notifies about update agent @a comAgent settings change. */ 96 void sigUpdateAgentSettingsChanged(CUpdateAgent comAgent, const QString &strAttributeHint); 88 97 89 98 public: -
trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationCenter.cpp
r94734 r94737 38 38 #include "UINotificationObjectItem.h" 39 39 #include "UINotificationModel.h" 40 #include "UIVirtualBoxEventHandler.h" /** @todo EXAMPLE -- REMOVE THIS */ 41 #include "CUpdateAgent.h" /** @todo EXAMPLE -- REMOVE THIS */ 40 42 41 43 /* Other VBox includes: */ … … 404 406 } 405 407 408 /** @todo EXAMPLE -- REMOVE THIS */ 409 void UINotificationCenter::sltUpdateAgentAvailable(CUpdateAgent comAgent, QString strVer, KUpdateChannel, KUpdateSeverity, QString, QString, QString) 410 { 411 RT_NOREF(comAgent, strVer); 412 } 413 406 414 void UINotificationCenter::sltHandleOpenButtonToggled(bool fToggled) 407 415 { … … 542 550 connect(m_pModel, &UINotificationModel::sigItemRemoved, 543 551 this, &UINotificationCenter::sltHandleModelItemRemoved); 552 /** @todo EXAMPLE -- REMOVE THIS */ 553 connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigUpdateAgentAvailable, 554 this, &UINotificationCenter::sltUpdateAgentAvailable); 544 555 } 545 556 } -
trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationCenter.h
r94734 r94737 108 108 /** Handles order changes. */ 109 109 void sltHandleOrderChange(); 110 111 /** @todo EXAMPLE -- REMOVE THIS */ 112 void sltUpdateAgentAvailable(CUpdateAgent comAgent, QString, KUpdateChannel, KUpdateSeverity, QString, QString, QString); 110 113 111 114 /** Issues request to make open button @a fToggled. */
Note:
See TracChangeset
for help on using the changeset viewer.