VirtualBox

Changeset 14478 in vbox


Ignore:
Timestamp:
Nov 21, 2008 5:44:17 PM (16 years ago)
Author:
vboxsync
Message:

FE/Qt4: SysTray: Reuse action data (icons, text) from the Selector. Also converted lots of member names to mMember format.

Location:
trunk/src/VBox/Frontends/VirtualBox4
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox4/include/VBoxConsoleWnd.h

    r13580 r14478  
    210210    QActionGroup *mRunningOrPausedActions;
    211211
    212     // Machine actions
    213     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;
    218218#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 actions
    230     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 actions
    240     QAction *dbgStatisticsAction;
    241     QAction *dbgCommandLineAction;
    242     QAction *dbgLoggingAction;
    243 #endif
    244 
    245     // Help actions
     219    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 */
    246246    VBoxHelpActions mHelpActions;
    247247
    248     // Machine popup menus
    249     VBoxSwitchMenu *vmAutoresizeMenu;
    250     VBoxSwitchMenu *vmDisMouseIntegrMenu;
    251 
    252     // Devices popup menus
    253     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;
    255255
    256256    QAction *mDevicesUSBMenuSeparator;
  • trunk/src/VBox/Frontends/VirtualBox4/include/VBoxSelectorWnd.h

    r14467 r14478  
    9696#endif
    9797
     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
    98107protected:
    99108
     
    135144
    136145    /* 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;
    148157
    149158    VBoxHelpActions mHelpActions;
     
    159168
    160169    /* 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;
    170179};
    171180
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxConsoleWnd.cpp

    r14295 r14478  
    217217    , mMainMenu (0)
    218218#ifdef VBOX_WITH_DEBUGGER_GUI
    219     , dbgStatisticsAction (NULL)
    220     , dbgCommandLineAction (NULL)
    221     , dbgLoggingAction (NULL)
     219    , mDbgStatisticsAction (NULL)
     220    , mDbgCommandLineAction (NULL)
     221    , mDbgLoggingAction (NULL)
    222222    , mDbgMenu (NULL)
    223223#endif
     
    278278    /* VM menu actions */
    279279
    280     vmFullscreenAction = new QAction (this);
    281     vmFullscreenAction->setIcon (
     280    mVmFullscreenAction = new QAction (this);
     281    mVmFullscreenAction->setIcon (
    282282        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 (
    287287        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 (
    292292        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 (
    298298        VBoxGlobal::iconSet (":/adjust_win_size_16px.png",
    299299                             ":/adjust_win_size_disabled_16px.png"));
    300300
    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",
    303303                                                      ":/hostkey_disabled_16px.png"));
    304304
    305305#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",
    308308                                                       ":/hostkey_disabled_16px.png"));
    309309#endif
    310310
    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",
    313313                                                    ":/reset_disabled_16px.png"));
    314314
    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 (
    321321        VBoxGlobal::iconSet (":/acpi_16px.png", ":/acpi_disabled_16px.png"));
    322322
    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 (
    329329        ":/take_snapshot_16px.png", ":/take_snapshot_dis_16px.png"));
    330330
    331     vmShowInformationDlgAction = new QAction (this);
    332     vmShowInformationDlgAction->setIcon (VBoxGlobal::iconSet (
     331    mVmShowInformationDlgAction = new QAction (this);
     332    mVmShowInformationDlgAction->setIcon (VBoxGlobal::iconSet (
    333333        ":/session_info_16px.png", ":/session_info_disabled_16px.png"));
    334334
    335     vmDisableMouseIntegrAction = new QAction (this);
    336     vmDisableMouseIntegrAction->setIcon (VBoxGlobal::iconSet (
     335    mVmDisableMouseIntegrAction = new QAction (this);
     336    mVmDisableMouseIntegrAction->setIcon (VBoxGlobal::iconSet (
    337337        ":/mouse_can_seamless_16px.png", ":/mouse_can_seamless_disabled_16px.png"));
    338     vmDisableMouseIntegrAction->setCheckable (true);
     338    mVmDisableMouseIntegrAction->setCheckable (true);
    339339
    340340    /* Devices menu actions */
    341341
    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",
    346346                                                                 ":/fd_unmount_dis_16px.png"));
    347347
    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",
    352352                                                              ":/cd_unmount_dis_16px.png"));
    353353
    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",
    356356                                                            ":/shared_folder_disabled_16px.png"));
    357357
    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",
    360360                                                              ":/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",
    365365                                                                     ":/guesttools_disabled_16px.png"));
    366366
     
    368368    if (vboxGlobal().isDebuggerEnabled())
    369369    {
    370         dbgStatisticsAction = new QAction (this);
    371         dbgCommandLineAction = new QAction (this);
     370        mDbgStatisticsAction = new QAction (this);
     371        mDbgCommandLineAction = new QAction (this);
    372372        if (vboxGlobal().getDebuggerModule()== NIL_RTLDRMOD)
    373373        {
    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);
    379379    }
    380380    else
    381381    {
    382         dbgStatisticsAction = NULL;
    383         dbgCommandLineAction = NULL;
    384         dbgLoggingAction = NULL;
     382        mDbgStatisticsAction = NULL;
     383        mDbgCommandLineAction = NULL;
     384        mDbgLoggingAction = NULL;
    385385    }
    386386#endif
     
    400400
    401401    /* 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,
    404404                                               true /* inverted toggle state */);
    405405
    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);
    410410    mVMMenu->addSeparator();
    411     mVMMenu->addAction (vmDisableMouseIntegrAction);
     411    mVMMenu->addAction (mVmDisableMouseIntegrAction);
    412412    mVMMenu->addSeparator();
    413     mVMMenu->addAction (vmTypeCADAction);
     413    mVMMenu->addAction (mVmTypeCADAction);
    414414#if defined(Q_WS_X11)
    415     mVMMenu->addAction (vmTypeCABSAction);
     415    mVMMenu->addAction (mVmTypeCABSAction);
    416416#endif
    417417    mVMMenu->addSeparator();
    418     mVMMenu->addAction (vmTakeSnapshotAction);
     418    mVMMenu->addAction (mVmTakeSnapshotAction);
    419419    mVMMenu->addSeparator();
    420     mVMMenu->addAction (vmShowInformationDlgAction);
     420    mVMMenu->addAction (mVmShowInformationDlgAction);
    421421    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);
    425425    mVMMenu->addSeparator();
    426     mVMMenu->addAction (vmCloseAction);
     426    mVMMenu->addAction (mVmCloseAction);
    427427
    428428    /* Devices submenu */
     
    434434
    435435    mDevicesMountDVDMenu = mDevicesMenu->addMenu (VBoxGlobal::iconSet (":/cd_16px.png", ":/cd_disabled_16px.png"), QString::null);
    436     mDevicesMenu->addAction (devicesUnmountDVDAction);
     436    mDevicesMenu->addAction (mDevicesUnmountDVDAction);
    437437    mDevicesMenu->addSeparator();
    438438
    439439    mDevicesMountFloppyMenu = mDevicesMenu->addMenu (VBoxGlobal::iconSet (":/fd_16px.png", ":/fd_disabled_16px.png"), QString::null);
    440     mDevicesMenu->addAction (devicesUnmountFloppyAction);
     440    mDevicesMenu->addAction (mDevicesUnmountFloppyAction);
    441441    mDevicesMenu->addSeparator();
    442442
     
    451451    /* see showIndicatorContextMenu for a description of mDevicesSFMenu */
    452452    /* mDevicesSFMenu = mDevicesMenu->addMenu (QString::null); */
    453     mDevicesMenu->addAction (devicesSFDialogAction);
     453    mDevicesMenu->addAction (mDevicesSFDialogAction);
    454454    mDevicesSFMenuSeparator = mDevicesMenu->addSeparator();
    455455
    456456    /* 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);
    459459    mDevicesVRDPMenuSeparator = mDevicesMenu->addSeparator();
    460460
    461     mDevicesMenu->addAction (devicesInstallGuestToolsAction);
     461    mDevicesMenu->addAction (mDevicesInstallGuestToolsAction);
    462462
    463463    /* reset the "context menu" flag */
     
    472472        mDbgMenu = menuBar()->addMenu (QString::null);
    473473        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);
    477477    }
    478478    else
     
    582582    ///// Connections ///////////////////////////////////////////////////////
    583583
    584     connect (vmFullscreenAction, SIGNAL (toggled (bool)),
     584    connect (mVmFullscreenAction, SIGNAL (toggled (bool)),
    585585             this, SLOT (vmFullscreen (bool)));
    586     connect (vmSeamlessAction, SIGNAL (toggled (bool)),
     586    connect (mVmSeamlessAction, SIGNAL (toggled (bool)),
    587587             this, SLOT (vmSeamless (bool)));
    588     connect (vmAutoresizeGuestAction, SIGNAL (toggled (bool)),
     588    connect (mVmAutoresizeGuestAction, SIGNAL (toggled (bool)),
    589589             this, SLOT (vmAutoresizeGuest (bool)));
    590     connect (vmAdjustWindowAction, SIGNAL (triggered()),
     590    connect (mVmAdjustWindowAction, SIGNAL (triggered()),
    591591             this, SLOT (vmAdjustWindow()));
    592592
    593     connect (vmTypeCADAction, SIGNAL(triggered()), this, SLOT(vmTypeCAD()));
     593    connect (mVmTypeCADAction, SIGNAL(triggered()), this, SLOT(vmTypeCAD()));
    594594#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()));
    614614
    615615
     
    670670    if (mDbgMenu)
    671671        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)));
    678678#endif
    679679
     
    763763    }
    764764
    765     vmPauseAction->setChecked (false);
     765    mVmPauseAction->setChecked (false);
    766766
    767767    VBoxDefs::RenderMode mode = vboxGlobal().vmRenderMode();
     
    836836        qApp->processEvents();
    837837
    838         vmSeamlessAction->setEnabled (false);
     838        mVmSeamlessAction->setEnabled (false);
    839839        str = cmachine.GetExtraData (VBoxDefs::GUI_Seamless);
    840840        if (str == "on")
    841             vmSeamlessAction->setChecked (true);
     841            mVmSeamlessAction->setChecked (true);
    842842
    843843        str = cmachine.GetExtraData (VBoxDefs::GUI_AutoresizeGuest);
    844844        if (str != "off")
    845             vmAutoresizeGuestAction->setChecked (true);
     845            mVmAutoresizeGuestAction->setChecked (true);
    846846
    847847        str = cmachine.GetExtraData (VBoxDefs::GUI_FirstRun);
     
    879879    {
    880880        /* hide vrdp_menu_action & vrdp_separator & vrdp_status_icon */
    881         devicesSwitchVrdpAction->setVisible (false);
     881        mDevicesSwitchVrdpAction->setVisible (false);
    882882        mDevicesVRDPMenuSeparator->setVisible (false);
    883883#if 0
     
    891891    {
    892892        /* hide shared folders menu action & sf_separator & sf_status_icon */
    893         devicesSFDialogAction->setVisible (false);
     893        mDevicesSFDialogAction->setVisible (false);
    894894        mDevicesSFMenuSeparator->setVisible (false);
    895895        sf_light->setHidden (true);
     
    10441044    QString str = cmachine.GetExtraData (VBoxDefs::GUI_Fullscreen);
    10451045    if (str == "on")
    1046         vmFullscreenAction->setChecked (true);
     1046        mVmFullscreenAction->setChecked (true);
    10471047
    10481048    /* If seamless mode should be enabled then check if it is enabled
    10491049     * currently and re-enable it if seamless is supported */
    1050     if (   vmSeamlessAction->isChecked()
     1050    if (   mVmSeamlessAction->isChecked()
    10511051        && mIsSeamlessSupported
    10521052        && mIsGraphicsSupported)
     
    11121112
    11131113        machine.SetExtraData (VBoxDefs::GUI_Fullscreen,
    1114                               vmFullscreenAction->isChecked() ? "on" : "off");
     1114                              mVmFullscreenAction->isChecked() ? "on" : "off");
    11151115        machine.SetExtraData (VBoxDefs::GUI_Seamless,
    1116                               vmSeamlessAction->isChecked() ? "on" : "off");
     1116                              mVmSeamlessAction->isChecked() ? "on" : "off");
    11171117        machine.SetExtraData (VBoxDefs::GUI_AutoresizeGuest,
    1118                               vmAutoresizeGuestAction->isChecked() ? "on" : "off");
     1118                              mVmAutoresizeGuestAction->isChecked() ? "on" : "off");
    11191119    }
    11201120
     
    11611161{
    11621162    if (mIsSeamless)
    1163         vmSeamlessAction->setEnabled (true);
     1163        mVmSeamlessAction->setEnabled (true);
    11641164    else if (mIsFullscreen)
    1165         vmFullscreenAction->setEnabled (true);
     1165        mVmFullscreenAction->setEnabled (true);
    11661166    else
    11671167    {
    1168         vmSeamlessAction->setEnabled (mIsSeamlessSupported && mIsGraphicsSupported);
    1169         vmFullscreenAction->setEnabled (true);
     1168        mVmSeamlessAction->setEnabled (mIsSeamlessSupported && mIsGraphicsSupported);
     1169        mVmFullscreenAction->setEnabled (true);
    11701170    }
    11711171
     
    11821182void VBoxConsoleWnd::setMouseIntegrationLocked (bool aDisabled)
    11831183{
    1184     vmDisableMouseIntegrAction->setChecked (aDisabled);
    1185     vmDisableMouseIntegrAction->setEnabled (false);
     1184    mVmDisableMouseIntegrAction->setChecked (aDisabled);
     1185    mVmDisableMouseIntegrAction->setEnabled (false);
    11861186}
    11871187
     
    15901590
    15911591    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 (
    16051605        tr ("Automatically resize the guest display when the window is resized "
    16061606            "(requires Guest Additions)"));
    16071607
    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 (
    16101610        tr ("Adjust window size and position to best fit the guest display"));
    16111611
    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 (
    16141614        tr ("Send the Ctrl-Alt-Del sequence to the virtual machine"));
    16151615
    16161616#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 (
    16201620        tr ("Send the Ctrl-Alt-Backspace sequence to the virtual machine"));
    16211621#endif
    16221622
    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() */
    16271627
    16281628#ifdef Q_WS_MAC
    16291629    /* 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"));
    16311631#else /* Q_WS_MAC */
    1632     vmACPIShutdownAction->setText (VBoxGlobal::insertKeyToActionText (tr ("ACPI S&hutdown"), "H"));
     1632    mVmACPIShutdownAction->setText (VBoxGlobal::insertKeyToActionText (tr ("ACPI S&hutdown"), "H"));
    16331633#endif /* !Q_WS_MAC */
    1634     vmACPIShutdownAction->setStatusTip (
     1634    mVmACPIShutdownAction->setStatusTip (
    16351635        tr ("Send the ACPI Power Button press event to the virtual machine"));
    16361636
    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() */
    16491649
    16501650    /* Devices actions */
    16511651
    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 (
    16571657        tr ("Unmount the currently mounted floppy media"));
    16581658
    1659     devicesMountDVDImageAction->setText (tr ("&CD/DVD-ROM Image..."));
    1660     devicesMountDVDImageAction->setStatusTip (
     1659    mDevicesMountDVDImageAction->setText (tr ("&CD/DVD-ROM Image..."));
     1660    mDevicesMountDVDImageAction->setStatusTip (
    16611661        tr ("Mount a CD/DVD-ROM image file"));
    16621662
    1663     devicesUnmountDVDAction->setText (tr ("Unmount C&D/DVD-ROM"));
    1664     devicesUnmountDVDAction->setStatusTip (
     1663    mDevicesUnmountDVDAction->setText (tr ("Unmount C&D/DVD-ROM"));
     1664    mDevicesUnmountDVDAction->setStatusTip (
    16651665        tr ("Unmount the currently mounted CD/DVD-ROM media"));
    16661666
    16671667    /* mDevicesVRDPMenu->setToolTip (tr ("Remote Desktop (RDP) Server",
    16681668                                     "enable/disable...")); */
    1669     devicesSwitchVrdpAction->setText (tr ("Remote Dis&play"));
    1670     devicesSwitchVrdpAction->setStatusTip (
     1669    mDevicesSwitchVrdpAction->setText (tr ("Remote Dis&play"));
     1670    mDevicesSwitchVrdpAction->setStatusTip (
    16711671        tr ("Enable or disable remote desktop (RDP) connections to this machine"));
    16721672
    1673     devicesSFDialogAction->setText (tr ("&Shared Folders..."));
    1674     devicesSFDialogAction->setStatusTip (
     1673    mDevicesSFDialogAction->setText (tr ("&Shared Folders..."));
     1674    mDevicesSFDialogAction->setStatusTip (
    16751675        tr ("Open the dialog to operate on shared folders"));
    16761676
    1677     devicesInstallGuestToolsAction->setText (tr ("&Install Guest Additions..."));
    1678     devicesInstallGuestToolsAction->setStatusTip (
     1677    mDevicesInstallGuestToolsAction->setText (tr ("&Install Guest Additions..."));
     1678    mDevicesInstallGuestToolsAction->setStatusTip (
    16791679        tr ("Mount the Guest Additions installation image"));
    16801680
     
    16821682    /* Debug actions */
    16831683
    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"));
    16901690#endif
    16911691
     
    17811781        KDriveState state = floppy.GetState();
    17821782        bool mounted = state != KDriveState_NotMounted;
    1783         devicesUnmountFloppyAction->setEnabled (isRunningOrPaused && mounted);
     1783        mDevicesUnmountFloppyAction->setEnabled (isRunningOrPaused && mounted);
    17841784        fd_light->setState (mounted ? KDeviceActivity_Idle : KDeviceActivity_Null);
    17851785        QString tip = tr ("<qt><nobr>Indicates the activity of the floppy media:</nobr>"
     
    18251825        KDriveState state = dvd.GetState();
    18261826        bool mounted = state != KDriveState_NotMounted;
    1827         devicesUnmountDVDAction->setEnabled (isRunningOrPaused && mounted);
     1827        mDevicesUnmountDVDAction->setEnabled (isRunningOrPaused && mounted);
    18281828        cd_light->setState (mounted ? KDeviceActivity_Idle : KDeviceActivity_Null);
    18291829        QString tip = tr ("<qt><nobr>Indicates the activity of the CD/DVD-ROM media:</nobr>"
     
    19731973            /* update menu&status icon state */
    19741974            bool isVRDPEnabled = vrdpsrv.GetEnabled();
    1975             devicesSwitchVrdpAction->setChecked (isVRDPEnabled);
     1975            mDevicesSwitchVrdpAction->setChecked (isVRDPEnabled);
    19761976#if 0
    19771977            vrdp_state->setState (isVRDPEnabled ? 1 : 0);
     
    20362036    if (element & PauseAction)
    20372037    {
    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 (
    20422042                tr ("Suspend the execution of the virtual machine"));
    20432043        }
    20442044        else
    20452045        {
    2046             vmPauseAction->setText (VBoxGlobal::insertKeyToActionText (tr ("R&esume"), "P"));
    2047             vmPauseAction->setStatusTip (
     2046            mVmPauseAction->setText (VBoxGlobal::insertKeyToActionText (tr ("R&esume"), "P"));
     2047            mVmPauseAction->setStatusTip (
    20482048                tr ("Resume the execution of the virtual machine" ) );
    20492049        }
    2050         vmPauseAction->setEnabled (isRunningOrPaused);
     2050        mVmPauseAction->setEnabled (isRunningOrPaused);
    20512051    }
    20522052    if (element & DisableMouseIntegrAction)
    20532053    {
    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 (
    20592059                tr ("Temporarily disable host mouse pointer integration"));
    20602060        }
    20612061        else
    20622062        {
    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 (
    20662066                tr ("Enable temporarily disabled host mouse pointer integration"));
    20672067        }
    20682068        if (machine_state == KMachineState_Running)
    2069             vmDisableMouseIntegrAction->setEnabled (console->isMouseAbsolute());
     2069            mVmDisableMouseIntegrAction->setEnabled (console->isMouseAbsolute());
    20702070        else
    2071             vmDisableMouseIntegrAction->setEnabled (false);
     2071            mVmDisableMouseIntegrAction->setEnabled (false);
    20722072    }
    20732073}
     
    21342134        QString hotKey = QString ("Host+%1")
    21352135            .arg (VBoxGlobal::extractKeyFromActionText (aSeamless ?
    2136                   vmSeamlessAction->text() : vmFullscreenAction->text()));
     2136                  mVmSeamlessAction->text() : mVmFullscreenAction->text()));
    21372137
    21382138        Assert (!hotKey.isEmpty());
     
    21582158    {
    21592159        /* 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);
    21622162
    21632163        /* 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);
    21712171
    21722172        console->console().GetDisplay().SetSeamlessMode (aOn);
     
    21762176    {
    21772177        mIsFullscreen = aOn;
    2178         vmAdjustWindowAction->setEnabled (!aOn);
    2179         vmSeamlessAction->setEnabled (!aOn && mIsSeamlessSupported && mIsGraphicsSupported);
     2178        mVmAdjustWindowAction->setEnabled (!aOn);
     2179        mVmSeamlessAction->setEnabled (!aOn && mIsSeamlessSupported && mIsGraphicsSupported);
    21802180    }
    21812181
     
    21842184    /* Temporarily disable the mode-related action to make sure
    21852185     * 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);
    21882188
    21892189    /* Calculate initial console size */
     
    24632463    {
    24642464        /* 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);
    24682468    }
    24692469}
     
    24782478        {
    24792479            /* 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);
    24832483        }
    24842484    }
     
    28222822
    28232823        VBoxAdditionsDownloader *dl =
    2824             new VBoxAdditionsDownloader (source, target, devicesInstallGuestToolsAction);
     2824            new VBoxAdditionsDownloader (source, target, mDevicesInstallGuestToolsAction);
    28252825        statusBar()->addWidget (dl, 0);
    28262826        dl->start();
     
    29872987    if (mDevicesMountFloppyMenu->actions().count() > 0)
    29882988        mDevicesMountFloppyMenu->addSeparator();
    2989     mDevicesMountFloppyMenu->addAction (devicesMountFloppyImageAction);
     2989    mDevicesMountFloppyMenu->addAction (mDevicesMountFloppyImageAction);
    29902990
    29912991    /* if shown as a context menu */
     
    29932993    {
    29942994        mDevicesMountFloppyMenu->addSeparator();
    2995         mDevicesMountFloppyMenu->addAction (devicesUnmountFloppyAction);
     2995        mDevicesMountFloppyMenu->addAction (mDevicesUnmountFloppyAction);
    29962996    }
    29972997}
     
    30353035    if (mDevicesMountDVDMenu->actions().count() > 0)
    30363036        mDevicesMountDVDMenu->addSeparator();
    3037     mDevicesMountDVDMenu->addAction (devicesMountDVDImageAction);
     3037    mDevicesMountDVDMenu->addAction (mDevicesMountDVDImageAction);
    30383038
    30393039    /* if shown as a context menu */
     
    30413041    {
    30423042        mDevicesMountDVDMenu->addSeparator();
    3043         mDevicesMountDVDMenu->addAction (devicesUnmountDVDAction);
     3043        mDevicesMountDVDMenu->addAction (mDevicesUnmountDVDAction);
    30443044    }
    30453045}
     
    30783078        StatusTipEvent *ev = new StatusTipEvent (tip);
    30793079        QApplication::postEvent (this, ev);
    3080         waitForStatusBarChange = true;
     3080        mWaitForStatusBarChange = true;
    30813081    }
    30823082}
     
    30843084void VBoxConsoleWnd::statusTipChanged (const QString & /*aMes*/)
    30853085{
    3086     statusBarChangedInside = waitForStatusBarChange;
    3087     waitForStatusBarChange = false;
     3086    mStatusBarChangedInside = mWaitForStatusBarChange;
     3087    mWaitForStatusBarChange = false;
    30883088}
    30893089
    30903090void VBoxConsoleWnd::clearStatusBar()
    30913091{
    3092     if (statusBarChangedInside)
     3092    if (mStatusBarChangedInside)
    30933093        statusBar()->clearMessage();
    30943094}
     
    32353235    if (ind == autoresize_state)
    32363236    {
    3237         vmAutoresizeMenu->exec (e->globalPos());
     3237        mVmAutoresizeMenu->exec (e->globalPos());
    32383238    }
    32393239    else
    32403240    if (ind == mouse_state)
    32413241    {
    3242         vmDisMouseIntegrMenu->exec (e->globalPos());
     3242        mVmDisMouseIntegrMenu->exec (e->globalPos());
    32433243    }
    32443244    else
     
    32503250         * the future. */
    32513251        /* mDevicesSFMenu->exec (e->globalPos()); */
    3252         if (devicesSFDialogAction->isEnabled())
    3253             devicesSFDialogAction->trigger();
     3252        if (mDevicesSFDialogAction->isEnabled())
     3253            mDevicesSFDialogAction->trigger();
    32543254    }
    32553255    else
     
    33213321                case KMachineState_Paused:
    33223322                {
    3323                     if (!vmPauseAction->isChecked())
    3324                         vmPauseAction->setChecked (true);
     3323                    if (!mVmPauseAction->isChecked())
     3324                        mVmPauseAction->setChecked (true);
    33253325                    break;
    33263326                }
    33273327                case KMachineState_Running:
    33283328                {
    3329                     if (machine_state == KMachineState_Paused && vmPauseAction->isChecked())
    3330                         vmPauseAction->setChecked (false);
     3329                    if (machine_state == KMachineState_Paused && mVmPauseAction->isChecked())
     3330                        mVmPauseAction->setChecked (false);
    33313331                    break;
    33323332                }
     
    34063406void VBoxConsoleWnd::updateMouseState (int state)
    34073407{
    3408     vmDisableMouseIntegrAction->setEnabled (state & VBoxConsoleView::MouseAbsolute);
     3408    mVmDisableMouseIntegrAction->setEnabled (state & VBoxConsoleView::MouseAbsolute);
    34093409
    34103410    if ((state & VBoxConsoleView::MouseAbsoluteDisabled) &&
     
    34273427                                           bool aGraphicsSupported)
    34283428{
    3429     vmAutoresizeGuestAction->setEnabled (aActive && aGraphicsSupported);
     3429    mVmAutoresizeGuestAction->setEnabled (aActive && aGraphicsSupported);
    34303430    if (   (mIsSeamlessSupported != aSeamlessSupported)
    34313431        || (mIsGraphicsSupported != aGraphicsSupported))
    34323432    {
    3433         vmSeamlessAction->setEnabled (aSeamlessSupported && aGraphicsSupported);
     3433        mVmSeamlessAction->setEnabled (aSeamlessSupported && aGraphicsSupported);
    34343434        mIsSeamlessSupported = aSeamlessSupported;
    34353435        mIsGraphicsSupported = aGraphicsSupported;
    34363436        /* If seamless mode should be enabled then check if it is enabled
    34373437         * currently and re-enable it if open-view procedure is finished */
    3438         if (   vmSeamlessAction->isChecked()
     3438        if (   mVmSeamlessAction->isChecked()
    34393439            && mIsOpenViewFinished
    34403440            && aSeamlessSupported
     
    34433443        /* Disable auto-resizing if advanced graphics are not available */
    34443444        console->setAutoresizeGuest (   mIsGraphicsSupported
    3445                                      && vmAutoresizeGuestAction->isChecked());
    3446         vmAutoresizeGuestAction->setEnabled (mIsGraphicsSupported);
     3445                                     && mVmAutoresizeGuestAction->isChecked());
     3446        mVmAutoresizeGuestAction->setEnabled (mIsGraphicsSupported);
    34473447    }
    34483448
     
    35633563        }
    35643564    }
    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);
    35693569#endif /* VBOX_WITH_DEBUGGER_GUI */
    35703570}
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxSelectorWnd.cpp

    r14473 r14478  
    381381                 Qt::WindowFlags aFlags /* = Qt::Window */)
    382382    : QIWithRetranslateUI2<QMainWindow> (aParent, aFlags)
    383     , doneInaccessibleWarningOnce (false)
     383    , mDoneInaccessibleWarningOnce (false)
    384384{
    385385    VBoxGlobalSettings settings = vboxGlobal().settings();
     
    402402    /* actions */
    403403
    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 (
    415415        QSize (32, 32), QSize (16, 16),
    416416        ":/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 (
    419419        QSize (32, 32), QSize (16, 16),
    420420        ":/vm_settings_32px.png", ":/settings_16px.png",
    421421        ":/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 (
    424424        QSize (32, 32), QSize (16, 16),
    425425        ":/vm_delete_32px.png", ":/delete_16px.png",
    426426        ":/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 (
    429429        QSize (32, 32), QSize (16, 16),
    430430        ":/vm_start_32px.png", ":/start_16px.png",
    431431        ":/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 (
    434434        QSize (32, 32), QSize (16, 16),
    435435        ":/vm_discard_32px.png", ":/discard_16px.png",
    436436        ":/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 (
    440440        QSize (32, 32), QSize (16, 16),
    441441        ":/vm_pause_32px.png", ":/pause_16px.png",
    442442        ":/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 (
    445445        QSize (32, 32), QSize (16, 16),
    446446        ":/refresh_32px.png", ":/refresh_16px.png",
    447447        ":/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 (
    450450        QSize (32, 32), QSize (16, 16),
    451451        ":/vm_show_logs_32px.png", ":/show_logs_16px.png",
     
    492492
    493493    /* VM tab widget containing details and snapshots tabs */
    494     vmTabWidget = new QTabWidget();
    495     rightVLayout->addWidget (vmTabWidget);
     494    mVmTabWidget = new QTabWidget();
     495    rightVLayout->addWidget (mVmTabWidget);
    496496
    497497    /* 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);
    502502
    503503    /* 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);
    510510
    511511    /* 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);
    518518
    519519    /* add actions to the toolbar */
     
    523523    vmTools->setSizePolicy (QSizePolicy::Fixed, QSizePolicy::Preferred);
    524524
    525     vmTools->addAction (vmNewAction);
    526     vmTools->addAction (vmConfigAction);
     525    vmTools->addAction (mVmNewAction);
     526    vmTools->addAction (mVmConfigAction);
    527527#if 0 /* delete action is really rare */
    528     vmTools->addAction (vmDeleteAction);
     528    vmTools->addAction (mVmDeleteAction);
    529529#endif
    530     vmTools->addAction (vmStartAction);
    531     vmTools->addAction (vmDiscardAction);
     530    vmTools->addAction (mVmStartAction);
     531    vmTools->addAction (mVmDiscardAction);
    532532
    533533    /* add actions to menubar */
    534534
    535535    mFileMenu = menuBar()->addMenu (QString::null);
    536     mFileMenu->addAction (fileMediaMgrAction);
     536    mFileMenu->addAction (mFileMediaMgrAction);
    537537    mFileMenu->addSeparator();
    538     mFileMenu->addAction (fileSettingsAction);
     538    mFileMenu->addAction (mFileSettingsAction);
    539539    mFileMenu->addSeparator();
    540     mFileMenu->addAction (fileExitAction);
     540    mFileMenu->addAction (mFileExitAction);
    541541
    542542    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);
    546546    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);
    550550    mVMMenu->addSeparator();
    551     mVMMenu->addAction (vmRefreshAction);
    552     mVMMenu->addAction (vmShowLogsAction);
     551    mVMMenu->addAction (mVmRefreshAction);
     552    mVMMenu->addAction (mVmShowLogsAction);
    553553
    554554    mVMCtxtMenu = new QMenu (this);
    555     mVMCtxtMenu->addAction (vmConfigAction);
    556     mVMCtxtMenu->addAction (vmDeleteAction);
     555    mVMCtxtMenu->addAction (mVmConfigAction);
     556    mVMCtxtMenu->addAction (mVmDeleteAction);
    557557    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);
    561561    mVMCtxtMenu->addSeparator();
    562     mVMCtxtMenu->addAction (vmRefreshAction);
    563     mVMCtxtMenu->addAction (vmShowLogsAction);
     562    mVMCtxtMenu->addAction (mVmRefreshAction);
     563    mVMCtxtMenu->addAction (mVmShowLogsAction);
    564564
    565565    mHelpMenu = menuBar()->addMenu (QString::null);
     
    602602
    603603            /* Composing normal parameters */
    604             normal_size = QSize (w, h).expandedTo (minimumSizeHint())
     604            mNormalSize = QSize (w, h).expandedTo (minimumSizeHint())
    605605                          .boundedTo (ar.size());
    606             normal_pos = QPoint (x, y);
     606            mNormalPos = QPoint (x, y);
    607607
    608608            /* Applying normal parameters */
    609             resize (normal_size);
    610             move (normal_pos);
     609            resize (mNormalSize);
     610            move (mNormalPos);
    611611            if (max)
    612612                /* maximize if needed */
     
    634634
    635635    /* 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()));
    648648
    649649    connect (mVMListView, SIGNAL (currentChanged()),
     
    654654             this, SLOT (showContextMenu (const QPoint &)));
    655655
    656     connect (vmDetailsView, SIGNAL (linkClicked (const QString &)),
     656    connect (mVmDetailsView, SIGNAL (linkClicked (const QString &)),
    657657            this, SLOT (vmSettings (const QString &)));
    658658
     
    686686    {
    687687        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());
    692692        if (isMaximized())
    693693            winPos += QString (",%1").arg (VBoxDefs::GUI_LastWindowPosition_Max);
     
    899899        /* We always get here when mVMListView emits the activated() signal,
    900900         * so we must explicitly check if the action is enabled or not. */
    901         if (!vmStartAction->isEnabled())
     901        if (!mVmStartAction->isEnabled())
    902902            return;
    903903    }
     
    11561156            if ((windowState() & (Qt::WindowMaximized | Qt::WindowMinimized |
    11571157                                  Qt::WindowFullScreen)) == 0)
    1158                 normal_size = re->size();
     1158                mNormalSize = re->size();
    11591159            break;
    11601160        }
     
    11731173
    11741174                if (!(pos().x() == geometry().x() && pos().y() == geometry().y()))
    1175                     normal_pos = pos();
     1175                    mNormalPos = pos();
    11761176            }
    11771177            break;
     
    12301230#endif
    12311231
    1232     vmTabWidget->setTabText (vmTabWidget->indexOf (vmDetailsView), tr ("&Details"));
     1232    mVmTabWidget->setTabText (mVmTabWidget->indexOf (mVmDetailsView), tr ("&Details"));
    12331233    /* note: Snapshots and Details tabs are changed dynamically by
    12341234     * vmListViewCurrentChanged() */
     
    12371237    vmListViewCurrentChanged();
    12381238
    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"));
    12421242
    12431243#ifdef Q_WS_MAC
     
    12521252     * be really interesting to see how this plays on non-english systems...
    12531253     */
    1254     fileSettingsAction->setText (tr ("&Preferences...", "global settings"));
     1254    mFileSettingsAction->setText (tr ("&Preferences...", "global settings"));
    12551255#else
    12561256    /*
     
    12591259     * to figure out.
    12601260     */
    1261     fileSettingsAction->setText (tr ("&Preferences...", "global settings"));
     1261    mFileSettingsAction->setText (tr ("&Preferences...", "global settings"));
    12621262#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 (
    12891289        tr ("Discard the saved state of the selected virtual machine"));
    12901290
    1291     vmPauseAction->setText (tr ("&Pause"));
    1292     vmPauseAction->setStatusTip (
     1291    mVmPauseAction->setText (tr ("&Pause"));
     1292    mVmPauseAction->setStatusTip (
    12931293        tr ("Suspend the execution of the virtual machine"));
    12941294
    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 (
    12981298        tr ("Refresh the accessibility state of the selected virtual machine"));
    12991299
    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 (
    13041304        tr ("Show the log files of the selected virtual machine"));
    13051305
     
    13401340        if (aRefreshDetails)
    13411341        {
    1342             vmDetailsView->setDetailsText (
     1342            mVmDetailsView->setDetailsText (
    13431343                vboxGlobal().detailsReport (m, false /* isNewVM */,
    13441344                                            modifyEnabled /* withLinks */));
     
    13511351            if (count)
    13521352                name += QString (" (%1)").arg (count);
    1353             vmTabWidget->setTabText (vmTabWidget->indexOf (vmSnapshotsWgt), name);
     1353            mVmTabWidget->setTabText (mVmTabWidget->indexOf (mVmSnapshotsWgt), name);
    13541354            /* refresh the snapshots widget */
    1355             vmSnapshotsWgt->setMachine (m);
     1355            mVmSnapshotsWgt->setMachine (m);
    13561356            /* ensure the tab is enabled */
    1357             vmTabWidget->setTabEnabled (vmTabWidget->indexOf (vmSnapshotsWgt), true);
     1357            mVmTabWidget->setTabEnabled (mVmTabWidget->indexOf (mVmSnapshotsWgt), true);
    13581358        }
    13591359        if (aRefreshDescription)
     
    13621362            QString name = m.GetDescription().isEmpty() ?
    13631363                tr ("D&escription") : tr ("D&escription *");
    1364             vmTabWidget->setTabText (vmTabWidget->indexOf (vmDescriptionPage), name);
     1364            mVmTabWidget->setTabText (mVmTabWidget->indexOf (mVmDescriptionPage), name);
    13651365            /* refresh the description widget */
    1366             vmDescriptionPage->setMachineItem (item);
     1366            mVmDescriptionPage->setMachineItem (item);
    13671367            /* ensure the tab is enabled */
    1368             vmTabWidget->setTabEnabled (vmTabWidget->indexOf (vmDescriptionPage), true);
     1368            mVmTabWidget->setTabEnabled (mVmTabWidget->indexOf (mVmDescriptionPage), true);
    13691369        }
    13701370
    13711371        /* 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 ||
    13761376                                   state == KMachineState_Paused);
    13771377
     
    13791379        if (state >= KMachineState_Running)
    13801380        {
    1381             vmStartAction->setText (tr ("S&how"));
    1382             vmStartAction->setStatusTip (
     1381            mVmStartAction->setText (tr ("S&how"));
     1382            mVmStartAction->setStatusTip (
    13831383                tr ("Switch to the window of the selected virtual machine"));
    13841384
    1385             vmStartAction->setEnabled (item->canSwitchTo());
     1385            mVmStartAction->setEnabled (item->canSwitchTo());
    13861386        }
    13871387        else
    13881388        {
    1389             vmStartAction->setText (tr ("S&tart"));
    1390             vmStartAction->setStatusTip (
     1389            mVmStartAction->setText (tr ("S&tart"));
     1390            mVmStartAction->setStatusTip (
    13911391                tr ("Start the selected virtual machine"));
    13921392
    1393             vmStartAction->setEnabled (!running);
     1393            mVmStartAction->setEnabled (!running);
    13941394        }
    13951395
     
    13971397        if (state == KMachineState_Paused)
    13981398        {
    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 (
    14021402                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);
    14061406        }
    14071407        else
    14081408        {
    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 (
    14121412                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);
    14161416        }
    14171417
    14181418        /* disable Refresh for accessible machines */
    1419         vmRefreshAction->setEnabled (false);
     1419        mVmRefreshAction->setEnabled (false);
    14201420
    14211421        /* enable the show log item for the selected vm */
    1422         vmShowLogsAction->setEnabled (true);
     1422        mVmShowLogsAction->setEnabled (true);
    14231423    }
    14241424    else
     
    14311431        {
    14321432            /* the VM is inaccessible */
    1433             vmDetailsView->setErrorText (
     1433            mVmDetailsView->setErrorText (
    14341434                VBoxProblemReporter::formatErrorInfo (item->accessError()));
    1435             vmRefreshAction->setEnabled (true);
     1435            mVmRefreshAction->setEnabled (true);
    14361436        }
    14371437        else
     
    14391439            /* default HTML support in Qt is terrible so just try to get
    14401440             * something really simple */
    1441             vmDetailsView->setDetailsText
     1441            mVmDetailsView->setDetailsText
    14421442                (tr ("<h3>"
    14431443                     "Welcome to VirtualBox!</h3>"
     
    14541454                     "<a href=http://www.virtualbox.org>www.virtualbox.org</a> "
    14551455                     "for the latest information and news.</p>"));
    1456             vmRefreshAction->setEnabled (false);
     1456            mVmRefreshAction->setEnabled (false);
    14571457        }
    14581458
    14591459        /* empty and disable other tabs */
    14601460
    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);
    14681468
    14691469        /* 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);
    14741474
    14751475        /* change the Start button text accordingly */
    1476         vmStartAction->setText (tr ("S&tart"));
    1477         vmStartAction->setStatusTip (
     1476        mVmStartAction->setText (tr ("S&tart"));
     1477        mVmStartAction->setStatusTip (
    14781478            tr ("Start the selected virtual machine"));
    1479         vmStartAction->setEnabled (false);
     1479        mVmStartAction->setEnabled (false);
    14801480
    14811481        /* disable the show log item for the selected vm */
    1482         vmShowLogsAction->setEnabled (false);
     1482        mVmShowLogsAction->setEnabled (false);
    14831483    }
    14841484}
     
    14971497    /* we warn about inaccessible media only once (after media emumeration
    14981498     * started from main() at startup), to avoid annoying the user */
    1499     if (doneInaccessibleWarningOnce)
     1499    if (mDoneInaccessibleWarningOnce)
    15001500        return;
    15011501
    1502     doneInaccessibleWarningOnce = true;
     1502    mDoneInaccessibleWarningOnce = true;
    15031503
    15041504    do
     
    15381538
    15391539    /* simulate a state change signal */
    1540     vmDescriptionPage->updateState();
     1540    mVmDescriptionPage->updateState();
    15411541}
    15421542
     
    15921592
    15931593    /* simulate a state change signal */
    1594     vmDescriptionPage->updateState();
     1594    mVmDescriptionPage->updateState();
    15951595}
    15961596
     
    16071607VBoxTrayIcon::VBoxTrayIcon (VBoxSelectorWnd* aParent, VBoxVMModel* aVMModel)
    16081608{
     1609    mParent = aParent;
     1610    mVMModel = aVMModel;
     1611
    16091612    mShowSelectorAction = new QAction (this);
    16101613    Assert (mShowSelectorAction);
    16111614    mShowSelectorAction->setIcon (VBoxGlobal::iconSet (
    16121615        ":/VirtualBox_16px.png"));
     1616
    16131617    mHideSystrayMenuAction = new QAction (this);
    16141618    Assert (mHideSystrayMenuAction);
     
    16161620        ":/exit_16px.png"));
    16171621
     1622    /* reuse parent action data */
     1623
    16181624    mVmConfigAction = new QAction (this);
    16191625    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
    16241628    mVmDeleteAction = new QAction (this);
    16251629    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
    16301632    mVmStartAction = new QAction (this);
    16311633    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
    16361636    mVmDiscardAction = new QAction (this);
    16371637    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
    16421640    mVmPauseAction = new QAction (this);
    16431641    Assert (mVmPauseAction);
    16441642    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
    16491645    mVmRefreshAction = new QAction (this);
    16501646    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
    16551649    mVmShowLogsAction = new QAction (this);
    16561650    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());
    16611652
    16621653    mTrayIconMenu = new QMenu (aParent);
    16631654    Assert (mTrayIconMenu);
    1664 
    1665     mParent = aParent;
    1666     mVMModel = aVMModel;
    16671655
    16681656    setIcon (QIcon (":/VirtualBox_16px.png"));
     
    16971685        "Remove this icon from the system tray"));
    16981686
    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());
    17131703}
    17141704
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette