VirtualBox

Changeset 29131 in vbox


Ignore:
Timestamp:
May 6, 2010 11:07:40 AM (15 years ago)
Author:
vboxsync
Message:

FE/Qt: 4896: New Hard Disk wizard size-editor now will NOT resets own value in case of its invalid allowing user to edit it (value still stricted by reg-exp). New Hard Disk wizard location-editor now will NOT allows to enter empty location.

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  
    238238    connect(m_pSizeSlider, SIGNAL(valueChanged(int)), this, SLOT(onSizeSliderValueChanged(int)));
    239239    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 &)));
    240241}
    241242
     
    296297    /* Set current fileName */
    297298    m_strLocation = toFileName(strText);
     299
     300    /* Notify wizard sub-system about complete status changed: */
     301    emit completeChanged();
    298302}
    299303
     
    331335void UINewHDWzdPage3::onSizeSliderValueChanged(int iValue)
    332336{
     337    /* Update currently stored size: */
    333338    m_uCurrentSize = sliderToSizeMB(iValue, m_iSliderScale);
    334     m_pSizeEditor->setText(vboxGlobal().formatSize(m_uCurrentSize * _1M));
     339    /* Update tooltip: */
    335340    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();
    336345}
    337346
    338347void UINewHDWzdPage3::onSizeEditorTextChanged(const QString &strValue)
    339348{
    340     updateSizeToolTip(vboxGlobal().parseSize(strValue));
     349    /* Update currently stored size: */
    341350    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);
    342355    m_pSizeSlider->setValue(sizeMBToSlider(m_uCurrentSize, m_iSliderScale));
     356    blockSignals(false);
    343357}
    344358
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newhd/UINewHDWzd.h

    r28800 r29131  
    109109    UINewHDWzdPage3();
    110110
     111signals:
     112
     113    void sigToUpdateSizeEditor(const QString &strNewSize);
     114
    111115protected:
    112116
Note: See TracChangeset for help on using the changeset viewer.

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