Changeset 27413 in vbox for trunk/src/VBox
- Timestamp:
- Mar 16, 2010 3:23:16 PM (15 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIAdvancedSlider.cpp
r26712 r27413 222 222 m_pSlider->m_minOpt = min; 223 223 m_pSlider->m_maxOpt = max; 224 225 update(); 224 226 } 225 227 … … 228 230 m_pSlider->m_minWrn = min; 229 231 m_pSlider->m_maxWrn = max; 232 233 update(); 230 234 } 231 235 … … 234 238 m_pSlider->m_minErr = min; 235 239 m_pSlider->m_maxErr = max; 240 241 update(); 236 242 } 237 243 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/vm/VBoxVMSettingsDisplay.cpp
r27411 r27413 54 54 /* Setup constants */ 55 55 CSystemProperties sys = vboxGlobal().virtualBox().GetSystemProperties(); 56 const uint MinVRAM = sys.GetMinGuestVRAM();57 const uint MaxVRAM = sys.GetMaxGuestVRAM();56 m_minVRAM = sys.GetMinGuestVRAM(); 57 m_maxVRAM = sys.GetMaxGuestVRAM(); 58 58 const uint MinMonitors = 1; 59 59 const uint MaxMonitors = sys.GetMaxGuestMonitors(); 60 60 61 61 /* Setup validators */ 62 mLeMemory->setValidator (new QIntValidator ( MinVRAM, MaxVRAM, this));62 mLeMemory->setValidator (new QIntValidator (m_minVRAM, m_maxVRAM, this)); 63 63 mLeMonitors->setValidator (new QIntValidator (MinMonitors, MaxMonitors, this)); 64 64 mLeVRDPPort->setValidator (new QRegExpValidator (QRegExp ("(([0-9]{1,5}(\\-[0-9]{1,5}){0,1}),)*([0-9]{1,5}(\\-[0-9]{1,5}){0,1})"), this)); … … 72 72 73 73 /* Setup initial values */ 74 mSlMemory->setPageStep (calcPageStep ( MaxVRAM));74 mSlMemory->setPageStep (calcPageStep (m_maxVRAM)); 75 75 mSlMemory->setSingleStep (mSlMemory->pageStep() / 4); 76 76 mSlMemory->setTickInterval (mSlMemory->pageStep()); … … 79 79 mSlMonitors->setTickInterval (1); 80 80 /* Setup the scale so that ticks are at page step boundaries */ 81 mSlMemory->setMinimum (( MinVRAM / mSlMemory->pageStep()) * mSlMemory->pageStep());82 mSlMemory->setMaximum ( MaxVRAM);81 mSlMemory->setMinimum ((m_minVRAM / mSlMemory->pageStep()) * mSlMemory->pageStep()); 82 mSlMemory->setMaximum (m_maxVRAM); 83 83 mSlMemory->setSnappingEnabled (true); 84 84 quint64 needMBytes = VBoxGlobal::requiredVideoMemory (&mMachine) / _1M; 85 85 mSlMemory->setErrorHint (0, 1); 86 86 mSlMemory->setWarningHint (1, needMBytes); 87 mSlMemory->setOptimalHint (needMBytes, MaxVRAM);87 mSlMemory->setOptimalHint (needMBytes, m_maxVRAM); 88 88 mSlMonitors->setMinimum (MinMonitors); 89 89 mSlMonitors->setMaximum (MaxMonitors); … … 310 310 #endif /* VBOX_WITH_VIDEOHWACCEL */ 311 311 mCb3D->setEnabled(cVal == 1 && vboxGlobal().virtualBox().GetHost().GetAcceleration3DAvailable()); 312 } 313 312 313 /* The memory requirements have changed too. */ 314 quint64 needMBytes = VBoxGlobal::requiredVideoMemory (&mMachine, cVal) / _1M; 315 mSlMemory->setWarningHint (1, needMBytes); 316 mSlMemory->setOptimalHint (needMBytes, m_maxVRAM); 317 } 318 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/vm/VBoxVMSettingsDisplay.h
r27406 r27413 66 66 CMachine mMachine; 67 67 QIWidgetValidator *mValidator; 68 69 int m_minVRAM; 70 int m_maxVRAM; 68 71 }; 69 72
Note:
See TracChangeset
for help on using the changeset viewer.