VirtualBox

Changeset 30551 in vbox for trunk/src


Ignore:
Timestamp:
Jul 1, 2010 1:50:52 AM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
63259
Message:

FE/Qt: New running VM core: Just some code cosmetics for UIMachineView.

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

Legend:

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

    r30550 r30551  
    8484#endif /* Q_WS_MAC */
    8585
    86 class VBoxViewport: public QWidget
     86class UIViewport: public QWidget
    8787{
    8888public:
    8989
    90     VBoxViewport(QWidget *pParent) : QWidget(pParent)
     90    UIViewport(QWidget *pParent) : QWidget(pParent)
    9191    {
    9292        /* No need for background drawing: */
     
    114114                                     )
    115115{
    116     UIMachineView *view = 0;
     116    UIMachineView *pMachineView = 0;
    117117    switch (visualStateType)
    118118    {
    119119        case UIVisualStateType_Normal:
    120             view = new UIMachineViewNormal(  pMachineWindow
    121                                            , uScreenId
     120            pMachineView = new UIMachineViewNormal(  pMachineWindow
     121                                                   , uScreenId
    122122#ifdef VBOX_WITH_VIDEOHWACCEL
    123                                            , bAccelerate2DVideo
     123                                                   , bAccelerate2DVideo
    124124#endif /* VBOX_WITH_VIDEOHWACCEL */
    125                                            );
     125                                                   );
    126126            break;
    127127        case UIVisualStateType_Fullscreen:
    128             view = new UIMachineViewFullscreen(  pMachineWindow
    129                                                , uScreenId
     128            pMachineView = new UIMachineViewFullscreen(  pMachineWindow
     129                                                       , uScreenId
    130130#ifdef VBOX_WITH_VIDEOHWACCEL
    131                                                , bAccelerate2DVideo
     131                                                       , bAccelerate2DVideo
    132132#endif /* VBOX_WITH_VIDEOHWACCEL */
    133                                                );
     133                                                       );
    134134            break;
    135135        case UIVisualStateType_Seamless:
    136             view = new UIMachineViewSeamless(  pMachineWindow
    137                                              , uScreenId
     136            pMachineView = new UIMachineViewSeamless(  pMachineWindow
     137                                                     , uScreenId
    138138#ifdef VBOX_WITH_VIDEOHWACCEL
    139                                              , bAccelerate2DVideo
     139                                                     , bAccelerate2DVideo
    140140#endif /* VBOX_WITH_VIDEOHWACCEL */
    141                                              );
     141                                                     );
    142142            break;
    143143        default:
    144144            break;
    145145    }
    146     return view;
     146    return pMachineView;
    147147}
    148148
     
    222222            break;
    223223    }
    224 
    225224    m_previousState = state;
    226225}
     
    263262    /* Prepare viewport: */
    264263#ifdef VBOX_GUI_USE_QGLFB
    265     QWidget *pViewport;
     264    QWidget *pViewport = 0;
    266265    switch (vboxGlobal().vmRenderMode())
    267266    {
     
    270269            break;
    271270        default:
    272             pViewport = new VBoxViewport(this);
     271            pViewport = new UIViewport(this);
    273272    }
    274273#else /* VBOX_GUI_USE_QGLFB */
    275     VBoxViewport *pViewport = new VBoxViewport(this);
     274    UIViewport *pViewport = new UIViewport(this);
    276275#endif /* !VBOX_GUI_USE_QGLFB */
    277276    setViewport(pViewport);
     
    11111110            return true;
    11121111        }
    1113 
    1114 #ifdef VBOX_WITH_VIDEOHWACCEL
    1115         case VBoxDefs::VHWACommandProcessType:
    1116         {
    1117             m_pFrameBuffer->doProcessVHWACommand(pEvent);
    1118             return true;
    1119         }
    1120 #endif /* VBOX_WITH_VIDEOHWACCEL */
    11211112
    11221113        case QEvent::KeyPress:
     
    11731164
    11741165#ifdef Q_WS_MAC
    1175         /* posted OnShowWindow */
     1166        /* Event posted OnShowWindow: */
    11761167        case VBoxDefs::ShowWindowEventType:
    11771168        {
     
    11861177        }
    11871178#endif /* Q_WS_MAC */
     1179
     1180#ifdef VBOX_WITH_VIDEOHWACCEL
     1181        case VBoxDefs::VHWACommandProcessType:
     1182        {
     1183            m_pFrameBuffer->doProcessVHWACommand(pEvent);
     1184            return true;
     1185        }
     1186#endif /* VBOX_WITH_VIDEOHWACCEL */
    11881187
    11891188        default:
     
    12691268    }
    12701269
    1271     return QAbstractScrollArea::eventFilter (pWatched, pEvent);
     1270    return QAbstractScrollArea::eventFilter(pWatched, pEvent);
    12721271}
    12731272
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h

    r30550 r30551  
    3434/* Local forwards */
    3535class UISession;
     36class UIMachineLogic;
     37class UIMachineWindow;
    3638class UIFrameBuffer;
    37 class UIMachineWindow;
    38 class UIMachineLogic;
    3939class VBoxGlobalSettings;
    4040
     
    176176    static LRESULT CALLBACK lowLevelKeyboardProc(int nCode, WPARAM wParam, LPARAM lParam);
    177177    bool winLowKeyboardEvent(UINT msg, const KBDLLHOOKSTRUCT &event);
    178     bool winEvent(MSG *aMsg, long *aResult);
     178    bool winEvent(MSG *pMsg, long *puResult);
    179179#elif defined(Q_WS_X11)
    180180    bool x11Event(XEvent *event);
Note: See TracChangeset for help on using the changeset viewer.

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