Changeset 46542 in vbox
- Timestamp:
- Jun 13, 2013 4:49:48 PM (11 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 2 added
- 12 edited
-
VirtualBox1.qrc (modified) (1 diff)
-
images/video_capture_16px.png (added)
-
images/video_capture_disabled_16px.png (added)
-
src/globals/UIMainEventListener.cpp (modified) (2 diffs)
-
src/globals/UIMainEventListener.h (modified) (2 diffs)
-
src/runtime/UIActionPoolRuntime.cpp (modified) (2 diffs)
-
src/runtime/UIActionPoolRuntime.h (modified) (1 diff)
-
src/runtime/UIConsoleEventHandler.cpp (modified) (3 diffs)
-
src/runtime/UIConsoleEventHandler.h (modified) (2 diffs)
-
src/runtime/UIMachineLogic.cpp (modified) (3 diffs)
-
src/runtime/UIMachineLogic.h (modified) (1 diff)
-
src/runtime/UIMachineMenuBar.cpp (modified) (1 diff)
-
src/runtime/UISession.cpp (modified) (3 diffs)
-
src/runtime/UISession.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/VirtualBox1.qrc
r45736 r46542 247 247 <file alias="save_state_16px.png">images/save_state_16px.png</file> 248 248 <file alias="save_state_disabled_16px.png">images/save_state_disabled_16px.png</file> 249 <file alias="video_capture_16px.png">images/video_capture_16px.png</file> 250 <file alias="video_capture_disabled_16px.png">images/video_capture_disabled_16px.png</file> 249 251 </qresource> 250 252 </RCC> -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMainEventListener.cpp
r44529 r46542 7 7 8 8 /* 9 * Copyright (C) 2010-201 2Oracle Corporation9 * Copyright (C) 2010-2013 Oracle Corporation 10 10 * 11 11 * This file is part of VirtualBox Open Source Edition (OSE), as … … 209 209 break; 210 210 } 211 case KVBoxEventType_OnVideoCaptureChanged: 212 { 213 emit sigVideoCaptureChange(); 214 break; 215 } 211 216 case KVBoxEventType_OnUSBControllerChanged: 212 217 { -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMainEventListener.h
r44529 r46542 6 6 7 7 /* 8 * Copyright (C) 2010-201 2Oracle Corporation8 * Copyright (C) 2010-2013 Oracle Corporation 9 9 * 10 10 * This file is part of VirtualBox Open Source Edition (OSE), as … … 73 73 void sigMediumChange(CMediumAttachment attachment); 74 74 void sigVRDEChange(); 75 void sigVideoCaptureChange(); 75 76 void sigUSBControllerChange(); 76 77 void sigUSBDeviceStateChange(CUSBDevice device, bool fAttached, CVirtualBoxErrorInfo error); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIActionPoolRuntime.cpp
r45736 r46542 879 879 setName(QApplication::translate("UIActionPool", "Enable R&emote Display")); 880 880 setStatusTip(QApplication::translate("UIActionPool", "Enable remote desktop (RDP) connections to this machine")); 881 } 882 }; 883 884 class UIActionToggleVideoCapture : public UIActionToggle 885 { 886 Q_OBJECT; 887 888 public: 889 890 UIActionToggleVideoCapture(UIActionPool *pParent) 891 : UIActionToggle(pParent, 892 ":/video_capture_16px.png", ":/video_capture_disabled_16px.png") 893 { 894 retranslateUi(); 895 } 896 897 protected: 898 899 QString shortcutExtraDataID() const 900 { 901 return QString("VideoCapture"); 902 } 903 904 void retranslateUi() 905 { 906 setName(QApplication::translate("UIActionPool", "Enable &Video Capture")); 907 setStatusTip(QApplication::translate("UIActionPool", "Enable video capture")); 881 908 } 882 909 }; … … 1145 1172 m_pool[UIActionIndexRuntime_Simple_SharedFoldersDialog] = new UIActionSimpleShowSharedFoldersDialog(this); 1146 1173 m_pool[UIActionIndexRuntime_Toggle_VRDEServer] = new UIActionToggleVRDEServer(this); 1174 m_pool[UIActionIndexRuntime_Toggle_VideoCapture] = new UIActionToggleVideoCapture(this); 1147 1175 m_pool[UIActionIndexRuntime_Simple_InstallGuestTools] = new UIActionSimplePerformInstallGuestTools(this); 1148 1176 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIActionPoolRuntime.h
r45736 r46542 65 65 UIActionIndexRuntime_Simple_SharedFoldersDialog, 66 66 UIActionIndexRuntime_Toggle_VRDEServer, 67 UIActionIndexRuntime_Toggle_VideoCapture, 67 68 UIActionIndexRuntime_Simple_InstallGuestTools, 68 69 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIConsoleEventHandler.cpp
r44529 r46542 7 7 8 8 /* 9 * Copyright (C) 2010-201 2Oracle Corporation9 * Copyright (C) 2010-2013 Oracle Corporation 10 10 * 11 11 * This file is part of VirtualBox Open Source Edition (OSE), as … … 73 73 << KVBoxEventType_OnVRDEServerChanged 74 74 << KVBoxEventType_OnVRDEServerInfoChanged 75 << KVBoxEventType_OnVideoCaptureChanged 75 76 << KVBoxEventType_OnUSBControllerChanged 76 77 << KVBoxEventType_OnUSBDeviceStateChanged … … 116 117 connect(pListener->getWrapped(), SIGNAL(sigVRDEChange()), 117 118 this, SIGNAL(sigVRDEChange()), 119 Qt::QueuedConnection); 120 121 connect(pListener->getWrapped(), SIGNAL(sigVideoCaptureChange()), 122 this, SIGNAL(sigVideoCaptureChange()), 118 123 Qt::QueuedConnection); 119 124 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIConsoleEventHandler.h
r44529 r46542 6 6 7 7 /* 8 * Copyright (C) 2010-201 2Oracle Corporation8 * Copyright (C) 2010-2013 Oracle Corporation 9 9 * 10 10 * This file is part of VirtualBox Open Source Edition (OSE), as … … 48 48 void sigMediumChange(CMediumAttachment attachment); 49 49 void sigVRDEChange(); 50 void sigVideoCaptureChange(); 50 51 void sigUSBControllerChange(); 51 52 void sigUSBDeviceStateChange(CUSBDevice device, bool fAttached, CVirtualBoxErrorInfo error); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r45939 r46542 747 747 m_pRunningOrPausedActions->addAction(gActionPool->action(UIActionIndexRuntime_Simple_SharedFoldersDialog)); 748 748 m_pRunningOrPausedActions->addAction(gActionPool->action(UIActionIndexRuntime_Toggle_VRDEServer)); 749 m_pRunningOrPausedActions->addAction(gActionPool->action(UIActionIndexRuntime_Toggle_VideoCapture)); 749 750 m_pRunningOrPausedActions->addAction(gActionPool->action(UIActionIndexRuntime_Simple_InstallGuestTools)); 750 751 … … 808 809 connect(gActionPool->action(UIActionIndexRuntime_Toggle_VRDEServer), SIGNAL(toggled(bool)), 809 810 this, SLOT(sltSwitchVrde(bool))); 811 connect(gActionPool->action(UIActionIndexRuntime_Toggle_VideoCapture), SIGNAL(toggled(bool)), 812 this, SLOT(sltToggleVideoCapture(bool))); 810 813 connect(gActionPool->action(UIActionIndexRuntime_Simple_InstallGuestTools), SIGNAL(triggered()), 811 814 this, SLOT(sltInstallGuestAdditions())); … … 1890 1893 } 1891 1894 1895 void UIMachineLogic::sltToggleVideoCapture(bool fEnabled) 1896 { 1897 /* Do not process if window(s) missed! */ 1898 if (!isMachineWindowsCreated()) 1899 return; 1900 1901 /* Make sure something had changed: */ 1902 CMachine machine = session().GetMachine(); 1903 if (machine.GetVideoCaptureEnabled() == fEnabled) 1904 return; 1905 1906 /* Machine is OK? */ 1907 if (machine.isOk()) 1908 { 1909 /* Update Video Capture state: */ 1910 machine.SetVideoCaptureEnabled(fEnabled); 1911 /* Machine still OK? */ 1912 if (machine.isOk()) 1913 { 1914 /* Save machine-settings: */ 1915 machine.SaveSettings(); 1916 } 1917 } 1918 /* Machine had failed on one of steps? */ 1919 if (!machine.isOk()) 1920 msgCenter().cannotSaveMachineSettings(machine, activeMachineWindow()); 1921 } 1922 1892 1923 void UIMachineLogic::sltInstallGuestAdditions() 1893 1924 { -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h
r45939 r46542 206 206 void sltChangeDragAndDropType(QAction *pAction); 207 207 void sltSwitchVrde(bool fOn); 208 void sltToggleVideoCapture(bool fEnabled); 208 209 void sltInstallGuestAdditions(); 209 210 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineMenuBar.cpp
r45842 r46542 245 245 pMenu->addAction(gActionPool->action(UIActionIndexRuntime_Simple_SharedFoldersDialog)); 246 246 pMenu->addAction(gActionPool->action(UIActionIndexRuntime_Toggle_VRDEServer)); 247 pMenu->addAction(gActionPool->action(UIActionIndexRuntime_Toggle_VideoCapture)); 247 248 pMenu->addSeparator(); 248 249 pMenu->addAction(gActionPool->action(UIActionIndexRuntime_Simple_InstallGuestTools)); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r46524 r46542 718 718 { 719 719 /* Get machine: */ 720 const CMachine &machine = session().GetMachine();720 const CMachine machine = session().GetMachine(); 721 721 /* Get VRDE server: */ 722 722 const CVRDEServer &server = machine.GetVRDEServer(); … … 729 729 /* Notify listeners about VRDE change: */ 730 730 emit sigVRDEChange(); 731 } 732 733 void UISession::sltVideoCaptureChange() 734 { 735 /* Get machine: */ 736 const CMachine machine = session().GetMachine(); 737 /* Check/Uncheck Video Capture action depending on feature status: */ 738 gActionPool->action(UIActionIndexRuntime_Toggle_VideoCapture)->setChecked(machine.GetVideoCaptureEnabled()); 739 /* Notify listeners about Video Capture change: */ 740 emit sigVideoCaptureChange(); 731 741 } 732 742 … … 806 816 connect(gConsoleEvents, SIGNAL(sigVRDEChange()), 807 817 this, SLOT(sltVRDEChange())); 818 819 connect(gConsoleEvents, SIGNAL(sigVideoCaptureChange()), 820 this, SLOT(sltVideoCaptureChange())); 808 821 809 822 connect(gConsoleEvents, SIGNAL(sigNetworkAdapterChange(CNetworkAdapter)), -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h
r45736 r46542 182 182 void sigMediumChange(const CMediumAttachment &mediumAttachment); 183 183 void sigVRDEChange(); 184 void sigVideoCaptureChange(); 184 185 void sigUSBControllerChange(); 185 186 void sigUSBDeviceStateChange(const CUSBDevice &device, bool bIsAttached, const CVirtualBoxErrorInfo &error); … … 214 215 void sltAdditionsChange(); 215 216 void sltVRDEChange(); 217 void sltVideoCaptureChange(); 216 218 void sltGuestMonitorChange(KGuestMonitorChangedEventType changeType, ulong uScreenId, QRect screenGeo); 217 219
Note:
See TracChangeset
for help on using the changeset viewer.

