Changeset 29131 in vbox
- Timestamp:
- May 6, 2010 11:07:40 AM (15 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/wizards/newhd
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newhd/UINewHDWzd.cpp
r28800 r29131 238 238 connect(m_pSizeSlider, SIGNAL(valueChanged(int)), this, SLOT(onSizeSliderValueChanged(int))); 239 239 connect(m_pSizeEditor, SIGNAL(textChanged(const QString &)), this, SLOT(onSizeEditorTextChanged(const QString &))); 240 connect(this, SIGNAL(sigToUpdateSizeEditor(const QString &)), m_pSizeEditor, SLOT(setText(const QString &))); 240 241 } 241 242 … … 296 297 /* Set current fileName */ 297 298 m_strLocation = toFileName(strText); 299 300 /* Notify wizard sub-system about complete status changed: */ 301 emit completeChanged(); 298 302 } 299 303 … … 331 335 void UINewHDWzdPage3::onSizeSliderValueChanged(int iValue) 332 336 { 337 /* Update currently stored size: */ 333 338 m_uCurrentSize = sliderToSizeMB(iValue, m_iSliderScale); 334 m_pSizeEditor->setText(vboxGlobal().formatSize(m_uCurrentSize * _1M));339 /* Update tooltip: */ 335 340 updateSizeToolTip(m_uCurrentSize * _1M); 341 /* Notify size-editor about size is changed: */ 342 emit sigToUpdateSizeEditor(vboxGlobal().formatSize(m_uCurrentSize * _1M)); 343 /* Notify wizard sub-system about complete status changed: */ 344 emit completeChanged(); 336 345 } 337 346 338 347 void UINewHDWzdPage3::onSizeEditorTextChanged(const QString &strValue) 339 348 { 340 updateSizeToolTip(vboxGlobal().parseSize(strValue));349 /* Update currently stored size: */ 341 350 m_uCurrentSize = vboxGlobal().parseSize(strValue) / _1M; 351 /* Update tooltip: */ 352 updateSizeToolTip(m_uCurrentSize * _1M); 353 /* Notify size-slider about size is changed but prevent callback: */ 354 blockSignals(true); 342 355 m_pSizeSlider->setValue(sizeMBToSlider(m_uCurrentSize, m_iSliderScale)); 356 blockSignals(false); 343 357 } 344 358 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newhd/UINewHDWzd.h
r28800 r29131 109 109 UINewHDWzdPage3(); 110 110 111 signals: 112 113 void sigToUpdateSizeEditor(const QString &strNewSize); 114 111 115 protected: 112 116
Note:
See TracChangeset
for help on using the changeset viewer.