Changeset 75645 in vbox
- Timestamp:
- Nov 21, 2018 3:32:58 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 126823
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIIndicatorsPool.cpp
r75361 r75645 1273 1273 } 1274 1274 1275 QPoint UIIndicatorsPool::mapIndicatorPositionToGlobal(IndicatorType enmIndicatorType, const QPoint &indicatorPosition) 1276 { 1277 if (m_pool.contains(enmIndicatorType)) 1278 return m_pool.value(enmIndicatorType)->mapToGlobal(indicatorPosition); 1279 return QPoint(0, 0); 1280 } 1281 1275 1282 void UIIndicatorsPool::sltHandleConfigurationChange(const QUuid &uMachineID) 1276 1283 { … … 1336 1343 { 1337 1344 /* Notify listener: */ 1338 emit sigContextMenuRequest(indicatorType, pEvent-> globalPos());1345 emit sigContextMenuRequest(indicatorType, pEvent->pos()); 1339 1346 return; 1340 1347 } -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIIndicatorsPool.h
r74942 r75645 64 64 void setAutoUpdateIndicatorStates(bool fEnabled); 65 65 66 /** Returns global screen position corresponding to @a indicatorPosition inside indicator of @a enmIndicatorType. */ 67 QPoint mapIndicatorPositionToGlobal(IndicatorType enmIndicatorType, const QPoint &indicatorPosition); 68 66 69 private slots: 67 70 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp
r75319 r75645 205 205 } 206 206 207 void UIMachineWindowNormal::sltHandleIndicatorContextMenuRequest(IndicatorType indicatorType, const QPoint &position)207 void UIMachineWindowNormal::sltHandleIndicatorContextMenuRequest(IndicatorType enmIndicatorType, const QPoint &indicatorPosition) 208 208 { 209 209 /* Determine action depending on indicator-type: */ 210 210 UIAction *pAction = 0; 211 switch ( indicatorType)211 switch (enmIndicatorType) 212 212 { 213 213 case IndicatorType_HardDisks: pAction = actionPool()->action(UIActionIndexRT_M_Devices_M_HardDrives); break; … … 226 226 /* Raise action's context-menu: */ 227 227 if (pAction && pAction->isEnabled()) 228 pAction->menu()->exec( position);228 pAction->menu()->exec(m_pIndicatorsPool->mapIndicatorPositionToGlobal(enmIndicatorType, indicatorPosition)); 229 229 } 230 230 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.h
r75291 r75645 78 78 void sltHandleStatusBarContextMenuRequest(const QPoint &position); 79 79 /** Handles status-bar indicator context-menu-request. */ 80 void sltHandleIndicatorContextMenuRequest(IndicatorType indicatorType, const QPoint &position);80 void sltHandleIndicatorContextMenuRequest(IndicatorType enmIndicatorType, const QPoint &indicatorPosition); 81 81 82 82 #ifdef VBOX_WS_MAC
Note:
See TracChangeset
for help on using the changeset viewer.