Changeset 44828 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Feb 26, 2013 1:13:46 PM (12 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMultiScreenLayout.cpp
r44529 r44828 7 7 8 8 /* 9 * Copyright (C) 2010-201 2Oracle Corporation9 * Copyright (C) 2010-2013 Oracle Corporation 10 10 * 11 11 * This file is part of VirtualBox Open Source Edition (OSE), as … … 43 43 , m_pScreenMap(new QMap<int, int>()) 44 44 { 45 /* Calculate host/guest screen count: */ 45 46 CMachine machine = m_pMachineLogic->session().GetMachine(); 46 47 /* Get host/guest monitor count: */ … … 63 64 } 64 65 65 void UIMultiScreenLayout:: initialize(QMenu *pMenu)66 void UIMultiScreenLayout::setViewMenu(QMenu *pViewMenu) 66 67 { 67 68 if (m_cHostScreens > 1) 68 69 { 69 p Menu->addSeparator();70 pViewMenu->addSeparator(); 70 71 for (int i = 0; i < m_cGuestScreens; ++i) 71 72 { 72 m_screenMenuList << p Menu->addMenu(tr("Virtual Screen %1").arg(i + 1));73 m_screenMenuList << pViewMenu->addMenu(tr("Virtual Screen %1").arg(i + 1)); 73 74 m_screenMenuList.last()->menuAction()->setData(true); 74 75 QActionGroup *pScreenGroup = new QActionGroup(m_screenMenuList.last()); … … 175 176 } 176 177 177 int UIMultiScreenLayout::hostScreenForGuestScreen(int screenId) const178 { 179 return m_pScreenMap->value( screenId, 0);178 int UIMultiScreenLayout::hostScreenForGuestScreen(int iScreenId) const 179 { 180 return m_pScreenMap->value(iScreenId, 0); 180 181 } 181 182 … … 271 272 /* On success inform the observer. */ 272 273 if (fSuccess) 273 emit s creenLayoutChanged();274 emit sigScreenLayoutChanged(); 274 275 } 275 276 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMultiScreenLayout.h
r44529 r44828 6 6 7 7 /* 8 * Copyright (C) 2010-201 1Oracle Corporation8 * Copyright (C) 2010-2013 Oracle Corporation 9 9 * 10 10 * This file is part of VirtualBox Open Source Edition (OSE), as … … 20 20 #define __UIMultiScreenLayout_h__ 21 21 22 /* Global includes*/22 /* Qt includes: */ 23 23 #include <QObject> 24 24 25 /* Forward declarations: */ 25 26 class UIMachineLogic; 26 27 27 class QMenu; 28 28 class QAction; 29 29 template <class Key, class T> class QMap; 30 30 31 /* Multi-screen layout manager: */ 31 32 class UIMultiScreenLayout : public QObject 32 33 { 33 34 Q_OBJECT; 34 35 36 signals: 37 38 /* Notifier: Layout change stuff: */ 39 void sigScreenLayoutChanged(); 40 35 41 public: 42 43 /* Constructor/destructor: */ 36 44 UIMultiScreenLayout(UIMachineLogic *pMachineLogic); 37 45 ~UIMultiScreenLayout(); 38 46 39 void initialize(QMenu *pMenu); 47 /* API: View-menu stuff: */ 48 void setViewMenu(QMenu *pViewMenu); 49 50 /* API: Update stuff: */ 40 51 void update(); 52 53 /* API: Getters: */ 41 54 int hostScreenCount() const; 42 55 int guestScreenCount() const; 43 int hostScreenForGuestScreen(int screenId) const;56 int hostScreenForGuestScreen(int iScreenId) const; 44 57 quint64 memoryRequirements() const; 45 58 bool isHostTaskbarCovert() const; 46 59 47 signals:48 void screenLayoutChanged();49 50 60 private slots: 51 61 62 /* Handler: Screen change stuff: */ 52 63 void sltScreenLayoutChanged(QAction *pAction); 53 64 54 65 private: 55 66 67 /* Other helpers: */ 56 68 quint64 memoryRequirements(const QMap<int, int> *pScreenLayout) const; 57 69 58 /* Private member vars*/70 /* Variables: */ 59 71 UIMachineLogic *m_pMachineLogic; 60 61 72 int m_cGuestScreens; 62 73 int m_cHostScreens; 63 64 74 QMap<int, int> *m_pScreenMap; 65 75 QList<QMenu*> m_screenMenuList; -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp
r44825 r44828 128 128 /* Add the view menu: */ 129 129 QMenu *pMenu = gActionPool->action(UIActionIndexRuntime_Menu_View)->menu(); 130 m_pScreenLayout-> initialize(pMenu);130 m_pScreenLayout->setViewMenu(pMenu); 131 131 pMenu->setVisible(true); 132 132 } … … 153 153 /* Connect screen-layout change handler: */ 154 154 for (int i = 0; i < machineWindows().size(); ++i) 155 connect(m_pScreenLayout, SIGNAL(s creenLayoutChanged()),155 connect(m_pScreenLayout, SIGNAL(sigScreenLayoutChanged()), 156 156 static_cast<UIMachineWindowFullscreen*>(machineWindows()[i]), SLOT(sltPlaceOnScreen())); 157 157 … … 159 159 /* If the user change the screen, we have to decide again if the 160 160 * presentation mode should be changed. */ 161 connect(m_pScreenLayout, SIGNAL(s creenLayoutChanged()),161 connect(m_pScreenLayout, SIGNAL(sigScreenLayoutChanged()), 162 162 this, SLOT(sltScreenLayoutChanged())); 163 163 /* Note: Presentation mode has to be set *after* the windows are created. */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineLogicSeamless.cpp
r44825 r44828 108 108 /* Add the view menu: */ 109 109 QMenu *pMenu = gActionPool->action(UIActionIndexRuntime_Menu_View)->menu(); 110 m_pScreenLayout-> initialize(pMenu);110 m_pScreenLayout->setViewMenu(pMenu); 111 111 pMenu->setVisible(true); 112 112 } … … 133 133 /* Connect screen-layout change handler: */ 134 134 for (int i = 0; i < machineWindows().size(); ++i) 135 connect(m_pScreenLayout, SIGNAL(s creenLayoutChanged()),135 connect(m_pScreenLayout, SIGNAL(sigScreenLayoutChanged()), 136 136 static_cast<UIMachineWindowSeamless*>(machineWindows()[i]), SLOT(sltPlaceOnScreen())); 137 137
Note:
See TracChangeset
for help on using the changeset viewer.