Changeset 98309 in vbox
- Timestamp:
- Jan 26, 2023 10:09:27 AM (20 months ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 6 edited
-
globals/UIMainEventListener.cpp (modified) (3 diffs)
-
globals/UIMainEventListener.h (modified) (2 diffs)
-
globals/UIVirtualBoxEventHandler.cpp (modified) (4 diffs)
-
globals/UIVirtualBoxEventHandler.h (modified) (2 diffs)
-
notificationcenter/UINotificationCenter.cpp (modified) (3 diffs)
-
notificationcenter/UINotificationCenter.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMainEventListener.cpp
r98103 r98309 79 79 #include "CStorageControllerChangedEvent.h" 80 80 #include "CStorageDeviceChangedEvent.h" 81 #include "CUpdateAgent.h"82 #include "CUpdateAgentAvailableEvent.h"83 #include "CUpdateAgentErrorEvent.h"84 #include "CUpdateAgentStateChangedEvent.h"85 #include "CUpdateAgentSettingsChangedEvent.h"86 81 #include "CUSBDevice.h" 87 82 #include "CUSBDeviceStateChangedEvent.h" … … 231 226 qRegisterMetaType<KGuestMonitorChangedEventType>("KGuestMonitorChangedEventType"); 232 227 qRegisterMetaType<CGuestSession>("CGuestSession"); 233 qRegisterMetaType<CUpdateAgent>("CUpdateAgent");234 qRegisterMetaType<KUpdateChannel>("KUpdateChannel");235 qRegisterMetaType<KUpdateSeverity>("KUpdateSeverity");236 qRegisterMetaType<KUpdateState>("KUpdateState");237 228 } 238 229 … … 628 619 break; 629 620 } 630 case KVBoxEventType_OnUpdateAgentAvailable:631 {632 CUpdateAgentAvailableEvent comEventSpecific(pEvent);633 emit sigUpdateAgentAvailable(comEventSpecific.GetAgent(),634 comEventSpecific.GetVersion(), comEventSpecific.GetChannel(),635 comEventSpecific.GetSeverity(), comEventSpecific.GetDownloadURL(),636 comEventSpecific.GetWebURL(), comEventSpecific.GetReleaseNotes());637 break;638 }639 case KVBoxEventType_OnUpdateAgentError:640 {641 CUpdateAgentErrorEvent comEventSpecific(pEvent);642 emit sigUpdateAgentError(comEventSpecific.GetAgent(), comEventSpecific.GetMsg(), comEventSpecific.GetRcError());643 break;644 }645 case KVBoxEventType_OnUpdateAgentStateChanged:646 {647 CUpdateAgentStateChangedEvent comEventSpecific(pEvent);648 emit sigUpdateAgentStateChanged(comEventSpecific.GetAgent(), comEventSpecific.GetState());649 break;650 }651 case KVBoxEventType_OnUpdateAgentSettingsChanged:652 {653 CUpdateAgentSettingsChangedEvent comEventSpecific(pEvent);654 emit sigUpdateAgentSettingsChanged(comEventSpecific.GetAgent(), comEventSpecific.GetAttributeHint());655 break;656 }657 621 default: break; 658 622 } -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMainEventListener.h
r98103 r98309 49 49 #include "CNetworkAdapter.h" 50 50 #include "CUSBDevice.h" 51 #include "CUpdateAgent.h"52 51 #include "CVirtualBoxErrorInfo.h" 53 52 … … 205 204 /** @} */ 206 205 207 /** @name Update agent signals208 * @{ */209 /** Notifies about an available update of an update agent. */210 void sigUpdateAgentAvailable(CUpdateAgent, QString, KUpdateChannel, KUpdateSeverity, QString, QString, QString);211 /** Notifies about an error of an update agent. */212 void sigUpdateAgentError(CUpdateAgent, QString, long);213 /** Notifies about a state change of an update agent. */214 void sigUpdateAgentStateChanged(CUpdateAgent, KUpdateState);215 /** Notifies about update agent @a comAgent settings change. */216 void sigUpdateAgentSettingsChanged(CUpdateAgent comAgent, const QString &strAttributeHint);217 /** @} */218 219 206 /** @name Progress related signals 220 207 * @{ */ -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIVirtualBoxEventHandler.cpp
r98103 r98309 90 90 * @param fRegistered Brings whether medium is registered or unregistered. */ 91 91 void sigMediumRegistered(const QUuid &uMediumId, KDeviceType enmMediumType, bool fRegistered); 92 /** Notifies about an available update of an update agent. */93 void sigUpdateAgentAvailable(CUpdateAgent, QString, KUpdateChannel, KUpdateSeverity, QString, QString, QString);94 /** Notifies about an error of an update agent. */95 void sigUpdateAgentError(CUpdateAgent, QString, long);96 /** Notifies about a state change of an update agent. */97 void sigUpdateAgentStateChanged(CUpdateAgent, KUpdateState);98 /** Notifies about update agent @a comAgent settings change. */99 void sigUpdateAgentSettingsChanged(CUpdateAgent comAgent, const QString &strAttributeHint);100 92 101 93 public: … … 195 187 << KVBoxEventType_OnMediumChanged 196 188 << KVBoxEventType_OnMediumConfigChanged 197 << KVBoxEventType_OnMediumRegistered 198 << KVBoxEventType_OnUpdateAgentAvailable 199 << KVBoxEventType_OnUpdateAgentStateChanged 200 << KVBoxEventType_OnUpdateAgentError 201 << KVBoxEventType_OnUpdateAgentSettingsChanged; 189 << KVBoxEventType_OnMediumRegistered; 202 190 203 191 /* Register event listener for event source aggregator: */ … … 266 254 connect(m_pQtListener->getWrapped(), SIGNAL(sigMediumRegistered(QUuid, KDeviceType, bool)), 267 255 this, SIGNAL(sigMediumRegistered(QUuid, KDeviceType, bool)), 268 Qt::DirectConnection);269 connect(m_pQtListener->getWrapped(), SIGNAL(sigUpdateAgentAvailable(CUpdateAgent, QString, KUpdateChannel, KUpdateSeverity,270 QString, QString, QString)),271 this, SIGNAL(sigUpdateAgentAvailable(CUpdateAgent, QString, KUpdateChannel, KUpdateSeverity,272 QString, QString, QString)),273 Qt::DirectConnection);274 connect(m_pQtListener->getWrapped(), SIGNAL(sigUpdateAgentError(CUpdateAgent, QString, long)),275 this, SIGNAL(sigUpdateAgentError(CUpdateAgent, QString, long)),276 Qt::DirectConnection);277 connect(m_pQtListener->getWrapped(), SIGNAL(sigUpdateAgentStateChanged(CUpdateAgent, KUpdateState)),278 this, SIGNAL(sigUpdateAgentStateChanged(CUpdateAgent, KUpdateState)),279 Qt::DirectConnection);280 connect(m_pQtListener->getWrapped(), SIGNAL(sigUpdateAgentSettingsChanged(CUpdateAgent, QString)),281 this, SIGNAL(sigUpdateAgentSettingsChanged(CUpdateAgent, QString)),282 256 Qt::DirectConnection); 283 257 } … … 402 376 this, SIGNAL(sigMediumRegistered(QUuid, KDeviceType, bool)), 403 377 Qt::QueuedConnection); 404 connect(m_pProxy, SIGNAL(sigUpdateAgentAvailable(CUpdateAgent, QString, KUpdateChannel, KUpdateSeverity,405 QString, QString, QString)),406 this, SIGNAL(sigUpdateAgentAvailable(CUpdateAgent, QString, KUpdateChannel, KUpdateSeverity,407 QString, QString, QString)),408 Qt::DirectConnection);409 connect(m_pProxy, SIGNAL(sigUpdateAgentError(CUpdateAgent, QString, long)),410 this, SIGNAL(sigUpdateAgentError(CUpdateAgent, QString, long)),411 Qt::DirectConnection);412 connect(m_pProxy, SIGNAL(sigUpdateAgentStateChanged(CUpdateAgent, KUpdateState)),413 this, SIGNAL(sigUpdateAgentStateChanged(CUpdateAgent, KUpdateState)),414 Qt::DirectConnection);415 connect(m_pProxy, SIGNAL(sigUpdateAgentSettingsChanged(CUpdateAgent, QString)),416 this, SIGNAL(sigUpdateAgentSettingsChanged(CUpdateAgent, QString)),417 Qt::QueuedConnection);418 378 } 419 379 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIVirtualBoxEventHandler.h
r98103 r98309 42 42 #include "CMedium.h" 43 43 #include "CMediumAttachment.h" 44 #include "CUpdateAgent.h"45 44 46 45 /* Forward declarations: */ … … 99 98 * @param fRegistered Brings whether medium is registered or unregistered. */ 100 99 void sigMediumRegistered(const QUuid &uMediumId, KDeviceType enmMediumType, bool fRegistered); 101 /** Notifies about an available update of an update agent. */102 void sigUpdateAgentAvailable(CUpdateAgent, QString, KUpdateChannel, KUpdateSeverity, QString, QString, QString);103 /** Notifies about an error of an update agent. */104 void sigUpdateAgentError(CUpdateAgent, QString, long);105 /** Notifies about a state change of an update agent. */106 void sigUpdateAgentStateChanged(CUpdateAgent, KUpdateState);107 /** Notifies about update agent @a comAgent settings change. */108 void sigUpdateAgentSettingsChanged(CUpdateAgent comAgent, const QString &strAttributeHint);109 100 110 101 public: -
trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationCenter.cpp
r98103 r98309 48 48 #include "UINotificationObjectItem.h" 49 49 #include "UINotificationModel.h" 50 #include "UIVirtualBoxEventHandler.h" /** @todo EXAMPLE -- REMOVE THIS */51 #include "CUpdateAgent.h" /** @todo EXAMPLE -- REMOVE THIS */52 50 53 51 /* Other VBox includes: */ … … 415 413 } 416 414 417 /** @todo EXAMPLE -- REMOVE THIS */418 void UINotificationCenter::sltUpdateAgentAvailable(CUpdateAgent comAgent, QString strVer, KUpdateChannel, KUpdateSeverity, QString, QString, QString)419 {420 RT_NOREF(comAgent, strVer);421 }422 423 415 void UINotificationCenter::sltHandleOpenButtonToggled(bool fToggled) 424 416 { … … 559 551 connect(m_pModel, &UINotificationModel::sigItemRemoved, 560 552 this, &UINotificationCenter::sltHandleModelItemRemoved); 561 /** @todo EXAMPLE -- REMOVE THIS */562 connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigUpdateAgentAvailable,563 this, &UINotificationCenter::sltUpdateAgentAvailable);564 553 } 565 554 } -
trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationCenter.h
r98103 r98309 118 118 /** Handles order changes. */ 119 119 void sltHandleOrderChange(); 120 121 /** @todo EXAMPLE -- REMOVE THIS */122 void sltUpdateAgentAvailable(CUpdateAgent comAgent, QString, KUpdateChannel, KUpdateSeverity, QString, QString, QString);123 120 124 121 /** Issues request to make open button @a fToggled. */
Note:
See TracChangeset
for help on using the changeset viewer.

