- Timestamp:
- Sep 2, 2019 9:34:46 AM (5 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
r79365 r80543 27 27 #include "COMEnums.h" 28 28 #include "CCanShowWindowEvent.h" 29 #include "CClipboardModeChangedEvent.h" 29 30 #include "CCursorPositionChangedEvent.h" 31 #include "CDnDModeChangedEvent.h" 30 32 #include "CEvent.h" 31 33 #include "CEventSource.h" … … 523 525 break; 524 526 } 525 527 case KVBoxEventType_OnClipboardModeChanged: 528 { 529 CClipboardModeChangedEvent comEventSpecific(pEvent); 530 emit sigClipboardModeChange(comEventSpecific.GetClipboardMode()); 531 break; 532 } 533 case KVBoxEventType_OnDnDModeChanged: 534 { 535 CDnDModeChangedEvent comEventSpecific(pEvent); 536 emit sigDnDModeChange(comEventSpecific.GetDndMode()); 537 break; 538 } 526 539 default: break; 527 540 } … … 534 547 535 548 #include "UIMainEventListener.moc" 536 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMainEventListener.h
r80044 r80543 167 167 /** Notifies about audio adapter state change. */ 168 168 void sigAudioAdapterChange(); 169 /** Notifies about the clipboard mode change. */ 170 void sigClipboardModeChange(KClipboardMode enmClipboardMode); 171 /** Notifies about the drag and drop mode change. */ 172 void sigDnDModeChange(KDnDMode enmDnDMode); 169 173 /** @} */ 170 174 … … 216 220 217 221 #endif /* !FEQT_INCLUDED_SRC_globals_UIMainEventListener_h */ 218 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r79365 r80543 800 800 emit sigAudioAdapterChange(); 801 801 802 } 803 804 void UISession::sltClipboardModeChange(KClipboardMode enmMode) 805 { 806 emit sigClipboardModeChange(enmMode); 807 } 808 809 void UISession::sltDnDModeChange(KDnDMode enmMode) 810 { 811 emit sigDnDModeChange(enmMode); 802 812 } 803 813 … … 1189 1199 connect(gConsoleEvents, SIGNAL(sigAudioAdapterChange()), 1190 1200 this, SLOT(sltAudioAdapterChange())); 1201 1202 connect(gConsoleEvents, SIGNAL(sigClipboardModeChange(KClipboardMode)), 1203 this, SLOT(sltClipboardModeChange(KClipboardMode))); 1204 1205 connect(gConsoleEvents, SIGNAL(sigDnDModeChange(KDnDMode)), 1206 this, SLOT(sltDnDModeChange(KDnDMode))); 1191 1207 } 1192 1208 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h
r77841 r80543 336 336 void sigGuestMonitorChange(KGuestMonitorChangedEventType changeType, ulong uScreenId, QRect screenGeo); 337 337 void sigAudioAdapterChange(); 338 void sigClipboardModeChange(KClipboardMode enmMode); 339 void sigDnDModeChange(KDnDMode enmMode); 338 340 339 341 /** Notifies about host-screen count change. */ … … 388 390 /** Handles audio adapter change. */ 389 391 void sltAudioAdapterChange(); 392 /** Handles clip board mode change. */ 393 void sltClipboardModeChange(KClipboardMode enmMode); 394 /** Handles drag and drop mode change. */ 395 void sltDnDModeChange(KDnDMode enmMode); 390 396 391 397 /* Handlers: Display reconfiguration stuff: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/UIInformationRuntime.cpp
r80525 r80543 80 80 81 81 UIRuntimeInfoWidget(QWidget *pParent, const CMachine &machine, const CConsole &console); 82 void guestMonitorChange(ulong uScreenId); 83 void guestAdditionStateChange(); 84 void VRDEChange(); 82 void updateScreenInfo(int iScreenId = -1); 83 void updateGAsVersion(); 84 void updateVRDE(); 85 void updateClipboardMode(KClipboardMode enmMode = KClipboardMode_Max); 86 void updateDnDMode(KDnDMode enmMode = KDnDMode_Max); 85 87 86 88 protected: … … 97 99 98 100 void createInfoRows(); 99 void updateScreenInfo(int iScreenId = -1);100 101 void updateUpTime(); 101 void updateGAsVersion(); 102 void updateVRDE(); 102 103 103 104 /** Searches the table for the @p item of enmLine and replaces its text. if not found inserts a new 104 105 * row to the end of the table. Assumes only one line of the @p enmLine exists. */ … … 234 235 { 235 236 setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); 236 237 setAlternatingRowColors(true); 237 238 m_iFontHeight = QFontMetrics(font()).height(); 238 239 … … 266 267 computeMinimumWidth(); 267 268 } 268 269 void UIRuntimeInfoWidget::guestMonitorChange(ulong uScreenId)270 {271 updateScreenInfo(uScreenId);272 }273 274 void UIRuntimeInfoWidget::guestAdditionStateChange()275 {276 updateGAsVersion();277 }278 279 void UIRuntimeInfoWidget::VRDEChange()280 {281 updateVRDE();282 }283 284 269 285 270 void UIRuntimeInfoWidget::retranslateUi() … … 423 408 void UIRuntimeInfoWidget::updateVRDE() 424 409 { 425 /* VRDE information: */426 410 int iVRDEPort = m_console.GetVRDEServerInfo().GetPort(); 427 411 QString strVRDEInfo = (iVRDEPort == 0 || iVRDEPort == -1) ? 428 412 m_strNotAvailable : QString("%1").arg(iVRDEPort); 429 413 updateInfoRow(InfoRow_RemoteDesktop, QString("%1:").arg(m_strRemoteDesktopLabel), strVRDEInfo); 414 } 415 416 void UIRuntimeInfoWidget::updateClipboardMode(KClipboardMode enmMode /* = KClipboardMode_Max */) 417 { 418 if (enmMode == KClipboardMode_Max) 419 updateInfoRow(InfoRow_ClipboardMode, QString("%1:").arg(m_strClipboardModeLabel), 420 gpConverter->toString(m_machine.GetClipboardMode())); 421 else 422 updateInfoRow(InfoRow_ClipboardMode, QString("%1:").arg(m_strClipboardModeLabel), 423 gpConverter->toString(enmMode)); 424 } 425 426 void UIRuntimeInfoWidget::updateDnDMode(KDnDMode enmMode /* = KDnDMode_Max */) 427 { 428 if (enmMode == KDnDMode_Max) 429 updateInfoRow(InfoRow_DnDMode, QString("%1:").arg(m_strDragAndDropLabel), 430 gpConverter->toString(m_machine.GetDnDMode())); 431 else 432 updateInfoRow(InfoRow_DnDMode, QString("%1:").arg(m_strDragAndDropLabel), 433 gpConverter->toString(enmMode)); 430 434 } 431 435 … … 452 456 updateUpTime(); 453 457 454 /* Determine clipboard mode: */455 QString strClipboardMode = gpConverter->toString(m_machine.GetClipboardMode());456 /* Determine Drag&Drop mode: */457 QString strDnDMode = gpConverter->toString(m_machine.GetDnDMode());458 458 459 459 /* Determine virtualization attributes: */ … … 496 496 strOSType = uiCommon().vmGuestOSTypeDescription(strOSType); 497 497 498 499 insertInfoRow(InfoRow_ClipboardMode, QString("%1:").arg(m_strClipboardModeLabel), strClipboardMode); 500 insertInfoRow(InfoRow_DnDMode, QString("%1:").arg(m_strDragAndDropLabel), strDnDMode); 498 updateClipboardMode(); 499 updateDnDMode(); 501 500 insertInfoRow(InfoRow_ExecutionEngine, QString("%1:").arg(m_strExcutionEngineLabel), strExecutionEngine); 502 501 insertInfoRow(InfoRow_NestedPaging, QString("%1:").arg(m_strNestedPagingLabel), strNestedPaging); … … 506 505 insertInfoRow(InfoRow_GuestOSType, QString("%1:").arg(m_strGuestOSTypeLabel), strOSType); 507 506 updateVRDE(); 508 509 507 510 508 resizeColumnToContents(0); … … 1119 1117 connect(pSession, &UISession::sigGuestMonitorChange, this, &UIInformationRuntime::sltGuestMonitorChange); 1120 1118 connect(pSession, &UISession::sigVRDEChange, this, &UIInformationRuntime::sltVRDEChange); 1119 connect(pSession, &UISession::sigClipboardModeChange, this, &UIInformationRuntime::sltClipboardChange); 1120 connect(pSession, &UISession::sigDnDModeChange, this, &UIInformationRuntime::sltDnDModeChange); 1121 1121 1122 1122 prepareMetrics(); … … 1371 1371 { 1372 1372 if (m_pRuntimeInfoWidget) 1373 m_pRuntimeInfoWidget-> guestAdditionStateChange();1373 m_pRuntimeInfoWidget->updateGAsVersion(); 1374 1374 bool fGuestAdditionsAvailable = guestAdditionsAvailable(6 /* minimum major version */); 1375 1375 if (m_fGuestAdditionsAvailable == fGuestAdditionsAvailable) … … 1384 1384 Q_UNUSED(screenGeo); 1385 1385 if (m_pRuntimeInfoWidget) 1386 m_pRuntimeInfoWidget-> guestMonitorChange(uScreenId);1386 m_pRuntimeInfoWidget->updateScreenInfo(uScreenId); 1387 1387 } 1388 1388 … … 1390 1390 { 1391 1391 if (m_pRuntimeInfoWidget) 1392 m_pRuntimeInfoWidget->VRDEChange(); 1392 m_pRuntimeInfoWidget->updateVRDE(); 1393 } 1394 1395 void UIInformationRuntime::sltClipboardChange(KClipboardMode enmMode) 1396 { 1397 if (m_pRuntimeInfoWidget) 1398 m_pRuntimeInfoWidget->updateClipboardMode(enmMode); 1399 } 1400 1401 void UIInformationRuntime::sltDnDModeChange(KDnDMode enmMode) 1402 { 1403 if (m_pRuntimeInfoWidget) 1404 m_pRuntimeInfoWidget->updateDnDMode(enmMode); 1393 1405 } 1394 1406 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/UIInformationRuntime.h
r80525 r80543 157 157 void sltGuestMonitorChange(KGuestMonitorChangedEventType changeType, ulong uScreenId, QRect screenGeo); 158 158 void sltVRDEChange(); 159 void sltClipboardChange(KClipboardMode enmMode); 160 void sltDnDModeChange(KDnDMode enmMode); 159 161 160 162 private:
Note:
See TracChangeset
for help on using the changeset viewer.