Changeset 14478 in vbox
- Timestamp:
- Nov 21, 2008 5:44:17 PM (16 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox4
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox4/include/VBoxConsoleWnd.h
r13580 r14478 210 210 QActionGroup *mRunningOrPausedActions; 211 211 212 / / Machine actions213 QAction * vmFullscreenAction;214 QAction * vmSeamlessAction;215 QAction * vmAutoresizeGuestAction;216 QAction * vmAdjustWindowAction;217 QAction * vmTypeCADAction;212 /* Machine actions */ 213 QAction *mVmFullscreenAction; 214 QAction *mVmSeamlessAction; 215 QAction *mVmAutoresizeGuestAction; 216 QAction *mVmAdjustWindowAction; 217 QAction *mVmTypeCADAction; 218 218 #if defined(Q_WS_X11) 219 QAction * vmTypeCABSAction;220 #endif 221 QAction * vmResetAction;222 QAction * vmPauseAction;223 QAction * vmACPIShutdownAction;224 QAction * vmCloseAction;225 QAction * vmTakeSnapshotAction;226 QAction * vmDisableMouseIntegrAction;227 QAction * vmShowInformationDlgAction;228 229 / / Devices actions230 QAction * devicesMountFloppyImageAction;231 QAction * devicesUnmountFloppyAction;232 QAction * devicesMountDVDImageAction;233 QAction * devicesUnmountDVDAction;234 QAction * devicesSwitchVrdpAction;235 QAction * devicesSFDialogAction;236 QAction * devicesInstallGuestToolsAction;237 238 #ifdef VBOX_WITH_DEBUGGER_GUI 239 / / Debugger actions240 QAction * dbgStatisticsAction;241 QAction * dbgCommandLineAction;242 QAction * dbgLoggingAction;243 #endif 244 245 / / Help actions219 QAction *mVmTypeCABSAction; 220 #endif 221 QAction *mVmResetAction; 222 QAction *mVmPauseAction; 223 QAction *mVmACPIShutdownAction; 224 QAction *mVmCloseAction; 225 QAction *mVmTakeSnapshotAction; 226 QAction *mVmDisableMouseIntegrAction; 227 QAction *mVmShowInformationDlgAction; 228 229 /* Devices actions */ 230 QAction *mDevicesMountFloppyImageAction; 231 QAction *mDevicesUnmountFloppyAction; 232 QAction *mDevicesMountDVDImageAction; 233 QAction *mDevicesUnmountDVDAction; 234 QAction *mDevicesSwitchVrdpAction; 235 QAction *mDevicesSFDialogAction; 236 QAction *mDevicesInstallGuestToolsAction; 237 238 #ifdef VBOX_WITH_DEBUGGER_GUI 239 /* Debugger actions */ 240 QAction *mDbgStatisticsAction; 241 QAction *mDbgCommandLineAction; 242 QAction *mDbgLoggingAction; 243 #endif 244 245 /* Help actions */ 246 246 VBoxHelpActions mHelpActions; 247 247 248 / / Machine popup menus249 VBoxSwitchMenu * vmAutoresizeMenu;250 VBoxSwitchMenu * vmDisMouseIntegrMenu;251 252 / / Devices popup menus253 bool waitForStatusBarChange;254 bool statusBarChangedInside;248 /* Machine popup menus */ 249 VBoxSwitchMenu *mVmAutoresizeMenu; 250 VBoxSwitchMenu *mVmDisMouseIntegrMenu; 251 252 /* Devices popup menus */ 253 bool mWaitForStatusBarChange : 1; 254 bool mStatusBarChangedInside : 1; 255 255 256 256 QAction *mDevicesUSBMenuSeparator; -
trunk/src/VBox/Frontends/VirtualBox4/include/VBoxSelectorWnd.h
r14467 r14478 96 96 #endif 97 97 98 const QAction *vmNewAction() const { return mVmNewAction; } 99 const QAction *vmConfigAction() const { return mVmConfigAction; } 100 const QAction *vmDeleteAction() const { return mVmDeleteAction; } 101 const QAction *vmStartAction() const { return mVmStartAction; } 102 const QAction *vmDiscardAction() const { return mVmDiscardAction; } 103 const QAction *vmPauseAction() const { return mVmPauseAction; } 104 const QAction *vmRefreshAction() const { return mVmRefreshAction; } 105 const QAction *vmShowLogsAction() const { return mVmShowLogsAction; } 106 98 107 protected: 99 108 … … 135 144 136 145 /* Actions */ 137 QAction * fileMediaMgrAction;138 QAction * fileSettingsAction;139 QAction * fileExitAction;140 QAction * vmNewAction;141 QAction * vmConfigAction;142 QAction * vmDeleteAction;143 QAction * vmStartAction;144 QAction * vmDiscardAction;145 QAction * vmPauseAction;146 QAction * vmRefreshAction;147 QAction * vmShowLogsAction;146 QAction *mFileMediaMgrAction; 147 QAction *mFileSettingsAction; 148 QAction *mFileExitAction; 149 QAction *mVmNewAction; 150 QAction *mVmConfigAction; 151 QAction *mVmDeleteAction; 152 QAction *mVmStartAction; 153 QAction *mVmDiscardAction; 154 QAction *mVmPauseAction; 155 QAction *mVmRefreshAction; 156 QAction *mVmShowLogsAction; 148 157 149 158 VBoxHelpActions mHelpActions; … … 159 168 160 169 /* The right information widgets */ 161 QTabWidget * vmTabWidget;162 VBoxVMDetailsView * vmDetailsView;163 VBoxSnapshotsWgt * vmSnapshotsWgt;164 VBoxVMDescriptionPage * vmDescriptionPage;165 166 QPoint normal_pos;167 QSize normal_size;168 169 bool doneInaccessibleWarningOnce : 1;170 QTabWidget *mVmTabWidget; 171 VBoxVMDetailsView *mVmDetailsView; 172 VBoxSnapshotsWgt *mVmSnapshotsWgt; 173 VBoxVMDescriptionPage *mVmDescriptionPage; 174 175 QPoint mNormalPos; 176 QSize mNormalSize; 177 178 bool mDoneInaccessibleWarningOnce : 1; 170 179 }; 171 180 -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxConsoleWnd.cpp
r14295 r14478 217 217 , mMainMenu (0) 218 218 #ifdef VBOX_WITH_DEBUGGER_GUI 219 , dbgStatisticsAction (NULL)220 , dbgCommandLineAction (NULL)221 , dbgLoggingAction (NULL)219 , mDbgStatisticsAction (NULL) 220 , mDbgCommandLineAction (NULL) 221 , mDbgLoggingAction (NULL) 222 222 , mDbgMenu (NULL) 223 223 #endif … … 278 278 /* VM menu actions */ 279 279 280 vmFullscreenAction = new QAction (this);281 vmFullscreenAction->setIcon (280 mVmFullscreenAction = new QAction (this); 281 mVmFullscreenAction->setIcon ( 282 282 VBoxGlobal::iconSet (":/fullscreen_16px.png", ":/fullscreen_disabled_16px.png")); 283 vmFullscreenAction->setCheckable (true);284 285 vmSeamlessAction = new QAction (this);286 vmSeamlessAction->setIcon (283 mVmFullscreenAction->setCheckable (true); 284 285 mVmSeamlessAction = new QAction (this); 286 mVmSeamlessAction->setIcon ( 287 287 VBoxGlobal::iconSet (":/nw_16px.png", ":/nw_disabled_16px.png")); 288 vmSeamlessAction->setCheckable (true);289 290 vmAutoresizeGuestAction = new QAction (mRunningActions);291 vmAutoresizeGuestAction->setIcon (288 mVmSeamlessAction->setCheckable (true); 289 290 mVmAutoresizeGuestAction = new QAction (mRunningActions); 291 mVmAutoresizeGuestAction->setIcon ( 292 292 VBoxGlobal::iconSet (":/auto_resize_on_16px.png", ":/auto_resize_on_disabled_16px.png")); 293 vmAutoresizeGuestAction->setCheckable (true);294 vmAutoresizeGuestAction->setEnabled (false);295 296 vmAdjustWindowAction = new QAction (this);297 vmAdjustWindowAction->setIcon (293 mVmAutoresizeGuestAction->setCheckable (true); 294 mVmAutoresizeGuestAction->setEnabled (false); 295 296 mVmAdjustWindowAction = new QAction (this); 297 mVmAdjustWindowAction->setIcon ( 298 298 VBoxGlobal::iconSet (":/adjust_win_size_16px.png", 299 299 ":/adjust_win_size_disabled_16px.png")); 300 300 301 vmTypeCADAction = new QAction (mRunningActions);302 vmTypeCADAction->setIcon (VBoxGlobal::iconSet (":/hostkey_16px.png",301 mVmTypeCADAction = new QAction (mRunningActions); 302 mVmTypeCADAction->setIcon (VBoxGlobal::iconSet (":/hostkey_16px.png", 303 303 ":/hostkey_disabled_16px.png")); 304 304 305 305 #if defined(Q_WS_X11) 306 vmTypeCABSAction = new QAction (mRunningActions);307 vmTypeCABSAction->setIcon (VBoxGlobal::iconSet (":/hostkey_16px.png",306 mVmTypeCABSAction = new QAction (mRunningActions); 307 mVmTypeCABSAction->setIcon (VBoxGlobal::iconSet (":/hostkey_16px.png", 308 308 ":/hostkey_disabled_16px.png")); 309 309 #endif 310 310 311 vmResetAction = new QAction (mRunningActions);312 vmResetAction->setIcon (VBoxGlobal::iconSet (":/reset_16px.png",311 mVmResetAction = new QAction (mRunningActions); 312 mVmResetAction->setIcon (VBoxGlobal::iconSet (":/reset_16px.png", 313 313 ":/reset_disabled_16px.png")); 314 314 315 vmPauseAction = new QAction (this);316 vmPauseAction->setIcon (VBoxGlobal::iconSet (":/pause_16px.png"));317 vmPauseAction->setCheckable (true);318 319 vmACPIShutdownAction = new QAction (mRunningActions);320 vmACPIShutdownAction->setIcon (315 mVmPauseAction = new QAction (this); 316 mVmPauseAction->setIcon (VBoxGlobal::iconSet (":/pause_16px.png")); 317 mVmPauseAction->setCheckable (true); 318 319 mVmACPIShutdownAction = new QAction (mRunningActions); 320 mVmACPIShutdownAction->setIcon ( 321 321 VBoxGlobal::iconSet (":/acpi_16px.png", ":/acpi_disabled_16px.png")); 322 322 323 vmCloseAction = new QAction (this);324 vmCloseAction->setMenuRole (QAction::QuitRole);325 vmCloseAction->setIcon (VBoxGlobal::iconSet (":/exit_16px.png"));326 327 vmTakeSnapshotAction = new QAction (mRunningOrPausedActions);328 vmTakeSnapshotAction->setIcon (VBoxGlobal::iconSet (323 mVmCloseAction = new QAction (this); 324 mVmCloseAction->setMenuRole (QAction::QuitRole); 325 mVmCloseAction->setIcon (VBoxGlobal::iconSet (":/exit_16px.png")); 326 327 mVmTakeSnapshotAction = new QAction (mRunningOrPausedActions); 328 mVmTakeSnapshotAction->setIcon (VBoxGlobal::iconSet ( 329 329 ":/take_snapshot_16px.png", ":/take_snapshot_dis_16px.png")); 330 330 331 vmShowInformationDlgAction = new QAction (this);332 vmShowInformationDlgAction->setIcon (VBoxGlobal::iconSet (331 mVmShowInformationDlgAction = new QAction (this); 332 mVmShowInformationDlgAction->setIcon (VBoxGlobal::iconSet ( 333 333 ":/session_info_16px.png", ":/session_info_disabled_16px.png")); 334 334 335 vmDisableMouseIntegrAction = new QAction (this);336 vmDisableMouseIntegrAction->setIcon (VBoxGlobal::iconSet (335 mVmDisableMouseIntegrAction = new QAction (this); 336 mVmDisableMouseIntegrAction->setIcon (VBoxGlobal::iconSet ( 337 337 ":/mouse_can_seamless_16px.png", ":/mouse_can_seamless_disabled_16px.png")); 338 vmDisableMouseIntegrAction->setCheckable (true);338 mVmDisableMouseIntegrAction->setCheckable (true); 339 339 340 340 /* Devices menu actions */ 341 341 342 devicesMountFloppyImageAction = new QAction (mRunningOrPausedActions);343 344 devicesUnmountFloppyAction = new QAction (this);345 devicesUnmountFloppyAction->setIcon (VBoxGlobal::iconSet (":/fd_unmount_16px.png",342 mDevicesMountFloppyImageAction = new QAction (mRunningOrPausedActions); 343 344 mDevicesUnmountFloppyAction = new QAction (this); 345 mDevicesUnmountFloppyAction->setIcon (VBoxGlobal::iconSet (":/fd_unmount_16px.png", 346 346 ":/fd_unmount_dis_16px.png")); 347 347 348 devicesMountDVDImageAction = new QAction (mRunningOrPausedActions);349 350 devicesUnmountDVDAction = new QAction (this);351 devicesUnmountDVDAction->setIcon (VBoxGlobal::iconSet (":/cd_unmount_16px.png",348 mDevicesMountDVDImageAction = new QAction (mRunningOrPausedActions); 349 350 mDevicesUnmountDVDAction = new QAction (this); 351 mDevicesUnmountDVDAction->setIcon (VBoxGlobal::iconSet (":/cd_unmount_16px.png", 352 352 ":/cd_unmount_dis_16px.png")); 353 353 354 devicesSFDialogAction = new QAction (mRunningOrPausedActions);355 devicesSFDialogAction->setIcon (VBoxGlobal::iconSet (":/shared_folder_16px.png",354 mDevicesSFDialogAction = new QAction (mRunningOrPausedActions); 355 mDevicesSFDialogAction->setIcon (VBoxGlobal::iconSet (":/shared_folder_16px.png", 356 356 ":/shared_folder_disabled_16px.png")); 357 357 358 devicesSwitchVrdpAction = new QAction (mRunningOrPausedActions);359 devicesSwitchVrdpAction->setIcon (VBoxGlobal::iconSet (":/vrdp_16px.png",358 mDevicesSwitchVrdpAction = new QAction (mRunningOrPausedActions); 359 mDevicesSwitchVrdpAction->setIcon (VBoxGlobal::iconSet (":/vrdp_16px.png", 360 360 ":/vrdp_disabled_16px.png")); 361 devicesSwitchVrdpAction->setCheckable (true);362 363 devicesInstallGuestToolsAction = new QAction (mRunningActions);364 devicesInstallGuestToolsAction->setIcon (VBoxGlobal::iconSet (":/guesttools_16px.png",361 mDevicesSwitchVrdpAction->setCheckable (true); 362 363 mDevicesInstallGuestToolsAction = new QAction (mRunningActions); 364 mDevicesInstallGuestToolsAction->setIcon (VBoxGlobal::iconSet (":/guesttools_16px.png", 365 365 ":/guesttools_disabled_16px.png")); 366 366 … … 368 368 if (vboxGlobal().isDebuggerEnabled()) 369 369 { 370 dbgStatisticsAction = new QAction (this);371 dbgCommandLineAction = new QAction (this);370 mDbgStatisticsAction = new QAction (this); 371 mDbgCommandLineAction = new QAction (this); 372 372 if (vboxGlobal().getDebuggerModule()== NIL_RTLDRMOD) 373 373 { 374 dbgStatisticsAction->setEnabled (false);375 dbgCommandLineAction->setEnabled (false);376 } 377 dbgLoggingAction = new QAction (this);378 dbgLoggingAction->setCheckable (true);374 mDbgStatisticsAction->setEnabled (false); 375 mDbgCommandLineAction->setEnabled (false); 376 } 377 mDbgLoggingAction = new QAction (this); 378 mDbgLoggingAction->setCheckable (true); 379 379 } 380 380 else 381 381 { 382 dbgStatisticsAction = NULL;383 dbgCommandLineAction = NULL;384 dbgLoggingAction = NULL;382 mDbgStatisticsAction = NULL; 383 mDbgCommandLineAction = NULL; 384 mDbgLoggingAction = NULL; 385 385 } 386 386 #endif … … 400 400 401 401 /* dynamic & status line popup menus */ 402 vmAutoresizeMenu = new VBoxSwitchMenu (mVMMenu, vmAutoresizeGuestAction);403 vmDisMouseIntegrMenu = new VBoxSwitchMenu (mVMMenu, vmDisableMouseIntegrAction,402 mVmAutoresizeMenu = new VBoxSwitchMenu (mVMMenu, mVmAutoresizeGuestAction); 403 mVmDisMouseIntegrMenu = new VBoxSwitchMenu (mVMMenu, mVmDisableMouseIntegrAction, 404 404 true /* inverted toggle state */); 405 405 406 mVMMenu->addAction ( vmFullscreenAction);407 mVMMenu->addAction ( vmSeamlessAction);408 mVMMenu->addAction ( vmAdjustWindowAction);409 mVMMenu->addAction ( vmAutoresizeGuestAction);406 mVMMenu->addAction (mVmFullscreenAction); 407 mVMMenu->addAction (mVmSeamlessAction); 408 mVMMenu->addAction (mVmAdjustWindowAction); 409 mVMMenu->addAction (mVmAutoresizeGuestAction); 410 410 mVMMenu->addSeparator(); 411 mVMMenu->addAction ( vmDisableMouseIntegrAction);411 mVMMenu->addAction (mVmDisableMouseIntegrAction); 412 412 mVMMenu->addSeparator(); 413 mVMMenu->addAction ( vmTypeCADAction);413 mVMMenu->addAction (mVmTypeCADAction); 414 414 #if defined(Q_WS_X11) 415 mVMMenu->addAction ( vmTypeCABSAction);415 mVMMenu->addAction (mVmTypeCABSAction); 416 416 #endif 417 417 mVMMenu->addSeparator(); 418 mVMMenu->addAction ( vmTakeSnapshotAction);418 mVMMenu->addAction (mVmTakeSnapshotAction); 419 419 mVMMenu->addSeparator(); 420 mVMMenu->addAction ( vmShowInformationDlgAction);420 mVMMenu->addAction (mVmShowInformationDlgAction); 421 421 mVMMenu->addSeparator(); 422 mVMMenu->addAction ( vmResetAction);423 mVMMenu->addAction ( vmPauseAction);424 mVMMenu->addAction ( vmACPIShutdownAction);422 mVMMenu->addAction (mVmResetAction); 423 mVMMenu->addAction (mVmPauseAction); 424 mVMMenu->addAction (mVmACPIShutdownAction); 425 425 mVMMenu->addSeparator(); 426 mVMMenu->addAction ( vmCloseAction);426 mVMMenu->addAction (mVmCloseAction); 427 427 428 428 /* Devices submenu */ … … 434 434 435 435 mDevicesMountDVDMenu = mDevicesMenu->addMenu (VBoxGlobal::iconSet (":/cd_16px.png", ":/cd_disabled_16px.png"), QString::null); 436 mDevicesMenu->addAction ( devicesUnmountDVDAction);436 mDevicesMenu->addAction (mDevicesUnmountDVDAction); 437 437 mDevicesMenu->addSeparator(); 438 438 439 439 mDevicesMountFloppyMenu = mDevicesMenu->addMenu (VBoxGlobal::iconSet (":/fd_16px.png", ":/fd_disabled_16px.png"), QString::null); 440 mDevicesMenu->addAction ( devicesUnmountFloppyAction);440 mDevicesMenu->addAction (mDevicesUnmountFloppyAction); 441 441 mDevicesMenu->addSeparator(); 442 442 … … 451 451 /* see showIndicatorContextMenu for a description of mDevicesSFMenu */ 452 452 /* mDevicesSFMenu = mDevicesMenu->addMenu (QString::null); */ 453 mDevicesMenu->addAction ( devicesSFDialogAction);453 mDevicesMenu->addAction (mDevicesSFDialogAction); 454 454 mDevicesSFMenuSeparator = mDevicesMenu->addSeparator(); 455 455 456 456 /* Currently not needed cause there is no state icon in the statusbar */ 457 /* mDevicesVRDPMenu = new VBoxSwitchMenu (mDevicesMenu, devicesSwitchVrdpAction); */458 mDevicesMenu->addAction ( devicesSwitchVrdpAction);457 /* mDevicesVRDPMenu = new VBoxSwitchMenu (mDevicesMenu, mDevicesSwitchVrdpAction); */ 458 mDevicesMenu->addAction (mDevicesSwitchVrdpAction); 459 459 mDevicesVRDPMenuSeparator = mDevicesMenu->addSeparator(); 460 460 461 mDevicesMenu->addAction ( devicesInstallGuestToolsAction);461 mDevicesMenu->addAction (mDevicesInstallGuestToolsAction); 462 462 463 463 /* reset the "context menu" flag */ … … 472 472 mDbgMenu = menuBar()->addMenu (QString::null); 473 473 mMainMenu->addMenu (mDbgMenu); 474 mDbgMenu->addAction ( dbgStatisticsAction);475 mDbgMenu->addAction ( dbgCommandLineAction);476 mDbgMenu->addAction ( dbgLoggingAction);474 mDbgMenu->addAction (mDbgStatisticsAction); 475 mDbgMenu->addAction (mDbgCommandLineAction); 476 mDbgMenu->addAction (mDbgLoggingAction); 477 477 } 478 478 else … … 582 582 ///// Connections /////////////////////////////////////////////////////// 583 583 584 connect ( vmFullscreenAction, SIGNAL (toggled (bool)),584 connect (mVmFullscreenAction, SIGNAL (toggled (bool)), 585 585 this, SLOT (vmFullscreen (bool))); 586 connect ( vmSeamlessAction, SIGNAL (toggled (bool)),586 connect (mVmSeamlessAction, SIGNAL (toggled (bool)), 587 587 this, SLOT (vmSeamless (bool))); 588 connect ( vmAutoresizeGuestAction, SIGNAL (toggled (bool)),588 connect (mVmAutoresizeGuestAction, SIGNAL (toggled (bool)), 589 589 this, SLOT (vmAutoresizeGuest (bool))); 590 connect ( vmAdjustWindowAction, SIGNAL (triggered()),590 connect (mVmAdjustWindowAction, SIGNAL (triggered()), 591 591 this, SLOT (vmAdjustWindow())); 592 592 593 connect ( vmTypeCADAction, SIGNAL(triggered()), this, SLOT(vmTypeCAD()));593 connect (mVmTypeCADAction, SIGNAL(triggered()), this, SLOT(vmTypeCAD())); 594 594 #if defined(Q_WS_X11) 595 connect ( vmTypeCABSAction, SIGNAL(triggered()), this, SLOT(vmTypeCABS()));596 #endif 597 connect ( vmResetAction, SIGNAL(triggered()), this, SLOT (vmReset()));598 connect ( vmPauseAction, SIGNAL(toggled (bool)), this, SLOT (vmPause (bool)));599 connect ( vmACPIShutdownAction, SIGNAL (triggered()), this, SLOT (vmACPIShutdown()));600 connect ( vmCloseAction, SIGNAL(triggered()), this, SLOT (vmClose()));601 602 connect ( vmTakeSnapshotAction, SIGNAL(triggered()), this, SLOT(vmTakeSnapshot()));603 connect ( vmShowInformationDlgAction, SIGNAL(triggered()), this, SLOT (vmShowInfoDialog()));604 605 connect ( vmDisableMouseIntegrAction, SIGNAL(toggled (bool)), this, SLOT(vmDisableMouseIntegr (bool)));606 607 connect ( devicesMountFloppyImageAction, SIGNAL(triggered()), this, SLOT(devicesMountFloppyImage()));608 connect ( devicesUnmountFloppyAction, SIGNAL(triggered()), this, SLOT(devicesUnmountFloppy()));609 connect ( devicesMountDVDImageAction, SIGNAL(triggered()), this, SLOT(devicesMountDVDImage()));610 connect ( devicesUnmountDVDAction, SIGNAL(triggered()), this, SLOT(devicesUnmountDVD()));611 connect ( devicesSwitchVrdpAction, SIGNAL(toggled (bool)), this, SLOT(devicesSwitchVrdp (bool)));612 connect ( devicesSFDialogAction, SIGNAL(triggered()), this, SLOT(devicesOpenSFDialog()));613 connect ( devicesInstallGuestToolsAction, SIGNAL(triggered()), this, SLOT(devicesInstallGuestAdditions()));595 connect (mVmTypeCABSAction, SIGNAL(triggered()), this, SLOT(vmTypeCABS())); 596 #endif 597 connect (mVmResetAction, SIGNAL(triggered()), this, SLOT (vmReset())); 598 connect (mVmPauseAction, SIGNAL(toggled (bool)), this, SLOT (vmPause (bool))); 599 connect (mVmACPIShutdownAction, SIGNAL (triggered()), this, SLOT (vmACPIShutdown())); 600 connect (mVmCloseAction, SIGNAL(triggered()), this, SLOT (vmClose())); 601 602 connect (mVmTakeSnapshotAction, SIGNAL(triggered()), this, SLOT(vmTakeSnapshot())); 603 connect (mVmShowInformationDlgAction, SIGNAL(triggered()), this, SLOT (vmShowInfoDialog())); 604 605 connect (mVmDisableMouseIntegrAction, SIGNAL(toggled (bool)), this, SLOT(vmDisableMouseIntegr (bool))); 606 607 connect (mDevicesMountFloppyImageAction, SIGNAL(triggered()), this, SLOT(devicesMountFloppyImage())); 608 connect (mDevicesUnmountFloppyAction, SIGNAL(triggered()), this, SLOT(devicesUnmountFloppy())); 609 connect (mDevicesMountDVDImageAction, SIGNAL(triggered()), this, SLOT(devicesMountDVDImage())); 610 connect (mDevicesUnmountDVDAction, SIGNAL(triggered()), this, SLOT(devicesUnmountDVD())); 611 connect (mDevicesSwitchVrdpAction, SIGNAL(toggled (bool)), this, SLOT(devicesSwitchVrdp (bool))); 612 connect (mDevicesSFDialogAction, SIGNAL(triggered()), this, SLOT(devicesOpenSFDialog())); 613 connect (mDevicesInstallGuestToolsAction, SIGNAL(triggered()), this, SLOT(devicesInstallGuestAdditions())); 614 614 615 615 … … 670 670 if (mDbgMenu) 671 671 connect (mDbgMenu, SIGNAL (aboutToShow()), this, SLOT (dbgPrepareDebugMenu())); 672 if ( dbgStatisticsAction)673 connect ( dbgStatisticsAction, SIGNAL (triggered()), this, SLOT (dbgShowStatistics()));674 if ( dbgCommandLineAction)675 connect ( dbgCommandLineAction, SIGNAL (triggered()), this, SLOT (dbgShowCommandLine()));676 if ( dbgLoggingAction)677 connect ( dbgLoggingAction, SIGNAL (toggled (bool)), this, SLOT (dbgLoggingToggled (bool)));672 if (mDbgStatisticsAction) 673 connect (mDbgStatisticsAction, SIGNAL (triggered()), this, SLOT (dbgShowStatistics())); 674 if (mDbgCommandLineAction) 675 connect (mDbgCommandLineAction, SIGNAL (triggered()), this, SLOT (dbgShowCommandLine())); 676 if (mDbgLoggingAction) 677 connect (mDbgLoggingAction, SIGNAL (toggled (bool)), this, SLOT (dbgLoggingToggled (bool))); 678 678 #endif 679 679 … … 763 763 } 764 764 765 vmPauseAction->setChecked (false);765 mVmPauseAction->setChecked (false); 766 766 767 767 VBoxDefs::RenderMode mode = vboxGlobal().vmRenderMode(); … … 836 836 qApp->processEvents(); 837 837 838 vmSeamlessAction->setEnabled (false);838 mVmSeamlessAction->setEnabled (false); 839 839 str = cmachine.GetExtraData (VBoxDefs::GUI_Seamless); 840 840 if (str == "on") 841 vmSeamlessAction->setChecked (true);841 mVmSeamlessAction->setChecked (true); 842 842 843 843 str = cmachine.GetExtraData (VBoxDefs::GUI_AutoresizeGuest); 844 844 if (str != "off") 845 vmAutoresizeGuestAction->setChecked (true);845 mVmAutoresizeGuestAction->setChecked (true); 846 846 847 847 str = cmachine.GetExtraData (VBoxDefs::GUI_FirstRun); … … 879 879 { 880 880 /* hide vrdp_menu_action & vrdp_separator & vrdp_status_icon */ 881 devicesSwitchVrdpAction->setVisible (false);881 mDevicesSwitchVrdpAction->setVisible (false); 882 882 mDevicesVRDPMenuSeparator->setVisible (false); 883 883 #if 0 … … 891 891 { 892 892 /* hide shared folders menu action & sf_separator & sf_status_icon */ 893 devicesSFDialogAction->setVisible (false);893 mDevicesSFDialogAction->setVisible (false); 894 894 mDevicesSFMenuSeparator->setVisible (false); 895 895 sf_light->setHidden (true); … … 1044 1044 QString str = cmachine.GetExtraData (VBoxDefs::GUI_Fullscreen); 1045 1045 if (str == "on") 1046 vmFullscreenAction->setChecked (true);1046 mVmFullscreenAction->setChecked (true); 1047 1047 1048 1048 /* If seamless mode should be enabled then check if it is enabled 1049 1049 * currently and re-enable it if seamless is supported */ 1050 if ( vmSeamlessAction->isChecked()1050 if ( mVmSeamlessAction->isChecked() 1051 1051 && mIsSeamlessSupported 1052 1052 && mIsGraphicsSupported) … … 1112 1112 1113 1113 machine.SetExtraData (VBoxDefs::GUI_Fullscreen, 1114 vmFullscreenAction->isChecked() ? "on" : "off");1114 mVmFullscreenAction->isChecked() ? "on" : "off"); 1115 1115 machine.SetExtraData (VBoxDefs::GUI_Seamless, 1116 vmSeamlessAction->isChecked() ? "on" : "off");1116 mVmSeamlessAction->isChecked() ? "on" : "off"); 1117 1117 machine.SetExtraData (VBoxDefs::GUI_AutoresizeGuest, 1118 vmAutoresizeGuestAction->isChecked() ? "on" : "off");1118 mVmAutoresizeGuestAction->isChecked() ? "on" : "off"); 1119 1119 } 1120 1120 … … 1161 1161 { 1162 1162 if (mIsSeamless) 1163 vmSeamlessAction->setEnabled (true);1163 mVmSeamlessAction->setEnabled (true); 1164 1164 else if (mIsFullscreen) 1165 vmFullscreenAction->setEnabled (true);1165 mVmFullscreenAction->setEnabled (true); 1166 1166 else 1167 1167 { 1168 vmSeamlessAction->setEnabled (mIsSeamlessSupported && mIsGraphicsSupported);1169 vmFullscreenAction->setEnabled (true);1168 mVmSeamlessAction->setEnabled (mIsSeamlessSupported && mIsGraphicsSupported); 1169 mVmFullscreenAction->setEnabled (true); 1170 1170 } 1171 1171 … … 1182 1182 void VBoxConsoleWnd::setMouseIntegrationLocked (bool aDisabled) 1183 1183 { 1184 vmDisableMouseIntegrAction->setChecked (aDisabled);1185 vmDisableMouseIntegrAction->setEnabled (false);1184 mVmDisableMouseIntegrAction->setChecked (aDisabled); 1185 mVmDisableMouseIntegrAction->setEnabled (false); 1186 1186 } 1187 1187 … … 1590 1590 1591 1591 qt_set_sequence_auto_mnemonic (false); 1592 vmFullscreenAction->setText (VBoxGlobal::insertKeyToActionText (tr ("&Fullscreen Mode"), "F"));1593 vmFullscreenAction->setStatusTip (tr ("Switch to fullscreen mode" ));1594 1595 vmSeamlessAction->setText (VBoxGlobal::insertKeyToActionText (tr ("Seam&less Mode"), "L"));1596 vmSeamlessAction->setStatusTip (tr ("Switch to seamless desktop integration mode"));1597 1598 vmDisMouseIntegrMenu->setToolTip (tr ("Mouse Integration",1599 "enable/disable..."));1600 vmAutoresizeMenu->setToolTip (tr ("Auto-resize Guest Display",1601 "enable/disable..."));1602 vmAutoresizeGuestAction->setText (VBoxGlobal::insertKeyToActionText (tr ("Auto-resize &Guest Display"),1603 "G"));1604 vmAutoresizeGuestAction->setStatusTip (1592 mVmFullscreenAction->setText (VBoxGlobal::insertKeyToActionText (tr ("&Fullscreen Mode"), "F")); 1593 mVmFullscreenAction->setStatusTip (tr ("Switch to fullscreen mode" )); 1594 1595 mVmSeamlessAction->setText (VBoxGlobal::insertKeyToActionText (tr ("Seam&less Mode"), "L")); 1596 mVmSeamlessAction->setStatusTip (tr ("Switch to seamless desktop integration mode")); 1597 1598 mVmDisMouseIntegrMenu->setToolTip (tr ("Mouse Integration", 1599 "enable/disable...")); 1600 mVmAutoresizeMenu->setToolTip (tr ("Auto-resize Guest Display", 1601 "enable/disable...")); 1602 mVmAutoresizeGuestAction->setText (VBoxGlobal::insertKeyToActionText (tr ("Auto-resize &Guest Display"), 1603 "G")); 1604 mVmAutoresizeGuestAction->setStatusTip ( 1605 1605 tr ("Automatically resize the guest display when the window is resized " 1606 1606 "(requires Guest Additions)")); 1607 1607 1608 vmAdjustWindowAction->setText (VBoxGlobal::insertKeyToActionText (tr ("&Adjust Window Size"), "A"));1609 vmAdjustWindowAction->setStatusTip (1608 mVmAdjustWindowAction->setText (VBoxGlobal::insertKeyToActionText (tr ("&Adjust Window Size"), "A")); 1609 mVmAdjustWindowAction->setStatusTip ( 1610 1610 tr ("Adjust window size and position to best fit the guest display")); 1611 1611 1612 vmTypeCADAction->setText (VBoxGlobal::insertKeyToActionText (tr ("&Insert Ctrl-Alt-Del"), "Del"));1613 vmTypeCADAction->setStatusTip (1612 mVmTypeCADAction->setText (VBoxGlobal::insertKeyToActionText (tr ("&Insert Ctrl-Alt-Del"), "Del")); 1613 mVmTypeCADAction->setStatusTip ( 1614 1614 tr ("Send the Ctrl-Alt-Del sequence to the virtual machine")); 1615 1615 1616 1616 #if defined(Q_WS_X11) 1617 vmTypeCABSAction->setText (VBoxGlobal::insertKeyToActionText (tr ("&Insert Ctrl-Alt-Backspace"),1618 "Backspace"));1619 vmTypeCABSAction->setStatusTip (1617 mVmTypeCABSAction->setText (VBoxGlobal::insertKeyToActionText (tr ("&Insert Ctrl-Alt-Backspace"), 1618 "Backspace")); 1619 mVmTypeCABSAction->setStatusTip ( 1620 1620 tr ("Send the Ctrl-Alt-Backspace sequence to the virtual machine")); 1621 1621 #endif 1622 1622 1623 vmResetAction->setText (VBoxGlobal::insertKeyToActionText (tr ("&Reset"), "R"));1624 vmResetAction->setStatusTip (tr ("Reset the virtual machine"));1625 1626 /* vmPauseAction is set up in updateAppearanceOf() */1623 mVmResetAction->setText (VBoxGlobal::insertKeyToActionText (tr ("&Reset"), "R")); 1624 mVmResetAction->setStatusTip (tr ("Reset the virtual machine")); 1625 1626 /* mVmPauseAction is set up in updateAppearanceOf() */ 1627 1627 1628 1628 #ifdef Q_WS_MAC 1629 1629 /* Host+H is Hide on the mac */ 1630 vmACPIShutdownAction->setText (VBoxGlobal::insertKeyToActionText (tr ("ACPI S&hutdown"), "U"));1630 mVmACPIShutdownAction->setText (VBoxGlobal::insertKeyToActionText (tr ("ACPI S&hutdown"), "U")); 1631 1631 #else /* Q_WS_MAC */ 1632 vmACPIShutdownAction->setText (VBoxGlobal::insertKeyToActionText (tr ("ACPI S&hutdown"), "H"));1632 mVmACPIShutdownAction->setText (VBoxGlobal::insertKeyToActionText (tr ("ACPI S&hutdown"), "H")); 1633 1633 #endif /* !Q_WS_MAC */ 1634 vmACPIShutdownAction->setStatusTip (1634 mVmACPIShutdownAction->setStatusTip ( 1635 1635 tr ("Send the ACPI Power Button press event to the virtual machine")); 1636 1636 1637 vmCloseAction->setText (VBoxGlobal::insertKeyToActionText (tr ("&Close..." ), "Q"));1638 vmCloseAction->setStatusTip (tr ("Close the virtual machine"));1639 vmCloseAction->setMenuRole (QAction::QuitRole);1640 1641 vmTakeSnapshotAction->setText (VBoxGlobal::insertKeyToActionText (tr ("Take &Snapshot..."), "S"));1642 vmTakeSnapshotAction->setStatusTip (tr ("Take a snapshot of the virtual machine"));1643 1644 vmShowInformationDlgAction->setText (VBoxGlobal::insertKeyToActionText (tr ("Session I&nformation Dialog"),1645 "N"));1646 vmShowInformationDlgAction->setStatusTip (tr ("Show Session Information Dialog"));1647 1648 /* vmDisableMouseIntegrAction is set up in updateAppearanceOf() */1637 mVmCloseAction->setText (VBoxGlobal::insertKeyToActionText (tr ("&Close..." ), "Q")); 1638 mVmCloseAction->setStatusTip (tr ("Close the virtual machine")); 1639 mVmCloseAction->setMenuRole (QAction::QuitRole); 1640 1641 mVmTakeSnapshotAction->setText (VBoxGlobal::insertKeyToActionText (tr ("Take &Snapshot..."), "S")); 1642 mVmTakeSnapshotAction->setStatusTip (tr ("Take a snapshot of the virtual machine")); 1643 1644 mVmShowInformationDlgAction->setText (VBoxGlobal::insertKeyToActionText (tr ("Session I&nformation Dialog"), 1645 "N")); 1646 mVmShowInformationDlgAction->setStatusTip (tr ("Show Session Information Dialog")); 1647 1648 /* mVmDisableMouseIntegrAction is set up in updateAppearanceOf() */ 1649 1649 1650 1650 /* Devices actions */ 1651 1651 1652 devicesMountFloppyImageAction->setText (tr ("&Floppy Image..."));1653 devicesMountFloppyImageAction->setStatusTip (tr ("Mount a floppy image file"));1654 1655 devicesUnmountFloppyAction->setText (tr ("Unmount F&loppy"));1656 devicesUnmountFloppyAction->setStatusTip (1652 mDevicesMountFloppyImageAction->setText (tr ("&Floppy Image...")); 1653 mDevicesMountFloppyImageAction->setStatusTip (tr ("Mount a floppy image file")); 1654 1655 mDevicesUnmountFloppyAction->setText (tr ("Unmount F&loppy")); 1656 mDevicesUnmountFloppyAction->setStatusTip ( 1657 1657 tr ("Unmount the currently mounted floppy media")); 1658 1658 1659 devicesMountDVDImageAction->setText (tr ("&CD/DVD-ROM Image..."));1660 devicesMountDVDImageAction->setStatusTip (1659 mDevicesMountDVDImageAction->setText (tr ("&CD/DVD-ROM Image...")); 1660 mDevicesMountDVDImageAction->setStatusTip ( 1661 1661 tr ("Mount a CD/DVD-ROM image file")); 1662 1662 1663 devicesUnmountDVDAction->setText (tr ("Unmount C&D/DVD-ROM"));1664 devicesUnmountDVDAction->setStatusTip (1663 mDevicesUnmountDVDAction->setText (tr ("Unmount C&D/DVD-ROM")); 1664 mDevicesUnmountDVDAction->setStatusTip ( 1665 1665 tr ("Unmount the currently mounted CD/DVD-ROM media")); 1666 1666 1667 1667 /* mDevicesVRDPMenu->setToolTip (tr ("Remote Desktop (RDP) Server", 1668 1668 "enable/disable...")); */ 1669 devicesSwitchVrdpAction->setText (tr ("Remote Dis&play"));1670 devicesSwitchVrdpAction->setStatusTip (1669 mDevicesSwitchVrdpAction->setText (tr ("Remote Dis&play")); 1670 mDevicesSwitchVrdpAction->setStatusTip ( 1671 1671 tr ("Enable or disable remote desktop (RDP) connections to this machine")); 1672 1672 1673 devicesSFDialogAction->setText (tr ("&Shared Folders..."));1674 devicesSFDialogAction->setStatusTip (1673 mDevicesSFDialogAction->setText (tr ("&Shared Folders...")); 1674 mDevicesSFDialogAction->setStatusTip ( 1675 1675 tr ("Open the dialog to operate on shared folders")); 1676 1676 1677 devicesInstallGuestToolsAction->setText (tr ("&Install Guest Additions..."));1678 devicesInstallGuestToolsAction->setStatusTip (1677 mDevicesInstallGuestToolsAction->setText (tr ("&Install Guest Additions...")); 1678 mDevicesInstallGuestToolsAction->setStatusTip ( 1679 1679 tr ("Mount the Guest Additions installation image")); 1680 1680 … … 1682 1682 /* Debug actions */ 1683 1683 1684 if ( dbgStatisticsAction)1685 dbgStatisticsAction->setText (tr ("&Statistics...", "debug action"));1686 if ( dbgCommandLineAction)1687 dbgCommandLineAction->setText (tr ("&Command Line...", "debug action"));1688 if ( dbgLoggingAction)1689 dbgLoggingAction->setText (tr ("&Logging...", "debug action"));1684 if (mDbgStatisticsAction) 1685 mDbgStatisticsAction->setText (tr ("&Statistics...", "debug action")); 1686 if (mDbgCommandLineAction) 1687 mDbgCommandLineAction->setText (tr ("&Command Line...", "debug action")); 1688 if (mDbgLoggingAction) 1689 mDbgLoggingAction->setText (tr ("&Logging...", "debug action")); 1690 1690 #endif 1691 1691 … … 1781 1781 KDriveState state = floppy.GetState(); 1782 1782 bool mounted = state != KDriveState_NotMounted; 1783 devicesUnmountFloppyAction->setEnabled (isRunningOrPaused && mounted);1783 mDevicesUnmountFloppyAction->setEnabled (isRunningOrPaused && mounted); 1784 1784 fd_light->setState (mounted ? KDeviceActivity_Idle : KDeviceActivity_Null); 1785 1785 QString tip = tr ("<qt><nobr>Indicates the activity of the floppy media:</nobr>" … … 1825 1825 KDriveState state = dvd.GetState(); 1826 1826 bool mounted = state != KDriveState_NotMounted; 1827 devicesUnmountDVDAction->setEnabled (isRunningOrPaused && mounted);1827 mDevicesUnmountDVDAction->setEnabled (isRunningOrPaused && mounted); 1828 1828 cd_light->setState (mounted ? KDeviceActivity_Idle : KDeviceActivity_Null); 1829 1829 QString tip = tr ("<qt><nobr>Indicates the activity of the CD/DVD-ROM media:</nobr>" … … 1973 1973 /* update menu&status icon state */ 1974 1974 bool isVRDPEnabled = vrdpsrv.GetEnabled(); 1975 devicesSwitchVrdpAction->setChecked (isVRDPEnabled);1975 mDevicesSwitchVrdpAction->setChecked (isVRDPEnabled); 1976 1976 #if 0 1977 1977 vrdp_state->setState (isVRDPEnabled ? 1 : 0); … … 2036 2036 if (element & PauseAction) 2037 2037 { 2038 if (! vmPauseAction->isChecked())2039 { 2040 vmPauseAction->setText (VBoxGlobal::insertKeyToActionText (tr ("&Pause"), "P"));2041 vmPauseAction->setStatusTip (2038 if (!mVmPauseAction->isChecked()) 2039 { 2040 mVmPauseAction->setText (VBoxGlobal::insertKeyToActionText (tr ("&Pause"), "P")); 2041 mVmPauseAction->setStatusTip ( 2042 2042 tr ("Suspend the execution of the virtual machine")); 2043 2043 } 2044 2044 else 2045 2045 { 2046 vmPauseAction->setText (VBoxGlobal::insertKeyToActionText (tr ("R&esume"), "P"));2047 vmPauseAction->setStatusTip (2046 mVmPauseAction->setText (VBoxGlobal::insertKeyToActionText (tr ("R&esume"), "P")); 2047 mVmPauseAction->setStatusTip ( 2048 2048 tr ("Resume the execution of the virtual machine" ) ); 2049 2049 } 2050 vmPauseAction->setEnabled (isRunningOrPaused);2050 mVmPauseAction->setEnabled (isRunningOrPaused); 2051 2051 } 2052 2052 if (element & DisableMouseIntegrAction) 2053 2053 { 2054 if (! vmDisableMouseIntegrAction->isChecked())2055 { 2056 vmDisableMouseIntegrAction->setText (VBoxGlobal::insertKeyToActionText (tr ("Disable &Mouse Integration"),2057 "I"));2058 vmDisableMouseIntegrAction->setStatusTip (2054 if (!mVmDisableMouseIntegrAction->isChecked()) 2055 { 2056 mVmDisableMouseIntegrAction->setText (VBoxGlobal::insertKeyToActionText (tr ("Disable &Mouse Integration"), 2057 "I")); 2058 mVmDisableMouseIntegrAction->setStatusTip ( 2059 2059 tr ("Temporarily disable host mouse pointer integration")); 2060 2060 } 2061 2061 else 2062 2062 { 2063 vmDisableMouseIntegrAction->setText (VBoxGlobal::insertKeyToActionText (tr ("Enable &Mouse Integration"),2064 "I"));2065 vmDisableMouseIntegrAction->setStatusTip (2063 mVmDisableMouseIntegrAction->setText (VBoxGlobal::insertKeyToActionText (tr ("Enable &Mouse Integration"), 2064 "I")); 2065 mVmDisableMouseIntegrAction->setStatusTip ( 2066 2066 tr ("Enable temporarily disabled host mouse pointer integration")); 2067 2067 } 2068 2068 if (machine_state == KMachineState_Running) 2069 vmDisableMouseIntegrAction->setEnabled (console->isMouseAbsolute());2069 mVmDisableMouseIntegrAction->setEnabled (console->isMouseAbsolute()); 2070 2070 else 2071 vmDisableMouseIntegrAction->setEnabled (false);2071 mVmDisableMouseIntegrAction->setEnabled (false); 2072 2072 } 2073 2073 } … … 2134 2134 QString hotKey = QString ("Host+%1") 2135 2135 .arg (VBoxGlobal::extractKeyFromActionText (aSeamless ? 2136 vmSeamlessAction->text() : vmFullscreenAction->text()));2136 mVmSeamlessAction->text() : mVmFullscreenAction->text())); 2137 2137 2138 2138 Assert (!hotKey.isEmpty()); … … 2158 2158 { 2159 2159 /* Activate the auto-resize feature required for the seamless mode. */ 2160 if (! vmAutoresizeGuestAction->isChecked())2161 vmAutoresizeGuestAction->setChecked (true);2160 if (!mVmAutoresizeGuestAction->isChecked()) 2161 mVmAutoresizeGuestAction->setChecked (true); 2162 2162 2163 2163 /* Activate the mouse integration feature for the seamless mode. */ 2164 if ( vmDisableMouseIntegrAction->isChecked())2165 vmDisableMouseIntegrAction->setChecked (false);2166 2167 vmAdjustWindowAction->setEnabled (!aOn);2168 vmFullscreenAction->setEnabled (!aOn);2169 vmAutoresizeGuestAction->setEnabled (!aOn);2170 vmDisableMouseIntegrAction->setEnabled (!aOn);2164 if (mVmDisableMouseIntegrAction->isChecked()) 2165 mVmDisableMouseIntegrAction->setChecked (false); 2166 2167 mVmAdjustWindowAction->setEnabled (!aOn); 2168 mVmFullscreenAction->setEnabled (!aOn); 2169 mVmAutoresizeGuestAction->setEnabled (!aOn); 2170 mVmDisableMouseIntegrAction->setEnabled (!aOn); 2171 2171 2172 2172 console->console().GetDisplay().SetSeamlessMode (aOn); … … 2176 2176 { 2177 2177 mIsFullscreen = aOn; 2178 vmAdjustWindowAction->setEnabled (!aOn);2179 vmSeamlessAction->setEnabled (!aOn && mIsSeamlessSupported && mIsGraphicsSupported);2178 mVmAdjustWindowAction->setEnabled (!aOn); 2179 mVmSeamlessAction->setEnabled (!aOn && mIsSeamlessSupported && mIsGraphicsSupported); 2180 2180 } 2181 2181 … … 2184 2184 /* Temporarily disable the mode-related action to make sure 2185 2185 * user can not leave the mode before he enter it and inside out. */ 2186 aSeamless ? vmSeamlessAction->setEnabled (false) :2187 vmFullscreenAction->setEnabled (false);2186 aSeamless ? mVmSeamlessAction->setEnabled (false) : 2187 mVmFullscreenAction->setEnabled (false); 2188 2188 2189 2189 /* Calculate initial console size */ … … 2463 2463 { 2464 2464 /* on failure, restore the previous button state */ 2465 vmFullscreenAction->blockSignals (true);2466 vmFullscreenAction->setChecked (!aOn);2467 vmFullscreenAction->blockSignals (false);2465 mVmFullscreenAction->blockSignals (true); 2466 mVmFullscreenAction->setChecked (!aOn); 2467 mVmFullscreenAction->blockSignals (false); 2468 2468 } 2469 2469 } … … 2478 2478 { 2479 2479 /* on failure, restore the previous button state */ 2480 vmSeamlessAction->blockSignals (true);2481 vmSeamlessAction->setChecked (!aOn);2482 vmSeamlessAction->blockSignals (false);2480 mVmSeamlessAction->blockSignals (true); 2481 mVmSeamlessAction->setChecked (!aOn); 2482 mVmSeamlessAction->blockSignals (false); 2483 2483 } 2484 2484 } … … 2822 2822 2823 2823 VBoxAdditionsDownloader *dl = 2824 new VBoxAdditionsDownloader (source, target, devicesInstallGuestToolsAction);2824 new VBoxAdditionsDownloader (source, target, mDevicesInstallGuestToolsAction); 2825 2825 statusBar()->addWidget (dl, 0); 2826 2826 dl->start(); … … 2987 2987 if (mDevicesMountFloppyMenu->actions().count() > 0) 2988 2988 mDevicesMountFloppyMenu->addSeparator(); 2989 mDevicesMountFloppyMenu->addAction ( devicesMountFloppyImageAction);2989 mDevicesMountFloppyMenu->addAction (mDevicesMountFloppyImageAction); 2990 2990 2991 2991 /* if shown as a context menu */ … … 2993 2993 { 2994 2994 mDevicesMountFloppyMenu->addSeparator(); 2995 mDevicesMountFloppyMenu->addAction ( devicesUnmountFloppyAction);2995 mDevicesMountFloppyMenu->addAction (mDevicesUnmountFloppyAction); 2996 2996 } 2997 2997 } … … 3035 3035 if (mDevicesMountDVDMenu->actions().count() > 0) 3036 3036 mDevicesMountDVDMenu->addSeparator(); 3037 mDevicesMountDVDMenu->addAction ( devicesMountDVDImageAction);3037 mDevicesMountDVDMenu->addAction (mDevicesMountDVDImageAction); 3038 3038 3039 3039 /* if shown as a context menu */ … … 3041 3041 { 3042 3042 mDevicesMountDVDMenu->addSeparator(); 3043 mDevicesMountDVDMenu->addAction ( devicesUnmountDVDAction);3043 mDevicesMountDVDMenu->addAction (mDevicesUnmountDVDAction); 3044 3044 } 3045 3045 } … … 3078 3078 StatusTipEvent *ev = new StatusTipEvent (tip); 3079 3079 QApplication::postEvent (this, ev); 3080 waitForStatusBarChange = true;3080 mWaitForStatusBarChange = true; 3081 3081 } 3082 3082 } … … 3084 3084 void VBoxConsoleWnd::statusTipChanged (const QString & /*aMes*/) 3085 3085 { 3086 statusBarChangedInside = waitForStatusBarChange;3087 waitForStatusBarChange = false;3086 mStatusBarChangedInside = mWaitForStatusBarChange; 3087 mWaitForStatusBarChange = false; 3088 3088 } 3089 3089 3090 3090 void VBoxConsoleWnd::clearStatusBar() 3091 3091 { 3092 if ( statusBarChangedInside)3092 if (mStatusBarChangedInside) 3093 3093 statusBar()->clearMessage(); 3094 3094 } … … 3235 3235 if (ind == autoresize_state) 3236 3236 { 3237 vmAutoresizeMenu->exec (e->globalPos());3237 mVmAutoresizeMenu->exec (e->globalPos()); 3238 3238 } 3239 3239 else 3240 3240 if (ind == mouse_state) 3241 3241 { 3242 vmDisMouseIntegrMenu->exec (e->globalPos());3242 mVmDisMouseIntegrMenu->exec (e->globalPos()); 3243 3243 } 3244 3244 else … … 3250 3250 * the future. */ 3251 3251 /* mDevicesSFMenu->exec (e->globalPos()); */ 3252 if ( devicesSFDialogAction->isEnabled())3253 devicesSFDialogAction->trigger();3252 if (mDevicesSFDialogAction->isEnabled()) 3253 mDevicesSFDialogAction->trigger(); 3254 3254 } 3255 3255 else … … 3321 3321 case KMachineState_Paused: 3322 3322 { 3323 if (! vmPauseAction->isChecked())3324 vmPauseAction->setChecked (true);3323 if (!mVmPauseAction->isChecked()) 3324 mVmPauseAction->setChecked (true); 3325 3325 break; 3326 3326 } 3327 3327 case KMachineState_Running: 3328 3328 { 3329 if (machine_state == KMachineState_Paused && vmPauseAction->isChecked())3330 vmPauseAction->setChecked (false);3329 if (machine_state == KMachineState_Paused && mVmPauseAction->isChecked()) 3330 mVmPauseAction->setChecked (false); 3331 3331 break; 3332 3332 } … … 3406 3406 void VBoxConsoleWnd::updateMouseState (int state) 3407 3407 { 3408 vmDisableMouseIntegrAction->setEnabled (state & VBoxConsoleView::MouseAbsolute);3408 mVmDisableMouseIntegrAction->setEnabled (state & VBoxConsoleView::MouseAbsolute); 3409 3409 3410 3410 if ((state & VBoxConsoleView::MouseAbsoluteDisabled) && … … 3427 3427 bool aGraphicsSupported) 3428 3428 { 3429 vmAutoresizeGuestAction->setEnabled (aActive && aGraphicsSupported);3429 mVmAutoresizeGuestAction->setEnabled (aActive && aGraphicsSupported); 3430 3430 if ( (mIsSeamlessSupported != aSeamlessSupported) 3431 3431 || (mIsGraphicsSupported != aGraphicsSupported)) 3432 3432 { 3433 vmSeamlessAction->setEnabled (aSeamlessSupported && aGraphicsSupported);3433 mVmSeamlessAction->setEnabled (aSeamlessSupported && aGraphicsSupported); 3434 3434 mIsSeamlessSupported = aSeamlessSupported; 3435 3435 mIsGraphicsSupported = aGraphicsSupported; 3436 3436 /* If seamless mode should be enabled then check if it is enabled 3437 3437 * currently and re-enable it if open-view procedure is finished */ 3438 if ( vmSeamlessAction->isChecked()3438 if ( mVmSeamlessAction->isChecked() 3439 3439 && mIsOpenViewFinished 3440 3440 && aSeamlessSupported … … 3443 3443 /* Disable auto-resizing if advanced graphics are not available */ 3444 3444 console->setAutoresizeGuest ( mIsGraphicsSupported 3445 && vmAutoresizeGuestAction->isChecked());3446 vmAutoresizeGuestAction->setEnabled (mIsGraphicsSupported);3445 && mVmAutoresizeGuestAction->isChecked()); 3446 mVmAutoresizeGuestAction->setEnabled (mIsGraphicsSupported); 3447 3447 } 3448 3448 … … 3563 3563 } 3564 3564 } 3565 if (fEnabled != dbgLoggingAction->isEnabled())3566 dbgLoggingAction->setEnabled (fEnabled);3567 if (fChecked != dbgLoggingAction->isChecked())3568 dbgLoggingAction->setChecked (fChecked);3565 if (fEnabled != mDbgLoggingAction->isEnabled()) 3566 mDbgLoggingAction->setEnabled (fEnabled); 3567 if (fChecked != mDbgLoggingAction->isChecked()) 3568 mDbgLoggingAction->setChecked (fChecked); 3569 3569 #endif /* VBOX_WITH_DEBUGGER_GUI */ 3570 3570 } -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxSelectorWnd.cpp
r14473 r14478 381 381 Qt::WindowFlags aFlags /* = Qt::Window */) 382 382 : QIWithRetranslateUI2<QMainWindow> (aParent, aFlags) 383 , doneInaccessibleWarningOnce (false)383 , mDoneInaccessibleWarningOnce (false) 384 384 { 385 385 VBoxGlobalSettings settings = vboxGlobal().settings(); … … 402 402 /* actions */ 403 403 404 fileMediaMgrAction = new QAction (this);405 fileMediaMgrAction->setIcon (VBoxGlobal::iconSet (":/diskimage_16px.png"));406 fileSettingsAction = new QAction(this);407 fileSettingsAction->setMenuRole (QAction::PreferencesRole);408 fileSettingsAction->setIcon (VBoxGlobal::iconSet (":/global_settings_16px.png"));409 fileExitAction = new QAction (this);410 fileExitAction->setMenuRole (QAction::QuitRole);411 fileExitAction->setIcon (VBoxGlobal::iconSet (":/exit_16px.png"));412 413 vmNewAction = new QAction (this);414 vmNewAction->setIcon (VBoxGlobal::iconSetFull (404 mFileMediaMgrAction = new QAction (this); 405 mFileMediaMgrAction->setIcon (VBoxGlobal::iconSet (":/diskimage_16px.png")); 406 mFileSettingsAction = new QAction(this); 407 mFileSettingsAction->setMenuRole (QAction::PreferencesRole); 408 mFileSettingsAction->setIcon (VBoxGlobal::iconSet (":/global_settings_16px.png")); 409 mFileExitAction = new QAction (this); 410 mFileExitAction->setMenuRole (QAction::QuitRole); 411 mFileExitAction->setIcon (VBoxGlobal::iconSet (":/exit_16px.png")); 412 413 mVmNewAction = new QAction (this); 414 mVmNewAction->setIcon (VBoxGlobal::iconSetFull ( 415 415 QSize (32, 32), QSize (16, 16), 416 416 ":/vm_new_32px.png", ":/new_16px.png")); 417 vmConfigAction = new QAction (this);418 vmConfigAction->setIcon (VBoxGlobal::iconSetFull (417 mVmConfigAction = new QAction (this); 418 mVmConfigAction->setIcon (VBoxGlobal::iconSetFull ( 419 419 QSize (32, 32), QSize (16, 16), 420 420 ":/vm_settings_32px.png", ":/settings_16px.png", 421 421 ":/vm_settings_disabled_32px.png", ":/settings_dis_16px.png")); 422 vmDeleteAction = new QAction (this);423 vmDeleteAction->setIcon (VBoxGlobal::iconSetFull (422 mVmDeleteAction = new QAction (this); 423 mVmDeleteAction->setIcon (VBoxGlobal::iconSetFull ( 424 424 QSize (32, 32), QSize (16, 16), 425 425 ":/vm_delete_32px.png", ":/delete_16px.png", 426 426 ":/vm_delete_disabled_32px.png", ":/delete_dis_16px.png")); 427 vmStartAction = new QAction (this);428 vmStartAction->setIcon (VBoxGlobal::iconSetFull (427 mVmStartAction = new QAction (this); 428 mVmStartAction->setIcon (VBoxGlobal::iconSetFull ( 429 429 QSize (32, 32), QSize (16, 16), 430 430 ":/vm_start_32px.png", ":/start_16px.png", 431 431 ":/vm_start_disabled_32px.png", ":/start_dis_16px.png")); 432 vmDiscardAction = new QAction (this);433 vmDiscardAction->setIcon (VBoxGlobal::iconSetFull (432 mVmDiscardAction = new QAction (this); 433 mVmDiscardAction->setIcon (VBoxGlobal::iconSetFull ( 434 434 QSize (32, 32), QSize (16, 16), 435 435 ":/vm_discard_32px.png", ":/discard_16px.png", 436 436 ":/vm_discard_disabled_32px.png", ":/discard_dis_16px.png")); 437 vmPauseAction = new QAction (this);438 vmPauseAction->setCheckable (true);439 vmPauseAction->setIcon (VBoxGlobal::iconSetFull (437 mVmPauseAction = new QAction (this); 438 mVmPauseAction->setCheckable (true); 439 mVmPauseAction->setIcon (VBoxGlobal::iconSetFull ( 440 440 QSize (32, 32), QSize (16, 16), 441 441 ":/vm_pause_32px.png", ":/pause_16px.png", 442 442 ":/vm_pause_disabled_32px.png", ":/pause_disabled_16px.png")); 443 vmRefreshAction = new QAction (this);444 vmRefreshAction->setIcon (VBoxGlobal::iconSetFull (443 mVmRefreshAction = new QAction (this); 444 mVmRefreshAction->setIcon (VBoxGlobal::iconSetFull ( 445 445 QSize (32, 32), QSize (16, 16), 446 446 ":/refresh_32px.png", ":/refresh_16px.png", 447 447 ":/refresh_disabled_32px.png", ":/refresh_disabled_16px.png")); 448 vmShowLogsAction = new QAction (this);449 vmShowLogsAction->setIcon (VBoxGlobal::iconSetFull (448 mVmShowLogsAction = new QAction (this); 449 mVmShowLogsAction->setIcon (VBoxGlobal::iconSetFull ( 450 450 QSize (32, 32), QSize (16, 16), 451 451 ":/vm_show_logs_32px.png", ":/show_logs_16px.png", … … 492 492 493 493 /* VM tab widget containing details and snapshots tabs */ 494 vmTabWidget = new QTabWidget();495 rightVLayout->addWidget ( vmTabWidget);494 mVmTabWidget = new QTabWidget(); 495 rightVLayout->addWidget (mVmTabWidget); 496 496 497 497 /* VM details view */ 498 vmDetailsView = new VBoxVMDetailsView (NULL, vmRefreshAction);499 vmTabWidget->addTab (vmDetailsView,500 VBoxGlobal::iconSet (":/settings_16px.png"),501 QString::null);498 mVmDetailsView = new VBoxVMDetailsView (NULL, mVmRefreshAction); 499 mVmTabWidget->addTab (mVmDetailsView, 500 VBoxGlobal::iconSet (":/settings_16px.png"), 501 QString::null); 502 502 503 503 /* VM snapshots list */ 504 vmSnapshotsWgt = new VBoxSnapshotsWgt (NULL);505 vmTabWidget->addTab (vmSnapshotsWgt,506 VBoxGlobal::iconSet (":/take_snapshot_16px.png",507 ":/take_snapshot_dis_16px.png"),508 QString::null);509 vmSnapshotsWgt->setContentsMargins (10, 10, 10, 10);504 mVmSnapshotsWgt = new VBoxSnapshotsWgt (NULL); 505 mVmTabWidget->addTab (mVmSnapshotsWgt, 506 VBoxGlobal::iconSet (":/take_snapshot_16px.png", 507 ":/take_snapshot_dis_16px.png"), 508 QString::null); 509 mVmSnapshotsWgt->setContentsMargins (10, 10, 10, 10); 510 510 511 511 /* VM comments page */ 512 vmDescriptionPage = new VBoxVMDescriptionPage (this);513 vmTabWidget->addTab (vmDescriptionPage,514 VBoxGlobal::iconSet (":/description_16px.png",515 ":/description_disabled_16px.png"),516 QString::null);517 vmDescriptionPage->setContentsMargins (10, 10, 10, 10);512 mVmDescriptionPage = new VBoxVMDescriptionPage (this); 513 mVmTabWidget->addTab (mVmDescriptionPage, 514 VBoxGlobal::iconSet (":/description_16px.png", 515 ":/description_disabled_16px.png"), 516 QString::null); 517 mVmDescriptionPage->setContentsMargins (10, 10, 10, 10); 518 518 519 519 /* add actions to the toolbar */ … … 523 523 vmTools->setSizePolicy (QSizePolicy::Fixed, QSizePolicy::Preferred); 524 524 525 vmTools->addAction ( vmNewAction);526 vmTools->addAction ( vmConfigAction);525 vmTools->addAction (mVmNewAction); 526 vmTools->addAction (mVmConfigAction); 527 527 #if 0 /* delete action is really rare */ 528 vmTools->addAction ( vmDeleteAction);528 vmTools->addAction (mVmDeleteAction); 529 529 #endif 530 vmTools->addAction ( vmStartAction);531 vmTools->addAction ( vmDiscardAction);530 vmTools->addAction (mVmStartAction); 531 vmTools->addAction (mVmDiscardAction); 532 532 533 533 /* add actions to menubar */ 534 534 535 535 mFileMenu = menuBar()->addMenu (QString::null); 536 mFileMenu->addAction ( fileMediaMgrAction);536 mFileMenu->addAction (mFileMediaMgrAction); 537 537 mFileMenu->addSeparator(); 538 mFileMenu->addAction ( fileSettingsAction);538 mFileMenu->addAction (mFileSettingsAction); 539 539 mFileMenu->addSeparator(); 540 mFileMenu->addAction ( fileExitAction);540 mFileMenu->addAction (mFileExitAction); 541 541 542 542 mVMMenu = menuBar()->addMenu (QString::null); 543 mVMMenu->addAction ( vmNewAction);544 mVMMenu->addAction ( vmConfigAction);545 mVMMenu->addAction ( vmDeleteAction);543 mVMMenu->addAction (mVmNewAction); 544 mVMMenu->addAction (mVmConfigAction); 545 mVMMenu->addAction (mVmDeleteAction); 546 546 mVMMenu->addSeparator(); 547 mVMMenu->addAction ( vmStartAction);548 mVMMenu->addAction ( vmDiscardAction);549 mVMMenu->addAction ( vmPauseAction);547 mVMMenu->addAction (mVmStartAction); 548 mVMMenu->addAction (mVmDiscardAction); 549 mVMMenu->addAction (mVmPauseAction); 550 550 mVMMenu->addSeparator(); 551 mVMMenu->addAction ( vmRefreshAction);552 mVMMenu->addAction ( vmShowLogsAction);551 mVMMenu->addAction (mVmRefreshAction); 552 mVMMenu->addAction (mVmShowLogsAction); 553 553 554 554 mVMCtxtMenu = new QMenu (this); 555 mVMCtxtMenu->addAction ( vmConfigAction);556 mVMCtxtMenu->addAction ( vmDeleteAction);555 mVMCtxtMenu->addAction (mVmConfigAction); 556 mVMCtxtMenu->addAction (mVmDeleteAction); 557 557 mVMCtxtMenu->addSeparator(); 558 mVMCtxtMenu->addAction ( vmStartAction);559 mVMCtxtMenu->addAction ( vmDiscardAction);560 mVMCtxtMenu->addAction ( vmPauseAction);558 mVMCtxtMenu->addAction (mVmStartAction); 559 mVMCtxtMenu->addAction (mVmDiscardAction); 560 mVMCtxtMenu->addAction (mVmPauseAction); 561 561 mVMCtxtMenu->addSeparator(); 562 mVMCtxtMenu->addAction ( vmRefreshAction);563 mVMCtxtMenu->addAction ( vmShowLogsAction);562 mVMCtxtMenu->addAction (mVmRefreshAction); 563 mVMCtxtMenu->addAction (mVmShowLogsAction); 564 564 565 565 mHelpMenu = menuBar()->addMenu (QString::null); … … 602 602 603 603 /* Composing normal parameters */ 604 normal_size = QSize (w, h).expandedTo (minimumSizeHint())604 mNormalSize = QSize (w, h).expandedTo (minimumSizeHint()) 605 605 .boundedTo (ar.size()); 606 normal_pos = QPoint (x, y);606 mNormalPos = QPoint (x, y); 607 607 608 608 /* Applying normal parameters */ 609 resize ( normal_size);610 move ( normal_pos);609 resize (mNormalSize); 610 move (mNormalPos); 611 611 if (max) 612 612 /* maximize if needed */ … … 634 634 635 635 /* signals and slots connections */ 636 connect ( fileMediaMgrAction, SIGNAL (triggered()), this, SLOT (fileMediaMgr()));637 connect ( fileSettingsAction, SIGNAL (triggered()), this, SLOT (fileSettings()));638 connect ( fileExitAction, SIGNAL (triggered()), this, SLOT (fileExit()));639 connect ( vmNewAction, SIGNAL (triggered()), this, SLOT (vmNew()));640 641 connect ( vmConfigAction, SIGNAL (triggered()), this, SLOT (vmSettings()));642 connect ( vmDeleteAction, SIGNAL (triggered()), this, SLOT (vmDelete()));643 connect ( vmStartAction, SIGNAL (triggered()), this, SLOT (vmStart()));644 connect ( vmDiscardAction, SIGNAL (triggered()), this, SLOT (vmDiscard()));645 connect ( vmPauseAction, SIGNAL (toggled (bool)), this, SLOT (vmPause (bool)));646 connect ( vmRefreshAction, SIGNAL (triggered()), this, SLOT (vmRefresh()));647 connect ( vmShowLogsAction, SIGNAL (triggered()), this, SLOT (vmShowLogs()));636 connect (mFileMediaMgrAction, SIGNAL (triggered()), this, SLOT (fileMediaMgr())); 637 connect (mFileSettingsAction, SIGNAL (triggered()), this, SLOT (fileSettings())); 638 connect (mFileExitAction, SIGNAL (triggered()), this, SLOT (fileExit())); 639 connect (mVmNewAction, SIGNAL (triggered()), this, SLOT (vmNew())); 640 641 connect (mVmConfigAction, SIGNAL (triggered()), this, SLOT (vmSettings())); 642 connect (mVmDeleteAction, SIGNAL (triggered()), this, SLOT (vmDelete())); 643 connect (mVmStartAction, SIGNAL (triggered()), this, SLOT (vmStart())); 644 connect (mVmDiscardAction, SIGNAL (triggered()), this, SLOT (vmDiscard())); 645 connect (mVmPauseAction, SIGNAL (toggled (bool)), this, SLOT (vmPause (bool))); 646 connect (mVmRefreshAction, SIGNAL (triggered()), this, SLOT (vmRefresh())); 647 connect (mVmShowLogsAction, SIGNAL (triggered()), this, SLOT (vmShowLogs())); 648 648 649 649 connect (mVMListView, SIGNAL (currentChanged()), … … 654 654 this, SLOT (showContextMenu (const QPoint &))); 655 655 656 connect ( vmDetailsView, SIGNAL (linkClicked (const QString &)),656 connect (mVmDetailsView, SIGNAL (linkClicked (const QString &)), 657 657 this, SLOT (vmSettings (const QString &))); 658 658 … … 686 686 { 687 687 QString winPos = QString ("%1,%2,%3,%4") 688 .arg ( normal_pos.x())689 .arg ( normal_pos.y())690 .arg ( normal_size.width())691 .arg ( normal_size.height());688 .arg (mNormalPos.x()) 689 .arg (mNormalPos.y()) 690 .arg (mNormalSize.width()) 691 .arg (mNormalSize.height()); 692 692 if (isMaximized()) 693 693 winPos += QString (",%1").arg (VBoxDefs::GUI_LastWindowPosition_Max); … … 899 899 /* We always get here when mVMListView emits the activated() signal, 900 900 * so we must explicitly check if the action is enabled or not. */ 901 if (! vmStartAction->isEnabled())901 if (!mVmStartAction->isEnabled()) 902 902 return; 903 903 } … … 1156 1156 if ((windowState() & (Qt::WindowMaximized | Qt::WindowMinimized | 1157 1157 Qt::WindowFullScreen)) == 0) 1158 normal_size = re->size();1158 mNormalSize = re->size(); 1159 1159 break; 1160 1160 } … … 1173 1173 1174 1174 if (!(pos().x() == geometry().x() && pos().y() == geometry().y())) 1175 normal_pos = pos();1175 mNormalPos = pos(); 1176 1176 } 1177 1177 break; … … 1230 1230 #endif 1231 1231 1232 vmTabWidget->setTabText (vmTabWidget->indexOf (vmDetailsView), tr ("&Details"));1232 mVmTabWidget->setTabText (mVmTabWidget->indexOf (mVmDetailsView), tr ("&Details")); 1233 1233 /* note: Snapshots and Details tabs are changed dynamically by 1234 1234 * vmListViewCurrentChanged() */ … … 1237 1237 vmListViewCurrentChanged(); 1238 1238 1239 fileMediaMgrAction->setText (tr ("&Virtual Media Manager..."));1240 fileMediaMgrAction->setShortcut (QKeySequence ("Ctrl+D"));1241 fileMediaMgrAction->setStatusTip (tr ("Display the Virtual Media Manager dialog"));1239 mFileMediaMgrAction->setText (tr ("&Virtual Media Manager...")); 1240 mFileMediaMgrAction->setShortcut (QKeySequence ("Ctrl+D")); 1241 mFileMediaMgrAction->setStatusTip (tr ("Display the Virtual Media Manager dialog")); 1242 1242 1243 1243 #ifdef Q_WS_MAC … … 1252 1252 * be really interesting to see how this plays on non-english systems... 1253 1253 */ 1254 fileSettingsAction->setText (tr ("&Preferences...", "global settings"));1254 mFileSettingsAction->setText (tr ("&Preferences...", "global settings")); 1255 1255 #else 1256 1256 /* … … 1259 1259 * to figure out. 1260 1260 */ 1261 fileSettingsAction->setText (tr ("&Preferences...", "global settings"));1261 mFileSettingsAction->setText (tr ("&Preferences...", "global settings")); 1262 1262 #endif 1263 fileSettingsAction->setShortcut (QKeySequence ("Ctrl+G"));1264 fileSettingsAction->setStatusTip (tr ("Display the global settings dialog"));1265 1266 fileExitAction->setText (tr ("E&xit"));1267 fileExitAction->setShortcut (QKeySequence ("Ctrl+Q"));1268 fileExitAction->setStatusTip (tr ("Close application"));1269 1270 vmNewAction->setText (tr ("&New..."));1271 vmNewAction->setShortcut (QKeySequence ("Ctrl+N"));1272 vmNewAction->setStatusTip (tr ("Create a new virtual machine"));1273 vmNewAction->setToolTip (vmNewAction->text().remove ('&').remove ('.') +1274 QString (" (%1)").arg ( vmNewAction->shortcut().toString()));1275 1276 vmConfigAction->setText (tr ("&Settings..."));1277 vmConfigAction->setShortcut (QKeySequence ("Ctrl+S"));1278 vmConfigAction->setStatusTip (tr ("Configure the selected virtual machine"));1279 vmConfigAction->setToolTip (vmConfigAction->text().remove ('&').remove ('.') +1280 QString (" (%1)").arg ( vmConfigAction->shortcut().toString()));1281 1282 vmDeleteAction->setText (tr ("&Delete"));1283 vmDeleteAction->setStatusTip (tr ("Delete the selected virtual machine"));1284 1285 /* Note: vmStartAction text is set up in vmListViewCurrentChanged() */1286 1287 vmDiscardAction->setText (tr ("D&iscard"));1288 vmDiscardAction->setStatusTip (1263 mFileSettingsAction->setShortcut (QKeySequence ("Ctrl+G")); 1264 mFileSettingsAction->setStatusTip (tr ("Display the global settings dialog")); 1265 1266 mFileExitAction->setText (tr ("E&xit")); 1267 mFileExitAction->setShortcut (QKeySequence ("Ctrl+Q")); 1268 mFileExitAction->setStatusTip (tr ("Close application")); 1269 1270 mVmNewAction->setText (tr ("&New...")); 1271 mVmNewAction->setShortcut (QKeySequence ("Ctrl+N")); 1272 mVmNewAction->setStatusTip (tr ("Create a new virtual machine")); 1273 mVmNewAction->setToolTip (mVmNewAction->text().remove ('&').remove ('.') + 1274 QString (" (%1)").arg (mVmNewAction->shortcut().toString())); 1275 1276 mVmConfigAction->setText (tr ("&Settings...")); 1277 mVmConfigAction->setShortcut (QKeySequence ("Ctrl+S")); 1278 mVmConfigAction->setStatusTip (tr ("Configure the selected virtual machine")); 1279 mVmConfigAction->setToolTip (mVmConfigAction->text().remove ('&').remove ('.') + 1280 QString (" (%1)").arg (mVmConfigAction->shortcut().toString())); 1281 1282 mVmDeleteAction->setText (tr ("&Delete")); 1283 mVmDeleteAction->setStatusTip (tr ("Delete the selected virtual machine")); 1284 1285 /* Note: mVmStartAction text is set up in vmListViewCurrentChanged() */ 1286 1287 mVmDiscardAction->setText (tr ("D&iscard")); 1288 mVmDiscardAction->setStatusTip ( 1289 1289 tr ("Discard the saved state of the selected virtual machine")); 1290 1290 1291 vmPauseAction->setText (tr ("&Pause"));1292 vmPauseAction->setStatusTip (1291 mVmPauseAction->setText (tr ("&Pause")); 1292 mVmPauseAction->setStatusTip ( 1293 1293 tr ("Suspend the execution of the virtual machine")); 1294 1294 1295 vmRefreshAction->setText (tr ("&Refresh"));1296 vmRefreshAction->setShortcut (QKeySequence ("Ctrl+R"));1297 vmRefreshAction->setStatusTip (1295 mVmRefreshAction->setText (tr ("&Refresh")); 1296 mVmRefreshAction->setShortcut (QKeySequence ("Ctrl+R")); 1297 mVmRefreshAction->setStatusTip ( 1298 1298 tr ("Refresh the accessibility state of the selected virtual machine")); 1299 1299 1300 vmShowLogsAction->setText (tr ("Show &Log..."));1301 vmShowLogsAction->setIconText (tr ("Log", "icon text"));1302 vmShowLogsAction->setShortcut (QKeySequence ("Ctrl+L"));1303 vmShowLogsAction->setStatusTip (1300 mVmShowLogsAction->setText (tr ("Show &Log...")); 1301 mVmShowLogsAction->setIconText (tr ("Log", "icon text")); 1302 mVmShowLogsAction->setShortcut (QKeySequence ("Ctrl+L")); 1303 mVmShowLogsAction->setStatusTip ( 1304 1304 tr ("Show the log files of the selected virtual machine")); 1305 1305 … … 1340 1340 if (aRefreshDetails) 1341 1341 { 1342 vmDetailsView->setDetailsText (1342 mVmDetailsView->setDetailsText ( 1343 1343 vboxGlobal().detailsReport (m, false /* isNewVM */, 1344 1344 modifyEnabled /* withLinks */)); … … 1351 1351 if (count) 1352 1352 name += QString (" (%1)").arg (count); 1353 vmTabWidget->setTabText (vmTabWidget->indexOf (vmSnapshotsWgt), name);1353 mVmTabWidget->setTabText (mVmTabWidget->indexOf (mVmSnapshotsWgt), name); 1354 1354 /* refresh the snapshots widget */ 1355 vmSnapshotsWgt->setMachine (m);1355 mVmSnapshotsWgt->setMachine (m); 1356 1356 /* ensure the tab is enabled */ 1357 vmTabWidget->setTabEnabled (vmTabWidget->indexOf (vmSnapshotsWgt), true);1357 mVmTabWidget->setTabEnabled (mVmTabWidget->indexOf (mVmSnapshotsWgt), true); 1358 1358 } 1359 1359 if (aRefreshDescription) … … 1362 1362 QString name = m.GetDescription().isEmpty() ? 1363 1363 tr ("D&escription") : tr ("D&escription *"); 1364 vmTabWidget->setTabText (vmTabWidget->indexOf (vmDescriptionPage), name);1364 mVmTabWidget->setTabText (mVmTabWidget->indexOf (mVmDescriptionPage), name); 1365 1365 /* refresh the description widget */ 1366 vmDescriptionPage->setMachineItem (item);1366 mVmDescriptionPage->setMachineItem (item); 1367 1367 /* ensure the tab is enabled */ 1368 vmTabWidget->setTabEnabled (vmTabWidget->indexOf (vmDescriptionPage), true);1368 mVmTabWidget->setTabEnabled (mVmTabWidget->indexOf (mVmDescriptionPage), true); 1369 1369 } 1370 1370 1371 1371 /* enable/disable modify actions */ 1372 vmConfigAction->setEnabled (modifyEnabled);1373 vmDeleteAction->setEnabled (modifyEnabled);1374 vmDiscardAction->setEnabled (state == KMachineState_Saved && !running);1375 vmPauseAction->setEnabled (state == KMachineState_Running ||1372 mVmConfigAction->setEnabled (modifyEnabled); 1373 mVmDeleteAction->setEnabled (modifyEnabled); 1374 mVmDiscardAction->setEnabled (state == KMachineState_Saved && !running); 1375 mVmPauseAction->setEnabled (state == KMachineState_Running || 1376 1376 state == KMachineState_Paused); 1377 1377 … … 1379 1379 if (state >= KMachineState_Running) 1380 1380 { 1381 vmStartAction->setText (tr ("S&how"));1382 vmStartAction->setStatusTip (1381 mVmStartAction->setText (tr ("S&how")); 1382 mVmStartAction->setStatusTip ( 1383 1383 tr ("Switch to the window of the selected virtual machine")); 1384 1384 1385 vmStartAction->setEnabled (item->canSwitchTo());1385 mVmStartAction->setEnabled (item->canSwitchTo()); 1386 1386 } 1387 1387 else 1388 1388 { 1389 vmStartAction->setText (tr ("S&tart"));1390 vmStartAction->setStatusTip (1389 mVmStartAction->setText (tr ("S&tart")); 1390 mVmStartAction->setStatusTip ( 1391 1391 tr ("Start the selected virtual machine")); 1392 1392 1393 vmStartAction->setEnabled (!running);1393 mVmStartAction->setEnabled (!running); 1394 1394 } 1395 1395 … … 1397 1397 if (state == KMachineState_Paused) 1398 1398 { 1399 vmPauseAction->setText (tr ("R&esume"));1400 vmPauseAction->setShortcut (QKeySequence ("Ctrl+P"));1401 vmPauseAction->setStatusTip (1399 mVmPauseAction->setText (tr ("R&esume")); 1400 mVmPauseAction->setShortcut (QKeySequence ("Ctrl+P")); 1401 mVmPauseAction->setStatusTip ( 1402 1402 tr ("Resume the execution of the virtual machine")); 1403 vmPauseAction->blockSignals (true);1404 vmPauseAction->setChecked (true);1405 vmPauseAction->blockSignals (false);1403 mVmPauseAction->blockSignals (true); 1404 mVmPauseAction->setChecked (true); 1405 mVmPauseAction->blockSignals (false); 1406 1406 } 1407 1407 else 1408 1408 { 1409 vmPauseAction->setText (tr ("&Pause"));1410 vmPauseAction->setShortcut (QKeySequence ("Ctrl+P"));1411 vmPauseAction->setStatusTip (1409 mVmPauseAction->setText (tr ("&Pause")); 1410 mVmPauseAction->setShortcut (QKeySequence ("Ctrl+P")); 1411 mVmPauseAction->setStatusTip ( 1412 1412 tr ("Suspend the execution of the virtual machine")); 1413 vmPauseAction->blockSignals (true);1414 vmPauseAction->setChecked (false);1415 vmPauseAction->blockSignals (false);1413 mVmPauseAction->blockSignals (true); 1414 mVmPauseAction->setChecked (false); 1415 mVmPauseAction->blockSignals (false); 1416 1416 } 1417 1417 1418 1418 /* disable Refresh for accessible machines */ 1419 vmRefreshAction->setEnabled (false);1419 mVmRefreshAction->setEnabled (false); 1420 1420 1421 1421 /* enable the show log item for the selected vm */ 1422 vmShowLogsAction->setEnabled (true);1422 mVmShowLogsAction->setEnabled (true); 1423 1423 } 1424 1424 else … … 1431 1431 { 1432 1432 /* the VM is inaccessible */ 1433 vmDetailsView->setErrorText (1433 mVmDetailsView->setErrorText ( 1434 1434 VBoxProblemReporter::formatErrorInfo (item->accessError())); 1435 vmRefreshAction->setEnabled (true);1435 mVmRefreshAction->setEnabled (true); 1436 1436 } 1437 1437 else … … 1439 1439 /* default HTML support in Qt is terrible so just try to get 1440 1440 * something really simple */ 1441 vmDetailsView->setDetailsText1441 mVmDetailsView->setDetailsText 1442 1442 (tr ("<h3>" 1443 1443 "Welcome to VirtualBox!</h3>" … … 1454 1454 "<a href=http://www.virtualbox.org>www.virtualbox.org</a> " 1455 1455 "for the latest information and news.</p>")); 1456 vmRefreshAction->setEnabled (false);1456 mVmRefreshAction->setEnabled (false); 1457 1457 } 1458 1458 1459 1459 /* empty and disable other tabs */ 1460 1460 1461 vmSnapshotsWgt->setMachine (CMachine());1462 vmTabWidget->setTabText (vmTabWidget->indexOf (vmSnapshotsWgt), tr ("&Snapshots"));1463 vmTabWidget->setTabEnabled (vmTabWidget->indexOf (vmSnapshotsWgt), false);1464 1465 vmDescriptionPage->setMachineItem (NULL);1466 vmTabWidget->setTabText (vmTabWidget->indexOf (vmDescriptionPage), tr ("D&escription"));1467 vmTabWidget->setTabEnabled (vmTabWidget->indexOf (vmDescriptionPage), false);1461 mVmSnapshotsWgt->setMachine (CMachine()); 1462 mVmTabWidget->setTabText (mVmTabWidget->indexOf (mVmSnapshotsWgt), tr ("&Snapshots")); 1463 mVmTabWidget->setTabEnabled (mVmTabWidget->indexOf (mVmSnapshotsWgt), false); 1464 1465 mVmDescriptionPage->setMachineItem (NULL); 1466 mVmTabWidget->setTabText (mVmTabWidget->indexOf (mVmDescriptionPage), tr ("D&escription")); 1467 mVmTabWidget->setTabEnabled (mVmTabWidget->indexOf (mVmDescriptionPage), false); 1468 1468 1469 1469 /* disable modify actions */ 1470 vmConfigAction->setEnabled (false);1471 vmDeleteAction->setEnabled (item != NULL);1472 vmDiscardAction->setEnabled (false);1473 vmPauseAction->setEnabled (false);1470 mVmConfigAction->setEnabled (false); 1471 mVmDeleteAction->setEnabled (item != NULL); 1472 mVmDiscardAction->setEnabled (false); 1473 mVmPauseAction->setEnabled (false); 1474 1474 1475 1475 /* change the Start button text accordingly */ 1476 vmStartAction->setText (tr ("S&tart"));1477 vmStartAction->setStatusTip (1476 mVmStartAction->setText (tr ("S&tart")); 1477 mVmStartAction->setStatusTip ( 1478 1478 tr ("Start the selected virtual machine")); 1479 vmStartAction->setEnabled (false);1479 mVmStartAction->setEnabled (false); 1480 1480 1481 1481 /* disable the show log item for the selected vm */ 1482 vmShowLogsAction->setEnabled (false);1482 mVmShowLogsAction->setEnabled (false); 1483 1483 } 1484 1484 } … … 1497 1497 /* we warn about inaccessible media only once (after media emumeration 1498 1498 * started from main() at startup), to avoid annoying the user */ 1499 if ( doneInaccessibleWarningOnce)1499 if (mDoneInaccessibleWarningOnce) 1500 1500 return; 1501 1501 1502 doneInaccessibleWarningOnce = true;1502 mDoneInaccessibleWarningOnce = true; 1503 1503 1504 1504 do … … 1538 1538 1539 1539 /* simulate a state change signal */ 1540 vmDescriptionPage->updateState();1540 mVmDescriptionPage->updateState(); 1541 1541 } 1542 1542 … … 1592 1592 1593 1593 /* simulate a state change signal */ 1594 vmDescriptionPage->updateState();1594 mVmDescriptionPage->updateState(); 1595 1595 } 1596 1596 … … 1607 1607 VBoxTrayIcon::VBoxTrayIcon (VBoxSelectorWnd* aParent, VBoxVMModel* aVMModel) 1608 1608 { 1609 mParent = aParent; 1610 mVMModel = aVMModel; 1611 1609 1612 mShowSelectorAction = new QAction (this); 1610 1613 Assert (mShowSelectorAction); 1611 1614 mShowSelectorAction->setIcon (VBoxGlobal::iconSet ( 1612 1615 ":/VirtualBox_16px.png")); 1616 1613 1617 mHideSystrayMenuAction = new QAction (this); 1614 1618 Assert (mHideSystrayMenuAction); … … 1616 1620 ":/exit_16px.png")); 1617 1621 1622 /* reuse parent action data */ 1623 1618 1624 mVmConfigAction = new QAction (this); 1619 1625 Assert (mVmConfigAction); 1620 mVmConfigAction->setIcon (VBoxGlobal::iconSetFull ( 1621 QSize (32, 32), QSize (16, 16), 1622 ":/vm_settings_32px.png", ":/settings_16px.png", 1623 ":/vm_settings_disabled_32px.png", ":/settings_dis_16px.png")); 1626 mVmConfigAction->setIcon (mParent->vmConfigAction()->icon()); 1627 1624 1628 mVmDeleteAction = new QAction (this); 1625 1629 Assert (mVmDeleteAction); 1626 mVmDeleteAction->setIcon (VBoxGlobal::iconSetFull ( 1627 QSize (32, 32), QSize (16, 16), 1628 ":/vm_delete_32px.png", ":/delete_16px.png", 1629 ":/vm_delete_disabled_32px.png", ":/delete_dis_16px.png")); 1630 mVmDeleteAction->setIcon (mParent->vmDeleteAction()->icon()); 1631 1630 1632 mVmStartAction = new QAction (this); 1631 1633 Assert (mVmStartAction); 1632 mVmStartAction->setIcon (VBoxGlobal::iconSetFull ( 1633 QSize (32, 32), QSize (16, 16), 1634 ":/vm_start_32px.png", ":/start_16px.png", 1635 ":/vm_start_disabled_32px.png", ":/start_dis_16px.png")); 1634 mVmStartAction->setIcon (mParent->vmStartAction()->icon()); 1635 1636 1636 mVmDiscardAction = new QAction (this); 1637 1637 Assert (mVmDiscardAction); 1638 mVmDiscardAction->setIcon (VBoxGlobal::iconSetFull ( 1639 QSize (32, 32), QSize (16, 16), 1640 ":/vm_discard_32px.png", ":/discard_16px.png", 1641 ":/vm_discard_disabled_32px.png", ":/discard_dis_16px.png")); 1638 mVmDiscardAction->setIcon (mParent->vmDiscardAction()->icon()); 1639 1642 1640 mVmPauseAction = new QAction (this); 1643 1641 Assert (mVmPauseAction); 1644 1642 mVmPauseAction->setCheckable (true); 1645 mVmPauseAction->setIcon (VBoxGlobal::iconSetFull ( 1646 QSize (32, 32), QSize (16, 16), 1647 ":/vm_pause_32px.png", ":/pause_16px.png", 1648 ":/vm_pause_disabled_32px.png", ":/pause_disabled_16px.png")); 1643 mVmPauseAction->setIcon (mParent->vmPauseAction()->icon()); 1644 1649 1645 mVmRefreshAction = new QAction (this); 1650 1646 Assert (mVmRefreshAction); 1651 mVmRefreshAction->setIcon (VBoxGlobal::iconSetFull ( 1652 QSize (32, 32), QSize (16, 16), 1653 ":/refresh_32px.png", ":/refresh_16px.png", 1654 ":/refresh_disabled_32px.png", ":/refresh_disabled_16px.png")); 1647 mVmRefreshAction->setIcon (mParent->vmRefreshAction()->icon()); 1648 1655 1649 mVmShowLogsAction = new QAction (this); 1656 1650 Assert (mVmConfigAction); 1657 mVmShowLogsAction->setIcon (VBoxGlobal::iconSetFull ( 1658 QSize (32, 32), QSize (16, 16), 1659 ":/vm_show_logs_32px.png", ":/show_logs_16px.png", 1660 ":/vm_show_logs_disabled_32px.png", ":/show_logs_disabled_16px.png")); 1651 mVmShowLogsAction->setIcon (mParent->vmShowLogsAction()->icon()); 1661 1652 1662 1653 mTrayIconMenu = new QMenu (aParent); 1663 1654 Assert (mTrayIconMenu); 1664 1665 mParent = aParent;1666 mVMModel = aVMModel;1667 1655 1668 1656 setIcon (QIcon (":/VirtualBox_16px.png")); … … 1697 1685 "Remove this icon from the system tray")); 1698 1686 1699 mVmConfigAction->setText (tr ("&Settings...")); 1700 mVmConfigAction->setStatusTip (tr ("Configure the selected virtual machine")); 1701 1702 mVmDeleteAction->setText (tr ("&Delete")); 1703 mVmDeleteAction->setStatusTip (tr ("Delete the selected virtual machine")); 1704 1705 mVmPauseAction->setText (tr ("&Pause")); 1706 mVmPauseAction->setStatusTip (tr ("Suspend the execution of the virtual machine")); 1707 1708 mVmDiscardAction->setText (tr ("D&iscard")); 1709 mVmDiscardAction->setStatusTip (tr ("Discard the saved state of the selected virtual machine")); 1710 1711 mVmShowLogsAction->setText (tr ("Show &Log...")); 1712 mVmShowLogsAction->setStatusTip (tr ("Show the log files of the selected virtual machine")); 1687 /* reuse parent action data */ 1688 1689 mVmConfigAction->setText (mParent->vmConfigAction()->text()); 1690 mVmConfigAction->setStatusTip (mParent->vmConfigAction()->statusTip()); 1691 1692 mVmDeleteAction->setText (mParent->vmDeleteAction()->text()); 1693 mVmDeleteAction->setStatusTip (mParent->vmDeleteAction()->statusTip()); 1694 1695 mVmPauseAction->setText (mParent->vmPauseAction()->text()); 1696 mVmPauseAction->setStatusTip (mParent->vmPauseAction()->statusTip()); 1697 1698 mVmDiscardAction->setText (mParent->vmDiscardAction()->text()); 1699 mVmDiscardAction->setStatusTip (mParent->vmDiscardAction()->statusTip()); 1700 1701 mVmShowLogsAction->setText (mParent->vmShowLogsAction()->text()); 1702 mVmShowLogsAction->setStatusTip (mParent->vmShowLogsAction()->statusTip()); 1713 1703 } 1714 1704
Note:
See TracChangeset
for help on using the changeset viewer.