VirtualBox

Ignore:
Timestamp:
Aug 11, 2014 3:15:27 PM (10 years ago)
Author:
vboxsync
Message:

FE/Qt: 7462: Runtime UI: Menu-bar, menu cleanup/rework (part 16).

Location:
trunk/src/VBox/Frontends/VirtualBox/src/runtime
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIActionPoolRuntime.cpp

    r52239 r52343  
    12781278    if (m_pMultiScreenLayout)
    12791279    {
    1280         disconnect(this, SIGNAL(sigNotifyAboutTriggeringViewMultiscreen(int, int)),
     1280        disconnect(this, SIGNAL(sigNotifyAboutTriggeringViewScreenRemap(int, int)),
    12811281                   m_pMultiScreenLayout, SLOT(sltHandleScreenLayoutChange(int, int)));
    12821282        disconnect(m_pMultiScreenLayout, SIGNAL(sigScreenLayoutUpdate()),
     
    12901290    if (m_pMultiScreenLayout)
    12911291    {
    1292         connect(this, SIGNAL(sigNotifyAboutTriggeringViewMultiscreen(int, int)),
     1292        connect(this, SIGNAL(sigNotifyAboutTriggeringViewScreenRemap(int, int)),
    12931293                m_pMultiScreenLayout, SLOT(sltHandleScreenLayoutChange(int, int)));
    12941294        connect(m_pMultiScreenLayout, SIGNAL(sigScreenLayoutUpdate()),
     
    13721372#endif /* VBOX_WITH_DEBUGGER_GUI */
    13731373
    1374 void UIActionPoolRuntime::sltPrepareMenuViewResize()
     1374void UIActionPoolRuntime::sltPrepareMenuViewScreen()
    13751375{
    13761376    /* Make sure sender is valid: */
     
    13791379
    13801380    /* Call to corresponding handler: */
    1381     updateMenuViewResize(pMenu);
     1381    updateMenuViewScreen(pMenu);
    13821382}
    13831383
     
    13921392}
    13931393
    1394 void UIActionPoolRuntime::sltHandleActionTriggerViewResize(QAction *pAction)
     1394void UIActionPoolRuntime::sltHandleActionTriggerViewScreenResize(QAction *pAction)
    13951395{
    13961396    /* Make sure sender is valid: */
     
    14001400    const int iGuestScreenIndex = pAction->property("Guest Screen Index").toInt();
    14011401    const QSize size = pAction->property("Requested Size").toSize();
    1402     emit sigNotifyAboutTriggeringViewResize(iGuestScreenIndex, size);
    1403 }
    1404 
    1405 void UIActionPoolRuntime::sltHandleActionTriggerViewMultiscreen(QAction *pAction)
     1402    emit sigNotifyAboutTriggeringViewScreenResize(iGuestScreenIndex, size);
     1403}
     1404
     1405void UIActionPoolRuntime::sltHandleActionTriggerViewScreenRemap(QAction *pAction)
    14061406{
    14071407    /* Make sure sender is valid: */
     
    14111411    const int iGuestScreenIndex = pAction->property("Guest Screen Index").toInt();
    14121412    const int iHostScreenIndex = pAction->property("Host Screen Index").toInt();
    1413     emit sigNotifyAboutTriggeringViewMultiscreen(iGuestScreenIndex, iHostScreenIndex);
     1413    emit sigNotifyAboutTriggeringViewScreenRemap(iGuestScreenIndex, iHostScreenIndex);
    14141414}
    14151415
     
    19811981                                                                     "Virtual Screen %1").arg(iGuestScreenIndex + 1));
    19821982            pSubMenu->setProperty("Guest Screen Index", iGuestScreenIndex);
    1983             connect(pSubMenu, SIGNAL(aboutToShow()), this, SLOT(sltPrepareMenuViewResize()));
     1983            connect(pSubMenu, SIGNAL(aboutToShow()), this, SLOT(sltPrepareMenuViewScreen()));
    19841984        }
    19851985    }
     
    20512051                                                                     "Virtual Screen %1").arg(iGuestScreenIndex + 1));
    20522052            pSubMenu->setProperty("Guest Screen Index", iGuestScreenIndex);
    2053             connect(pSubMenu, SIGNAL(aboutToShow()), this, SLOT(sltPrepareMenuViewResize()));
     2053            connect(pSubMenu, SIGNAL(aboutToShow()), this, SLOT(sltPrepareMenuViewScreen()));
    20542054        }
    20552055    }
     
    20842084}
    20852085
    2086 void UIActionPoolRuntime::updateMenuViewResize(QMenu *pMenu)
     2086void UIActionPoolRuntime::updateMenuViewScreen(QMenu *pMenu)
    20872087{
    20882088    /* Make sure UI session defined: */
     
    21112111    const QSize screenSize = QSize(pFrameBuffer->width(), pFrameBuffer->height());
    21122112
    2113     /* Create exclusive action-group: */
     2113    /* Create exclusive 'resize' action-group: */
    21142114    QActionGroup *pActionGroup = new QActionGroup(pMenu);
    21152115    AssertPtrReturnVoid(pActionGroup);
    21162116    {
    2117         /* Configure exclusive action-group: */
     2117        /* Configure exclusive 'resize' action-group: */
    21182118        pActionGroup->setExclusive(true);
    21192119        /* For every available size: */
    21202120        foreach (const QSize &size, sizes)
    21212121        {
    2122             /* Create exclusive action: */
     2122            /* Create exclusive 'resize' action: */
    21232123            QAction *pAction = pActionGroup->addAction(UIActionPoolRuntime::tr("Resize to %1x%2", "Virtual Screen")
    21242124                                                                               .arg(size.width()).arg(size.height()));
    21252125            AssertPtrReturnVoid(pAction);
    21262126            {
    2127                 /* Configure exclusive action: */
     2127                /* Configure exclusive 'resize' action: */
    21282128                pAction->setEnabled(session()->isGuestSupportsGraphics());
    21292129                pAction->setProperty("Guest Screen Index", iGuestScreenIndex);
     
    21412141        /* Install listener for exclusive action-group: */
    21422142        connect(pActionGroup, SIGNAL(triggered(QAction*)),
    2143                 this, SLOT(sltHandleActionTriggerViewResize(QAction*)));
     2143                this, SLOT(sltHandleActionTriggerViewScreenResize(QAction*)));
    21442144    }
    21452145}
     
    21802180        /* Install listener for exclusive action-group: */
    21812181        connect(pActionGroup, SIGNAL(triggered(QAction*)),
    2182                 this, SLOT(sltHandleActionTriggerViewMultiscreen(QAction*)));
     2182                this, SLOT(sltHandleActionTriggerViewScreenRemap(QAction*)));
    21832183    }
    21842184}
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIActionPoolRuntime.h

    r52239 r52343  
    121121signals:
    122122
    123     /** Notifies about 'View' : 'Resize' menu action trigger. */
    124     void sigNotifyAboutTriggeringViewResize(int iGuestScreenIndex, const QSize &size);
    125     /** Notifies about 'View' : 'Multiscreen' menu action trigger. */
    126     void sigNotifyAboutTriggeringViewMultiscreen(int iGuestScreenIndex, int iHostScreenIndex);
     123    /** Notifies about 'View' : 'Virtual Screen #' menu : 'Resize' action trigger. */
     124    void sigNotifyAboutTriggeringViewScreenResize(int iGuestScreenIndex, const QSize &size);
     125    /** Notifies about 'View' : 'Virtual Screen #' menu : 'Remap' action trigger. */
     126    void sigNotifyAboutTriggeringViewScreenRemap(int iGuestScreenIndex, int iHostScreenIndex);
    127127
    128128public:
     
    169169protected slots:
    170170
    171     /** Prepare 'View' : 'Resize' menu routine. */
    172     void sltPrepareMenuViewResize();
    173     /** Prepare 'View' : 'Multiscreen' menu routine. */
     171    /** Prepare 'View' : 'Virtual Screen #' menu routine (Normal, Scale). */
     172    void sltPrepareMenuViewScreen();
     173    /** Prepare 'View' : 'Virtual Screen #' menu routine (Fullscreen, Seamless). */
    174174    void sltPrepareMenuViewMultiscreen();
    175175
    176     /** Handles 'View' : 'Resize' menu @a pAction trigger. */
    177     void sltHandleActionTriggerViewResize(QAction *pAction);
    178     /** Handles 'View' : 'Multiscreen' menu @a pAction trigger. */
    179     void sltHandleActionTriggerViewMultiscreen(QAction *pAction);
     176    /** Handles 'View' : 'Virtual Screen #' menu : 'Resize' @a pAction trigger. */
     177    void sltHandleActionTriggerViewScreenResize(QAction *pAction);
     178    /** Handles 'View' : 'Virtual Screen #' menu : 'Remap' @a pAction trigger. */
     179    void sltHandleActionTriggerViewScreenRemap(QAction *pAction);
    180180
    181181    /** Handles screen-layout update. */
     
    213213    /** Update 'View' : 'Status Bar' menu routine. */
    214214    void updateMenuViewStatusBar();
    215     /** Update 'View' : 'Resize' @a pMenu routine. */
    216     void updateMenuViewResize(QMenu *pMenu);
    217     /** Update 'View' : 'Multiscreen' @a pMenu routine. */
     215    /** Update 'View' : 'Virtual Screen #' @a pMenu routine (Normal, Scale). */
     216    void updateMenuViewScreen(QMenu *pMenu);
     217    /** Update 'View' : 'Virtual Screen #' @a pMenu routine (Fullscreen, Seamless). */
    218218    void updateMenuViewMultiscreen(QMenu *pMenu);
    219219    /** Update 'Devices' menu routine. */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.cpp

    r52236 r52343  
    124124}
    125125
    126 void UIMachineLogicNormal::sltHandleActionTriggerViewResize(int iIndex, const QSize &size)
     126void UIMachineLogicNormal::sltHandleActionTriggerViewScreenResize(int iIndex, const QSize &size)
    127127{
    128128    /* Resize guest to required size: */
     
    148148    connect(actionPool()->action(UIActionIndexRT_M_View_M_StatusBar_T_Visibility), SIGNAL(triggered(bool)),
    149149            this, SLOT(sltToggleStatusBar()));
    150     connect(actionPool(), SIGNAL(sigNotifyAboutTriggeringViewResize(int, const QSize&)),
    151             this, SLOT(sltHandleActionTriggerViewResize(int, const QSize&)));
     150    connect(actionPool(), SIGNAL(sigNotifyAboutTriggeringViewScreenResize(int, const QSize&)),
     151            this, SLOT(sltHandleActionTriggerViewScreenResize(int, const QSize&)));
    152152}
    153153
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.h

    r52298 r52343  
    4646    void sltStatusBarSettingsClosed();
    4747    void sltToggleStatusBar();
    48     void sltHandleActionTriggerViewResize(int iIndex, const QSize &size);
     48    void sltHandleActionTriggerViewScreenResize(int iIndex, const QSize &size);
    4949
    5050private:
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