Changeset 59380 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Jan 18, 2016 5:04:54 PM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 105073
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
r59379 r59380 171 171 } 172 172 173 /* Load machine-view settings: */ 174 pMachineView->loadMachineViewSettings(); 175 176 /* Prepare viewport: */ 177 pMachineView->prepareViewport(); 178 179 /* Prepare frame-buffer: */ 180 pMachineView->prepareFrameBuffer(); 181 173 182 /* Prepare common things: */ 174 183 pMachineView->prepareCommon(); … … 205 214 if (!pMachineView) 206 215 return; 216 217 /* Cleanup frame-buffer: */ 218 pMachineView->cleanupFrameBuffer(); 207 219 208 220 #ifdef VBOX_WITH_DRAG_AND_DROP … … 611 623 #endif 612 624 { 613 /* Load machine view settings: */ 614 loadMachineViewSettings(); 615 616 /* Prepare viewport: */ 617 prepareViewport(); 618 619 /* Prepare frame buffer: */ 620 prepareFrameBuffer(); 621 } 622 623 UIMachineView::~UIMachineView() 624 { 625 } 626 627 void UIMachineView::loadMachineViewSettings() 628 { 629 /* Global settings: */ 630 { 631 /* Remember the maximum guest size policy for telling the guest about 632 * video modes we like: */ 633 QString maxGuestSize = vboxGlobal().settings().publicProperty("GUI/MaxGuestResolution"); 634 if ((maxGuestSize == QString::null) || (maxGuestSize == "auto")) 635 m_maxGuestSizePolicy = MaxGuestSizePolicy_Automatic; 636 else if (maxGuestSize == "any") 637 m_maxGuestSizePolicy = MaxGuestSizePolicy_Any; 638 else /** @todo Mea culpa, but what about error checking? */ 639 { 640 int width = maxGuestSize.section(',', 0, 0).toInt(); 641 int height = maxGuestSize.section(',', 1, 1).toInt(); 642 m_maxGuestSizePolicy = MaxGuestSizePolicy_Fixed; 643 m_fixedMaxGuestSize = QSize(width, height); 644 } 645 } 625 646 } 626 647 … … 802 823 /* Machine state-change updater: */ 803 824 connect(uisession(), SIGNAL(sigMachineStateChange()), this, SLOT(sltMachineStateChanged())); 804 }805 806 void UIMachineView::loadMachineViewSettings()807 {808 /* Global settings: */809 {810 /* Remember the maximum guest size policy for telling the guest about811 * video modes we like: */812 QString maxGuestSize = vboxGlobal().settings().publicProperty("GUI/MaxGuestResolution");813 if ((maxGuestSize == QString::null) || (maxGuestSize == "auto"))814 m_maxGuestSizePolicy = MaxGuestSizePolicy_Automatic;815 else if (maxGuestSize == "any")816 m_maxGuestSizePolicy = MaxGuestSizePolicy_Any;817 else /** @todo Mea culpa, but what about error checking? */818 {819 int width = maxGuestSize.section(',', 0, 0).toInt();820 int height = maxGuestSize.section(',', 1, 1).toInt();821 m_maxGuestSizePolicy = MaxGuestSizePolicy_Fixed;822 m_fixedMaxGuestSize = QSize(width, height);823 }824 }825 825 } 826 826 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h
r59361 r59380 170 170 ); 171 171 /* Machine-view destructor: */ 172 virtual ~UIMachineView() ;172 virtual ~UIMachineView() {} 173 173 174 174 /* Prepare routines: */ 175 void prepareViewport(); 176 void prepareFrameBuffer(); 175 virtual void loadMachineViewSettings(); 176 virtual void prepareViewport(); 177 virtual void prepareFrameBuffer(); 177 178 virtual void prepareCommon(); 178 179 virtual void prepareFilters(); 179 180 virtual void prepareConnections(); 180 181 virtual void prepareConsoleConnections(); 181 void loadMachineViewSettings();182 182 183 183 /* Cleanup routines: */ 184 //virtual void saveMachineViewSettings() {}185 184 //virtual void cleanupConsoleConnections() {} 185 //virtual void cleanupConnections() {} 186 186 //virtual void cleanupFilters() {} 187 187 //virtual void cleanupCommon() {} 188 188 virtual void cleanupFrameBuffer(); 189 189 //virtual void cleanupViewport(); 190 //virtual void saveMachineViewSettings() {} 190 191 191 192 /** Returns the session UI reference. */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.cpp
r58013 r59380 61 61 } 62 62 63 UIMachineViewFullscreen::~UIMachineViewFullscreen()64 {65 /* Cleanup frame buffer: */66 cleanupFrameBuffer();67 }68 69 63 void UIMachineViewFullscreen::sltAdditionsStateChanged() 70 64 { -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.h
r55401 r59380 36 36 ); 37 37 /* Fullscreen machine-view destructor: */ 38 virtual ~UIMachineViewFullscreen() ;38 virtual ~UIMachineViewFullscreen() {} 39 39 40 40 private slots: -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.cpp
r59379 r59380 54 54 , m_bIsGuestAutoresizeEnabled(actionPool()->action(UIActionIndexRT_M_View_T_GuestAutoresize)->isChecked()) 55 55 { 56 }57 58 UIMachineViewNormal::~UIMachineViewNormal()59 {60 /* Cleanup frame buffer: */61 cleanupFrameBuffer();62 56 } 63 57 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.h
r55939 r59380 36 36 ); 37 37 /* Normal machine-view destructor: */ 38 virtual ~UIMachineViewNormal() ;38 virtual ~UIMachineViewNormal() {} 39 39 40 40 private slots: -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineViewScale.cpp
r59379 r59380 56 56 ) 57 57 { 58 }59 60 UIMachineViewScale::~UIMachineViewScale()61 {62 /* Cleanup frame buffer: */63 cleanupFrameBuffer();64 58 } 65 59 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineViewScale.h
r55939 r59380 36 36 ); 37 37 /* Scale machine-view destructor: */ 38 virtual ~UIMachineViewScale() ;38 virtual ~UIMachineViewScale() {} 39 39 40 40 private slots: -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.cpp
r58013 r59380 67 67 } 68 68 69 UIMachineViewSeamless::~UIMachineViewSeamless()70 {71 /* Cleanup seamless mode: */72 cleanupSeamless();73 74 /* Cleanup frame buffer: */75 cleanupFrameBuffer();76 }77 78 69 void UIMachineViewSeamless::sltAdditionsStateChanged() 79 70 { -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.h
r55401 r59380 36 36 ); 37 37 /* Seamless machine-view destructor: */ 38 virtual ~UIMachineViewSeamless() ;38 virtual ~UIMachineViewSeamless() { cleanupSeamless(); } 39 39 40 40 private slots:
Note:
See TracChangeset
for help on using the changeset viewer.