VirtualBox

Changeset 94395 in vbox


Ignore:
Timestamp:
Mar 29, 2022 4:29:26 PM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
150711
Message:

FE/Qt/Ds: bugref:6899: Large properties/settings editors cleanup; Lots of excessive code removed and some coding-style fixes.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors
Files:
47 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIAudioControllerEditor.cpp

    r94039 r94395  
    4242void UIAudioControllerEditor::setValue(KAudioControllerType enmValue)
    4343{
    44     if (m_pCombo)
     44    /* Update cached value and
     45     * combo if value has changed: */
     46    if (m_enmValue != enmValue)
    4547    {
    46         /* Update cached value and
    47          * combo if value has changed: */
    48         if (m_enmValue != enmValue)
    49         {
    50             m_enmValue = enmValue;
    51             populateCombo();
    52         }
    53 
    54         /* Look for proper index to choose: */
    55         int iIndex = m_pCombo->findData(QVariant::fromValue(m_enmValue));
    56         if (iIndex != -1)
    57             m_pCombo->setCurrentIndex(iIndex);
     48        m_enmValue = enmValue;
     49        populateCombo();
    5850    }
    5951}
     
    6658int UIAudioControllerEditor::minimumLabelHorizontalHint() const
    6759{
    68     return m_pLabel->minimumSizeHint().width();
     60    return m_pLabel ? m_pLabel->minimumSizeHint().width() : 0;
    6961}
    7062
     
    8981                                "VirtualBox will provide different audio hardware to the virtual machine."));
    9082    }
    91 }
    92 
    93 void UIAudioControllerEditor::sltHandleCurrentIndexChanged()
    94 {
    95     if (m_pCombo)
    96         emit sigValueChanged(m_pCombo->itemData(m_pCombo->currentIndex()).value<KAudioControllerType>());
    9783}
    9884
     
    125111                if (m_pLabel)
    126112                    m_pLabel->setBuddy(m_pCombo);
    127                 connect(m_pCombo, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
    128                         this, &UIAudioControllerEditor::sltHandleCurrentIndexChanged);
    129113                pComboLayout->addWidget(m_pCombo);
    130114            }
     
    165149            m_pCombo->addItem(QString(), QVariant::fromValue(enmType));
    166150
     151        /* Look for proper index to choose: */
     152        const int iIndex = m_pCombo->findData(QVariant::fromValue(m_enmValue));
     153        if (iIndex != -1)
     154            m_pCombo->setCurrentIndex(iIndex);
     155
    167156        /* Retranslate finally: */
    168157        retranslateUi();
  • TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIAudioControllerEditor.h

    r94039 r94395  
    4242    Q_OBJECT;
    4343
    44 signals:
    45 
    46     /** Notifies listeners about @a enmValue change. */
    47     void sigValueChanged(KAudioControllerType enmValue);
    48 
    4944public:
    5045
    51     /** Constructs audio controller editor passing @a pParent to the base-class. */
     46    /** Constructs editor passing @a pParent to the base-class. */
    5247    UIAudioControllerEditor(QWidget *pParent = 0);
    5348
     
    6964    /** Handles translation event. */
    7065    virtual void retranslateUi() RT_OVERRIDE;
    71 
    72 private slots:
    73 
    74     /** Handles current index change. */
    75     void sltHandleCurrentIndexChanged();
    7666
    7767private:
  • TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIAudioHostDriverEditor.cpp

    r94298 r94395  
    4242void UIAudioHostDriverEditor::setValue(KAudioDriverType enmValue)
    4343{
    44     if (m_pCombo)
     44    /* Update cached value and
     45     * combo if value has changed: */
     46    if (m_enmValue != enmValue)
    4547    {
    46         /* Update cached value and
    47          * combo if value has changed: */
    48         if (m_enmValue != enmValue)
    49         {
    50             m_enmValue = enmValue;
    51             populateCombo();
    52         }
    53 
    54         /* Look for proper index to choose: */
    55         int iIndex = m_pCombo->findData(QVariant::fromValue(m_enmValue));
    56         if (iIndex != -1)
    57             m_pCombo->setCurrentIndex(iIndex);
     48        m_enmValue = enmValue;
     49        populateCombo();
    5850    }
    5951}
     
    6658int UIAudioHostDriverEditor::minimumLabelHorizontalHint() const
    6759{
    68     return m_pLabel->minimumSizeHint().width();
     60    return m_pLabel ? m_pLabel->minimumSizeHint().width() : 0;
    6961}
    7062
     
    8981                                "see an audio card, however every access to it will be ignored."));
    9082    }
    91 }
    92 
    93 void UIAudioHostDriverEditor::sltHandleCurrentIndexChanged()
    94 {
    95     if (m_pCombo)
    96         emit sigValueChanged(m_pCombo->itemData(m_pCombo->currentIndex()).value<KAudioDriverType>());
    9783}
    9884
     
    125111                if (m_pLabel)
    126112                    m_pLabel->setBuddy(m_pCombo);
    127                 connect(m_pCombo, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
    128                         this, &UIAudioHostDriverEditor::sltHandleCurrentIndexChanged);
    129113                pComboLayout->addWidget(m_pCombo);
    130114            }
     
    165149            m_pCombo->addItem(QString(), QVariant::fromValue(enmType));
    166150
     151        /* Look for proper index to choose: */
     152        const int iIndex = m_pCombo->findData(QVariant::fromValue(m_enmValue));
     153        if (iIndex != -1)
     154            m_pCombo->setCurrentIndex(iIndex);
     155
    167156        /* Retranslate finally: */
    168157        retranslateUi();
  • TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIAudioHostDriverEditor.h

    r94039 r94395  
    4242    Q_OBJECT;
    4343
    44 signals:
    45 
    46     /** Notifies listeners about @a enmValue change. */
    47     void sigValueChanged(KAudioDriverType enmValue);
    48 
    4944public:
    5045
    51     /** Constructs audio host driver editor passing @a pParent to the base-class. */
     46    /** Constructs editor passing @a pParent to the base-class. */
    5247    UIAudioHostDriverEditor(QWidget *pParent = 0);
    5348
     
    6964    /** Handles translation event. */
    7065    virtual void retranslateUi() RT_OVERRIDE;
    71 
    72 private slots:
    73 
    74     /** Handles current index change. */
    75     void sltHandleCurrentIndexChanged();
    7666
    7767private:
  • TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIAutoCaptureKeyboardEditor.cpp

    r93936 r94395  
    3636void UIAutoCaptureKeyboardEditor::setValue(bool fValue)
    3737{
    38     if (m_pCheckBox)
     38    /* Update cached value and
     39     * check-box if value has changed: */
     40    if (m_fValue != fValue)
    3941    {
    40         /* Update cached value and
    41          * check-box if value has changed: */
    42         if (m_fValue != fValue)
    43         {
    44             m_fValue = fValue;
    45             m_pCheckBox->setCheckState(fValue ? Qt::Checked : Qt::Unchecked);
    46         }
     42        m_fValue = fValue;
     43        if (m_pCheckBox)
     44            m_pCheckBox->setCheckState(m_fValue ? Qt::Checked : Qt::Unchecked);
    4745    }
    4846}
     
    5957    if (m_pCheckBox)
    6058    {
     59        m_pCheckBox->setText(tr("&Auto Capture Keyboard"));
    6160        m_pCheckBox->setToolTip(tr("When checked, the keyboard is automatically captured every time the VM window is "
    6261                                   "activated. When the keyboard is captured, all keystrokes (including system ones like "
    6362                                   "Alt-Tab) are directed to the VM."));
    64         m_pCheckBox->setText(tr("&Auto Capture Keyboard"));
    6563    }
    6664}
     
    6967{
    7068    /* Prepare main layout: */
    71     QGridLayout *pLayoutMain = new QGridLayout(this);
    72     if (pLayoutMain)
     69    QGridLayout *pLayout = new QGridLayout(this);
     70    if (pLayout)
    7371    {
    74         pLayoutMain->setContentsMargins(0, 0, 0, 0);
    75         pLayoutMain->setColumnStretch(1, 1);
     72        pLayout->setContentsMargins(0, 0, 0, 0);
     73        pLayout->setColumnStretch(1, 1);
    7674
    7775        /* Prepare label: */
    7876        m_pLabel = new QLabel(this);
    7977        if (m_pLabel)
    80             pLayoutMain->addWidget(m_pLabel, 0, 0);
     78            pLayout->addWidget(m_pLabel, 0, 0);
    8179        /* Prepare check-box: */
    8280        m_pCheckBox = new QCheckBox(this);
    8381        if (m_pCheckBox)
    84             pLayoutMain->addWidget(m_pCheckBox, 0, 1);
     82            pLayout->addWidget(m_pCheckBox, 0, 1);
    8583    }
    8684
  • TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIAutoCaptureKeyboardEditor.h

    r93990 r94395  
    3636public:
    3737
    38     /** Constructs auto capture keyboard editor passing @a pParent to the base-class. */
     38    /** Constructs editor passing @a pParent to the base-class. */
    3939    UIAutoCaptureKeyboardEditor(QWidget *pParent = 0);
    4040
  • TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIBaseMemoryEditor.cpp

    r93115 r94395  
    6262
    6363    /** Holds the minimum RAM. */
    64     uint m_uMinRAM;
     64    uint  m_uMinRAM;
    6565    /** Holds the maximum optimal RAM. */
    66     uint m_uMaxRAMOpt;
     66    uint  m_uMaxRAMOpt;
    6767    /** Holds the maximum allowed RAM. */
    68     uint m_uMaxRAMAlw;
     68    uint  m_uMaxRAMAlw;
    6969    /** Holds the maximum possible RAM. */
    70     uint m_uMaxRAM;
     70    uint  m_uMaxRAM;
    7171};
    7272
     
    8383  , m_uMaxRAM(0)
    8484{
    85     /* Prepare: */
    8685    prepare();
    8786}
     
    9493  , m_uMaxRAM(0)
    9594{
    96     /* Prepare: */
    9795    prepare();
    9896}
     
    243241    : QIWithRetranslateUI<QWidget>(pParent)
    244242    , m_fWithLabel(fWithLabel)
     243    , m_iValue(0)
    245244    , m_pLabelMemory(0)
    246245    , m_pSlider(0)
     
    254253void UIBaseMemoryEditor::setValue(int iValue)
    255254{
    256     if (m_pSlider)
    257         m_pSlider->setValue(iValue);
     255    /* Update cached value and
     256     * slider if value has changed: */
     257    if (m_iValue != iValue)
     258    {
     259        m_iValue = iValue;
     260        if (m_pSlider)
     261            m_pSlider->setValue(m_iValue);
     262    }
    258263}
    259264
    260265int UIBaseMemoryEditor::value() const
    261266{
    262     return m_pSlider ? m_pSlider->value() : 0;
     267    return m_pSlider ? m_pSlider->value() : m_iValue;
    263268}
    264269
     
    324329{
    325330    /* Create main layout: */
    326     QGridLayout *pMainLayout = new QGridLayout(this);
    327     if (pMainLayout)
    328     {
    329         pMainLayout->setContentsMargins(0, 0, 0, 0);
     331    QGridLayout *pLayout = new QGridLayout(this);
     332    if (pLayout)
     333    {
     334        pLayout->setContentsMargins(0, 0, 0, 0);
    330335        int iRow = 0;
    331336
     
    334339            m_pLabelMemory = new QLabel(this);
    335340        if (m_pLabelMemory)
    336             pMainLayout->addWidget(m_pLabelMemory, 0, iRow++, 1, 1);
     341            pLayout->addWidget(m_pLabelMemory, 0, iRow++, 1, 1);
    337342
    338343        /* Create slider layout: */
     
    376381
    377382            /* Add slider layout to main layout: */
    378             pMainLayout->addLayout(pSliderLayout, 0, iRow++, 2, 1);
     383            pLayout->addLayout(pSliderLayout, 0, iRow++, 2, 1);
    379384        }
    380385
     
    390395            connect(m_pSpinBox, static_cast<void(QSpinBox::*)(int)>(&QSpinBox::valueChanged),
    391396                    this, &UIBaseMemoryEditor::sltHandleSpinBoxChange);
    392             pMainLayout->addWidget(m_pSpinBox, 0, iRow++, 1, 1);
     397            pLayout->addWidget(m_pSpinBox, 0, iRow++, 1, 1);
    393398        }
    394399    }
  • TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIBaseMemoryEditor.h

    r93990 r94395  
    4343    /** Notifies listeners about value has became @a fValid. */
    4444    void sigValidChanged(bool fValid);
     45    /** Notifies listeners about @a iValue has changed. */
    4546    void sigValueChanged(int iValue);
    4647
    4748public:
    4849
    49     /** Constructs base-memory editor passing @a pParent to the base-class.
     50    /** Constructs editor passing @a pParent to the base-class.
    5051      * @param  fWithLabel  Brings whether we should add label ourselves. */
    5152    UIBaseMemoryEditor(QWidget *pParent = 0, bool fWithLabel = false);
     
    8485    bool  m_fWithLabel;
    8586
    86     /** Holds the memory label instance. */
    87     QLabel             *m_pLabelMemory;
    88     /** Holds the memory slider instance. */
    89     UIBaseMemorySlider *m_pSlider;
    90     /** Holds minimum memory label instance. */
    91     QLabel             *m_pLabelMemoryMin;
    92     /** Holds maximum memory label instance. */
    93     QLabel             *m_pLabelMemoryMax;
    94     /** Holds the memory spin-box instance. */
    95     QSpinBox           *m_pSpinBox;
     87    /** Holds the value to be selected. */
     88    int  m_iValue;
     89
     90    /** @name Widgets
     91     * @{ */
     92        /** Holds the memory label instance. */
     93        QLabel             *m_pLabelMemory;
     94        /** Holds the memory slider instance. */
     95        UIBaseMemorySlider *m_pSlider;
     96        /** Holds minimum memory label instance. */
     97        QLabel             *m_pLabelMemoryMin;
     98        /** Holds maximum memory label instance. */
     99        QLabel             *m_pLabelMemoryMax;
     100        /** Holds the memory spin-box instance. */
     101        QSpinBox           *m_pSpinBox;
     102    /** @} */
    96103};
    97104
  • TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIBootOrderEditor.cpp

    r93996 r94395  
    486486{
    487487    /* Create main layout: */
    488     QGridLayout *pMainLayout = new QGridLayout(this);
    489     if (pMainLayout)
    490     {
    491         pMainLayout->setContentsMargins(0, 0, 0, 0);
     488    QGridLayout *pLayout = new QGridLayout(this);
     489    if (pLayout)
     490    {
     491        pLayout->setContentsMargins(0, 0, 0, 0);
    492492        int iRow = 0;
    493493
     
    496496            m_pLabel = new QLabel(this);
    497497        if (m_pLabel)
    498             pMainLayout->addWidget(m_pLabel, 0, iRow++, 1, 1);
     498            pLayout->addWidget(m_pLabel, 0, iRow++, 1, 1);
    499499
    500500        /* Create table layout: */
     
    541541
    542542            /* Add table layout to main layout: */
    543             pMainLayout->addLayout(pTableLayout, 0, iRow++, 3, 1);
     543            pLayout->addLayout(pTableLayout, 0, iRow++, 3, 1);
    544544        }
    545545    }
  • TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIBootOrderEditor.h

    r93990 r94395  
    4242struct UIBootItemData
    4343{
    44     /** Constructs boot item data. */
     44    /** Constructs item data. */
    4545    UIBootItemData()
    4646        : m_enmType(KDeviceType_Null)
     
    5757    }
    5858
    59     /** Holds the boot device type. */
     59    /** Holds the device type. */
    6060    KDeviceType  m_enmType;
    61     /** Holds whether the boot device enabled. */
     61    /** Holds whether the device enabled. */
    6262    bool         m_fEnabled;
    6363};
     
    6969namespace UIBootDataTools
    7070{
    71     /** Loads boot item list for passed @a comMachine. */
     71    /** Loads item list for passed @a comMachine. */
    7272    SHARED_LIBRARY_STUFF UIBootItemDataList loadBootItems(const CMachine &comMachine);
    7373    /** Saves @a bootItems list to passed @a comMachine. */
     
    9292public:
    9393
    94     /** Constructs boot order editor passing @a pParent to the base-class.
     94    /** Constructs editor passing @a pParent to the base-class.
    9595      * @param  fWithLabel  Brings whether we should add label ourselves. */
    9696    UIBootOrderEditor(QWidget *pParent = 0, bool fWithLabel = false);
     
    111111private slots:
    112112
    113     /** Handles current boot item change. */
     113    /** Handles current item change. */
    114114    void sltHandleCurrentBootItemChange();
    115115
  • TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIColorThemeEditor.cpp

    r94145 r94395  
    3838void UIColorThemeEditor::setValue(UIColorThemeType enmValue)
    3939{
    40     if (m_pCombo)
     40    /* Update cached value and
     41     * combo if value has changed: */
     42    if (m_enmValue != enmValue)
    4143    {
    42         /* Update cached value and
    43          * combo if value has changed: */
    44         if (m_enmValue != enmValue)
    45         {
    46             m_enmValue = enmValue;
    47             populateCombo();
    48         }
    49 
    50         /* Look for proper index to choose: */
    51         int iIndex = m_pCombo->findData(QVariant::fromValue(m_enmValue));
    52         if (iIndex != -1)
    53             m_pCombo->setCurrentIndex(iIndex);
     44        m_enmValue = enmValue;
     45        populateCombo();
    5446    }
    5547}
     
    7567}
    7668
    77 void UIColorThemeEditor::sltHandleCurrentIndexChanged()
    78 {
    79     if (m_pCombo)
    80         emit sigValueChanged(m_pCombo->itemData(m_pCombo->currentIndex()).value<UIColorThemeType>());
    81 }
    82 
    8369void UIColorThemeEditor::prepare()
    8470{
    8571    /* Create main layout: */
    86     QGridLayout *pMainLayout = new QGridLayout(this);
    87     if (pMainLayout)
     72    QGridLayout *pLayout = new QGridLayout(this);
     73    if (pLayout)
    8874    {
    89         pMainLayout->setContentsMargins(0, 0, 0, 0);
     75        pLayout->setContentsMargins(0, 0, 0, 0);
    9076
    9177        /* Create label: */
    9278        m_pLabel = new QLabel(this);
    9379        if (m_pLabel)
    94             pMainLayout->addWidget(m_pLabel, 0, 0);
     80            pLayout->addWidget(m_pLabel, 0, 0);
    9581
    9682        /* Create combo layout: */
     
    10692                if (m_pLabel)
    10793                    m_pLabel->setBuddy(m_pCombo);
    108                 connect(m_pCombo, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
    109                         this, &UIColorThemeEditor::sltHandleCurrentIndexChanged);
    11094                pComboLayout->addWidget(m_pCombo);
    11195            }
     
    11599
    116100            /* Add combo-layout into main-layout: */
    117             pMainLayout->addLayout(pComboLayout, 0, 1);
     101            pLayout->addLayout(pComboLayout, 0, 1);
    118102        }
    119103    }
     
    143127            m_pCombo->addItem(QString(), QVariant::fromValue(enmType));
    144128
     129        /* Look for proper index to choose: */
     130        const int iIndex = m_pCombo->findData(QVariant::fromValue(m_enmValue));
     131        if (iIndex != -1)
     132            m_pCombo->setCurrentIndex(iIndex);
     133
    145134        /* Retranslate finally: */
    146135        retranslateUi();
  • TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIColorThemeEditor.h

    r94145 r94395  
    3939    Q_OBJECT;
    4040
    41 signals:
    42 
    43     /** Notifies listeners about @a enmValue change. */
    44     void sigValueChanged(UIColorThemeType enmValue);
    45 
    4641public:
    4742
    48     /** Constructs color theme editor passing @a pParent to the base-class. */
     43    /** Constructs editor passing @a pParent to the base-class. */
    4944    UIColorThemeEditor(QWidget *pParent = 0);
    5045
     
    5954    virtual void retranslateUi() RT_OVERRIDE;
    6055
    61 private slots:
    62 
    63     /** Handles current index change. */
    64     void sltHandleCurrentIndexChanged();
    65 
    6656private:
    6757
     
    7060    /** Populates combo. */
    7161    void populateCombo();
    72 
    73     /** Holds whether descriptive label should be created. */
    74     bool  m_fWithLabel;
    7562
    7663    /** Holds the value to be selected. */
  • TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIDefaultMachineFolderEditor.cpp

    r93935 r94395  
    3838void UIDefaultMachineFolderEditor::setValue(const QString &strValue)
    3939{
    40     if (m_pSelector)
     40    /* Update cached value and editor
     41     * if value has changed: */
     42    if (m_strValue != strValue)
    4143    {
    42         /* Update cached value and editor
    43          * if value has changed: */
    44         if (m_strValue != strValue)
    45         {
    46             m_strValue = strValue;
    47             m_pSelector->setPath(strValue);
    48         }
     44        m_strValue = strValue;
     45        if (m_pSelector)
     46            m_pSelector->setPath(m_strValue);
    4947    }
    5048}
     
    5755int UIDefaultMachineFolderEditor::minimumLabelHorizontalHint() const
    5856{
    59     return m_pLabel->minimumSizeHint().width();
     57    return m_pLabel ? m_pLabel->minimumSizeHint().width() : 0;
    6058}
    6159
     
    7371        m_pSelector->setToolTip(tr("Holds the path to the default virtual machine folder. This folder is used, "
    7472                                   "if not explicitly specified otherwise, when creating new virtual machines."));
    75 }
    76 
    77 void UIDefaultMachineFolderEditor::sltHandleSelectorPathChanged()
    78 {
    79     if (m_pSelector)
    80         emit sigValueChanged(m_pSelector->path());
    8173}
    8274
     
    10597                m_pLabel->setBuddy(m_pSelector);
    10698            m_pSelector->setInitialPath(uiCommon().homeFolder());
    107             connect(m_pSelector, &UIFilePathSelector::pathChanged,
    108                     this, &UIDefaultMachineFolderEditor::sltHandleSelectorPathChanged);
    10999
    110100            m_pLayout->addWidget(m_pSelector, 0, 1);
  • TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIDefaultMachineFolderEditor.h

    r93990 r94395  
    3939    Q_OBJECT;
    4040
    41 signals:
    42 
    43     /** Notifies listeners about @a enmValue change. */
    44     void sigValueChanged(const QString &strValue);
    45 
    4641public:
    4742
     
    6459    virtual void retranslateUi() RT_OVERRIDE;
    6560
    66 private slots:
    67 
    68     /** Handles selector path change. */
    69     void sltHandleSelectorPathChanged();
    70 
    7161private:
    7262
  • TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIGlobalDisplayFeaturesEditor.cpp

    r94248 r94395  
    4141void UIGlobalDisplayFeaturesEditor::setActivateOnMouseHover(bool fOn)
    4242{
    43     if (m_pCheckBoxActivateOnMouseHover)
     43    /* Update cached value and
     44     * check-box if value has changed: */
     45    if (m_fActivateOnMouseHover != fOn)
    4446    {
    45         /* Update cached value and
    46          * check-box if value has changed: */
    47         if (m_fActivateOnMouseHover != fOn)
    48         {
    49             m_fActivateOnMouseHover = fOn;
    50             m_pCheckBoxActivateOnMouseHover->setCheckState(fOn ? Qt::Checked : Qt::Unchecked);
    51         }
     47        m_fActivateOnMouseHover = fOn;
     48        if (m_pCheckBoxActivateOnMouseHover)
     49            m_pCheckBoxActivateOnMouseHover->setCheckState(m_fActivateOnMouseHover ? Qt::Checked : Qt::Unchecked);
    5250    }
    5351}
     
    6260void UIGlobalDisplayFeaturesEditor::setDisableHostScreenSaver(bool fOn)
    6361{
    64     if (m_pCheckBoxDisableHostScreenSaver)
     62    /* Update cached value and
     63     * check-box if value has changed: */
     64    if (m_fDisableHostScreenSaver != fOn)
    6565    {
    66         /* Update cached value and
    67          * check-box if value has changed: */
    68         if (m_fDisableHostScreenSaver != fOn)
    69         {
    70             m_fDisableHostScreenSaver = fOn;
    71             m_pCheckBoxDisableHostScreenSaver->setCheckState(fOn ? Qt::Checked : Qt::Unchecked);
    72         }
     66        m_fDisableHostScreenSaver = fOn;
     67        if (m_pCheckBoxDisableHostScreenSaver)
     68            m_pCheckBoxDisableHostScreenSaver->setCheckState(m_fDisableHostScreenSaver ? Qt::Checked : Qt::Unchecked);
    7369    }
    7470}
     
    8379int UIGlobalDisplayFeaturesEditor::minimumLabelHorizontalHint() const
    8480{
    85     return m_pLabel->minimumSizeHint().width();
     81    return m_pLabel ? m_pLabel->minimumSizeHint().width() : 0;
    8682}
    8783
     
    9692    if (m_pLabel)
    9793        m_pLabel->setText(tr("Extended Features:"));
     94
    9895    if (m_pCheckBoxActivateOnMouseHover)
    9996    {
     97        m_pCheckBoxActivateOnMouseHover->setText(tr("&Raise Window Under Mouse Pointer"));
    10098        m_pCheckBoxActivateOnMouseHover->setToolTip(tr("When checked, machine windows will be raised "
    10199                                                       "when the mouse pointer moves over them."));
    102         m_pCheckBoxActivateOnMouseHover->setText(tr("&Raise Window Under Mouse Pointer"));
    103100    }
     101
    104102    if (m_pCheckBoxDisableHostScreenSaver)
    105103    {
     104        m_pCheckBoxDisableHostScreenSaver->setText(tr("&Disable Host Screen Saver"));
    106105        m_pCheckBoxDisableHostScreenSaver->setToolTip(tr("When checked, screen saver of "
    107106                                                         "the host OS is disabled."));
    108         m_pCheckBoxDisableHostScreenSaver->setText(tr("&Disable Host Screen Saver"));
    109107    }
    110108}
  • TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIGlobalDisplayFeaturesEditor.h

    r94248 r94395  
    3737public:
    3838
    39     /** Constructs global display features editor passing @a pParent to the base-class. */
     39    /** Constructs editor passing @a pParent to the base-class. */
    4040    UIGlobalDisplayFeaturesEditor(QWidget *pParent = 0);
    4141
     
    6565    void prepare();
    6666
    67     /** Holds the 'activate on mouse hover' feature value. */
    68     bool  m_fActivateOnMouseHover;
    69     /** Holds the 'disable host screen-saver' feature value. */
    70     bool  m_fDisableHostScreenSaver;
     67    /** @name Values
     68     * @{ */
     69        /** Holds the 'activate on mouse hover' feature value. */
     70        bool  m_fActivateOnMouseHover;
     71        /** Holds the 'disable host screen-saver' feature value. */
     72        bool  m_fDisableHostScreenSaver;
     73    /** @} */
    7174
    72     /** Holds the main layout instance. */
    73     QGridLayout *m_pLayout;
    74     /** Holds the label instance. */
    75     QLabel      *m_pLabel;
    76     /** Holds the check-box instance. */
    77     QCheckBox   *m_pCheckBoxActivateOnMouseHover;
    78     /** Holds the check-box instance. */
    79     QCheckBox   *m_pCheckBoxDisableHostScreenSaver;
     75    /** @name Widgets
     76     * @{ */
     77        /** Holds the main layout instance. */
     78        QGridLayout *m_pLayout;
     79        /** Holds the label instance. */
     80        QLabel      *m_pLabel;
     81        /** Holds the check-box instance. */
     82        QCheckBox   *m_pCheckBoxActivateOnMouseHover;
     83        /** Holds the check-box instance. */
     84        QCheckBox   *m_pCheckBoxDisableHostScreenSaver;
     85    /** @} */
    8086};
    8187
  • TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIGlobalProxyFeaturesEditor.cpp

    r94251 r94395  
    105105    if (m_pRadioButtonProxyAuto)
    106106    {
     107        m_pRadioButtonProxyAuto->setText(tr("&Auto-detect Host Proxy Settings"));
    107108        m_pRadioButtonProxyAuto->setToolTip(tr("When chosen, VirtualBox will try to auto-detect host proxy settings for tasks "
    108109                                               "like downloading Guest Additions from the network or checking for updates."));
    109         m_pRadioButtonProxyAuto->setText(tr("&Auto-detect Host Proxy Settings"));
    110110    }
    111111    if (m_pRadioButtonProxyDisabled)
    112112    {
     113        m_pRadioButtonProxyDisabled->setText(tr("&Direct Connection to the Internet"));
    113114        m_pRadioButtonProxyDisabled->setToolTip(tr("When chosen, VirtualBox will use direct Internet connection for tasks like "
    114115                                                   "downloading Guest Additions from the network or checking for updates."));
    115         m_pRadioButtonProxyDisabled->setText(tr("&Direct Connection to the Internet"));
    116116    }
    117117    if (m_pRadioButtonProxyEnabled)
    118118    {
     119        m_pRadioButtonProxyEnabled->setText(tr("&Manual Proxy Configuration"));
    119120        m_pRadioButtonProxyEnabled->setToolTip(tr("When chosen, VirtualBox will use the proxy settings supplied for tasks like "
    120121                                                  "downloading Guest Additions from the network or checking for updates."));
    121         m_pRadioButtonProxyEnabled->setText(tr("&Manual Proxy Configuration"));
    122122    }
    123123
  • TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIGlobalProxyFeaturesEditor.h

    r94251 r94395  
    4848public:
    4949
    50     /** Constructs global proxy features editor passing @a pParent to the base-class. */
     50    /** Constructs editor passing @a pParent to the base-class. */
    5151    UIGlobalProxyFeaturesEditor(QWidget *pParent = 0);
    5252
     
    7676    void prepare();
    7777
    78     /** Holds the proxy mode. */
    79     KProxyMode  m_enmProxyMode;
    80     /** Holds the proxy host. */
    81     QString     m_strProxyHost;
     78    /** @name Values
     79     * @{ */
     80        /** Holds the proxy mode. */
     81        KProxyMode  m_enmProxyMode;
     82        /** Holds the proxy host. */
     83        QString     m_strProxyHost;
     84    /** @} */
    8285
    83     /** Holds the button-group instance. */
    84     QButtonGroup *m_pButtonGroup;
    85     /** Holds the 'proxy auto' radio-button instance. */
    86     QRadioButton *m_pRadioButtonProxyAuto;
    87     /** Holds the 'proxy disabled' radio-button instance. */
    88     QRadioButton *m_pRadioButtonProxyDisabled;
    89     /** Holds the 'proxy enabled' radio-button instance. */
    90     QRadioButton *m_pRadioButtonProxyEnabled;
    91     /** Holds the settings widget instance. */
    92     QWidget      *m_pWidgetSettings;
    93     /** Holds the host label instance. */
    94     QLabel       *m_pLabelHost;
    95     /** Holds the host editor instance. */
    96     QILineEdit   *m_pEditorHost;
     86    /** @name Widgets
     87     * @{ */
     88        /** Holds the button-group instance. */
     89        QButtonGroup *m_pButtonGroup;
     90        /** Holds the 'proxy auto' radio-button instance. */
     91        QRadioButton *m_pRadioButtonProxyAuto;
     92        /** Holds the 'proxy disabled' radio-button instance. */
     93        QRadioButton *m_pRadioButtonProxyDisabled;
     94        /** Holds the 'proxy enabled' radio-button instance. */
     95        QRadioButton *m_pRadioButtonProxyEnabled;
     96        /** Holds the settings widget instance. */
     97        QWidget      *m_pWidgetSettings;
     98        /** Holds the host label instance. */
     99        QLabel       *m_pLabelHost;
     100        /** Holds the host editor instance. */
     101        QILineEdit   *m_pEditorHost;
     102    /** @} */
    97103};
    98104
  • TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIGraphicsControllerEditor.cpp

    r94358 r94395  
    4343void UIGraphicsControllerEditor::setValue(KGraphicsControllerType enmValue)
    4444{
    45     if (m_pCombo)
     45    /* Update cached value and
     46     * combo if value has changed: */
     47    if (m_enmValue != enmValue)
    4648    {
    47         /* Update cached value and
    48          * combo if value has changed: */
    49         if (m_enmValue != enmValue)
    50         {
    51             m_enmValue = enmValue;
    52             populateCombo();
    53         }
    54 
    55         /* Look for proper index to choose: */
    56         int iIndex = m_pCombo->findData(QVariant::fromValue(m_enmValue));
    57         if (iIndex != -1)
    58             m_pCombo->setCurrentIndex(iIndex);
     49        m_enmValue = enmValue;
     50        populateCombo();
    5951    }
    6052}
     
    6759int UIGraphicsControllerEditor::minimumLabelHorizontalHint() const
    6860{
    69     return m_pLabel->minimumSizeHint().width();
     61    return m_pLabel ? m_pLabel->minimumSizeHint().width() : 0;
    7062}
    7163
     
    166158            m_pCombo->addItem(QString(), QVariant::fromValue(enmType));
    167159
     160        /* Look for proper index to choose: */
     161        const int iIndex = m_pCombo->findData(QVariant::fromValue(m_enmValue));
     162        if (iIndex != -1)
     163            m_pCombo->setCurrentIndex(iIndex);
     164
    168165        /* Retranslate finally: */
    169166        retranslateUi();
  • TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIGraphicsControllerEditor.h

    r94358 r94395  
    4949public:
    5050
    51     /** Constructs graphics controller editor passing @a pParent to the base-class. */
     51    /** Constructs editor passing @a pParent to the base-class. */
    5252    UIGraphicsControllerEditor(QWidget *pParent = 0);
    5353
  • TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIHostComboEditor.h

    r94064 r94395  
    100100public:
    101101
    102     /** Constructs host-combo wrapper on the basis of passed @a strHostCombo. */
     102    /** Constructs wrapper on the basis of passed @a strHostCombo. */
    103103    UIHostComboWrapper(const QString &strHostCombo = QString())
    104104        : m_strHostCombo(strHostCombo)
     
    129129public:
    130130
    131     /** Constructs host-combo editor passing @a pParent to the base-class. */
     131    /** Constructs editor passing @a pParent to the base-class. */
    132132    UIHostComboEditor(QWidget *pParent);
    133133
     
    171171public:
    172172
    173     /** Constructs host-combo editor private part. */
     173    /** Constructs editor private part. */
    174174    UIHostComboEditorPrivate();
    175     /** Destructs host-combo editor private part. */
     175    /** Destructs editor private part. */
    176176    ~UIHostComboEditorPrivate();
    177177
  • TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIHotKeyEditor.h

    r93990 r94395  
    111111public:
    112112
    113     /** Constructs hot-key editor passing @a pParent to the base-class. */
     113    /** Constructs editor passing @a pParent to the base-class. */
    114114    UIHotKeyEditor(QWidget *pParent);
    115115
  • TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UILanguageSettingsEditor.cpp

    r93996 r94395  
    212212void UILanguageSettingsEditor::setValue(const QString &strValue)
    213213{
    214     /* Update value if changed: */
     214    /* Update cached value and
     215     * tree-widget if value has changed: */
    215216    if (m_strValue != strValue)
    216217    {
    217         /* Update value itself: */
    218218        m_strValue = strValue;
    219 
    220         /* Update tree-widget if present: */
    221219        if (m_pTreeWidget)
    222220            reloadLanguageTree(m_strValue);
     
    321319
    322320void UILanguageSettingsEditor::prepare()
    323 {
    324     /* Prepare everything: */
    325     prepareWidgets();
    326     prepareConnections();
    327 
    328     /* Apply language settings: */
    329     retranslateUi();
    330 }
    331 
    332 void UILanguageSettingsEditor::prepareWidgets()
    333321{
    334322    /* Prepare main layout: */
     
    369357        }
    370358    }
    371 }
    372 
    373 void UILanguageSettingsEditor::prepareConnections()
    374 {
     359
     360    /* Prepare connections: */
    375361    connect(m_pTreeWidget, &QITreeWidget::painted, this, &UILanguageSettingsEditor::sltHandleItemPainting);
    376362    connect(m_pTreeWidget, &QITreeWidget::currentItemChanged, this, &UILanguageSettingsEditor::sltHandleCurrentItemChange);
     363
     364    /* Apply language settings: */
     365    retranslateUi();
    377366}
    378367
  • TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UILanguageSettingsEditor.h

    r93990 r94395  
    3838public:
    3939
    40     /** Constructs language settings editor passing @a pParent to the base-class. */
     40    /** Constructs editor passing @a pParent to the base-class. */
    4141    UILanguageSettingsEditor(QWidget *pParent = 0);
    4242
     
    6868    /** Prepares all. */
    6969    void prepare();
    70     /** Prepares widgets. */
    71     void prepareWidgets();
    72     /** Prepares connections. */
    73     void prepareConnections();
    7470    /** Cleanups all. */
    7571    void cleanup();
  • TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIMachineAudioFeaturesEditor.cpp

    r94298 r94395  
    4141void UIMachineAudioFeaturesEditor::setEnableOutput(bool fOn)
    4242{
    43     if (m_pCheckBoxEnableOutput)
     43    /* Update cached value and
     44     * check-box if value has changed: */
     45    if (m_fEnableOutput != fOn)
    4446    {
    45         /* Update cached value and
    46          * check-box if value has changed: */
    47         if (m_fEnableOutput != fOn)
    48         {
    49             m_fEnableOutput = fOn;
    50             m_pCheckBoxEnableOutput->setCheckState(fOn ? Qt::Checked : Qt::Unchecked);
    51         }
     47        m_fEnableOutput = fOn;
     48        if (m_pCheckBoxEnableOutput)
     49            m_pCheckBoxEnableOutput->setCheckState(m_fEnableOutput ? Qt::Checked : Qt::Unchecked);
    5250    }
    5351}
     
    6260void UIMachineAudioFeaturesEditor::setEnableInput(bool fOn)
    6361{
    64     if (m_pCheckBoxEnableInput)
     62    /* Update cached value and
     63     * check-box if value has changed: */
     64    if (m_fEnableInput != fOn)
    6565    {
    66         /* Update cached value and
    67          * check-box if value has changed: */
    68         if (m_fEnableInput != fOn)
    69         {
    70             m_fEnableInput = fOn;
    71             m_pCheckBoxEnableInput->setCheckState(fOn ? Qt::Checked : Qt::Unchecked);
    72         }
     66        m_fEnableInput = fOn;
     67        if (m_pCheckBoxEnableInput)
     68            m_pCheckBoxEnableInput->setCheckState(m_fEnableInput ? Qt::Checked : Qt::Unchecked);
    7369    }
    7470}
     
    8379int UIMachineAudioFeaturesEditor::minimumLabelHorizontalHint() const
    8480{
    85     return m_pLabel->minimumSizeHint().width();
     81    return m_pLabel ? m_pLabel->minimumSizeHint().width() : 0;
    8682}
    8783
  • TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIMachineAudioFeaturesEditor.h

    r94298 r94395  
    3737public:
    3838
    39     /** Constructs machine audio features editor passing @a pParent to the base-class. */
     39    /** Constructs editor passing @a pParent to the base-class. */
    4040    UIMachineAudioFeaturesEditor(QWidget *pParent = 0);
    4141
     
    6565    void prepare();
    6666
    67     /** Holds the 'enable output' feature value. */
    68     bool  m_fEnableOutput;
    69     /** Holds the 'enable input' feature value. */
    70     bool  m_fEnableInput;
     67    /** @name Values
     68     * @{ */
     69        /** Holds the 'enable output' feature value. */
     70        bool  m_fEnableOutput;
     71        /** Holds the 'enable input' feature value. */
     72        bool  m_fEnableInput;
     73    /** @} */
    7174
    72     /** Holds the main layout instance. */
    73     QGridLayout *m_pLayout;
    74     /** Holds the label instance. */
    75     QLabel      *m_pLabel;
    76     /** Holds the 'enable output' check-box instance. */
    77     QCheckBox   *m_pCheckBoxEnableOutput;
    78     /** Holds the 'enable input' check-box instance. */
    79     QCheckBox   *m_pCheckBoxEnableInput;
     75    /** @name Widgets
     76     * @{ */
     77        /** Holds the main layout instance. */
     78        QGridLayout *m_pLayout;
     79        /** Holds the label instance. */
     80        QLabel      *m_pLabel;
     81        /** Holds the 'enable output' check-box instance. */
     82        QCheckBox   *m_pCheckBoxEnableOutput;
     83        /** Holds the 'enable input' check-box instance. */
     84        QCheckBox   *m_pCheckBoxEnableInput;
     85    /** @} */
    8086};
    8187
  • TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIMachineDisplayScreenFeaturesEditor.cpp

    r94361 r94395  
    4343        {
    4444            m_fEnable3DAcceleration = fOn;
    45             m_pCheckBoxEnable3DAcceleration->setCheckState(fOn ? Qt::Checked : Qt::Unchecked);
     45            m_pCheckBoxEnable3DAcceleration->setCheckState(m_fEnable3DAcceleration ? Qt::Checked : Qt::Unchecked);
    4646        }
    4747    }
     
    5757int UIMachineDisplayScreenFeaturesEditor::minimumLabelHorizontalHint() const
    5858{
    59     return m_pLabel->minimumSizeHint().width();
     59    return m_pLabel ? m_pLabel->minimumSizeHint().width() : 0;
    6060}
    6161
  • TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIMachineDisplayScreenFeaturesEditor.h

    r94361 r94395  
    4242public:
    4343
    44     /** Constructs machine display screen features editor passing @a pParent to the base-class. */
     44    /** Constructs editor passing @a pParent to the base-class. */
    4545    UIMachineDisplayScreenFeaturesEditor(QWidget *pParent = 0);
    4646
     
    6565    void prepare();
    6666
    67     /** Holds the 'enable 3D acceleration' feature value. */
    68     bool  m_fEnable3DAcceleration;
     67    /** @name Values
     68     * @{ */
     69        /** Holds the 'enable 3D acceleration' feature value. */
     70        bool  m_fEnable3DAcceleration;
     71    /** @} */
    6972
    70     /** Holds the main layout instance. */
    71     QGridLayout *m_pLayout;
    72     /** Holds the label instance. */
    73     QLabel      *m_pLabel;
    74     /** Holds the 'enable 3D acceleration' check-box instance. */
    75     QCheckBox   *m_pCheckBoxEnable3DAcceleration;
     73    /** @name Widgets
     74     * @{ */
     75        /** Holds the main layout instance. */
     76        QGridLayout *m_pLayout;
     77        /** Holds the label instance. */
     78        QLabel      *m_pLabel;
     79        /** Holds the 'enable 3D acceleration' check-box instance. */
     80        QCheckBox   *m_pCheckBoxEnable3DAcceleration;
     81    /** @} */
    7682};
    7783
  • TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIMaximumGuestScreenSizeEditor.cpp

    r94289 r94395  
    7575    if (m_pComboPolicy)
    7676    {
    77         const int iIndex = m_pComboPolicy->findData(QVariant::fromValue(guiValue.m_enmPolicy));
     77        const int iIndex = m_pComboPolicy->findData(QVariant::fromValue(m_guiValue.m_enmPolicy));
    7878        if (iIndex != -1)
    7979        {
     
    8585    if (m_pSpinboxMaxWidth && m_pSpinboxMaxHeight)
    8686    {
    87         if (guiValue.m_enmPolicy == MaximumGuestScreenSizePolicy_Fixed)
    88         {
    89             m_pSpinboxMaxWidth->setValue(guiValue.m_size.width());
    90             m_pSpinboxMaxHeight->setValue(guiValue.m_size.height());
     87        if (m_guiValue.m_enmPolicy == MaximumGuestScreenSizePolicy_Fixed)
     88        {
     89            m_pSpinboxMaxWidth->setValue(m_guiValue.m_size.width());
     90            m_pSpinboxMaxHeight->setValue(m_guiValue.m_size.height());
    9191        }
    9292    }
     
    161161        if (m_pSpinboxMaxHeight)
    162162            m_pSpinboxMaxHeight->setEnabled(fComboLevelWidgetsEnabled);
    163 
    164         /* Notify listeners: */
    165         emit sigValueChanged(value());
    166     }
    167 }
    168 
    169 void UIMaximumGuestScreenSizeEditor::sltHandleSizeChanged()
    170 {
    171     if (m_pSpinboxMaxWidth && m_pSpinboxMaxHeight)
    172     {
    173         /* Notify listeners: */
    174         emit sigValueChanged(value());
    175163    }
    176164}
     
    223211            m_pSpinboxMaxWidth->setMinimum(iMinWidth);
    224212            m_pSpinboxMaxWidth->setMaximum(iMaxSize);
    225             connect(m_pSpinboxMaxWidth, static_cast<void(QSpinBox::*)(int)>(&QSpinBox::valueChanged),
    226                     this, &UIMaximumGuestScreenSizeEditor::sltHandleSizeChanged);
    227213
    228214            m_pLayout->addWidget(m_pSpinboxMaxWidth, 1, 1);
     
    244230            m_pSpinboxMaxHeight->setMinimum(iMinHeight);
    245231            m_pSpinboxMaxHeight->setMaximum(iMaxSize);
    246             connect(m_pSpinboxMaxHeight, static_cast<void(QSpinBox::*)(int)>(&QSpinBox::valueChanged),
    247                     this, &UIMaximumGuestScreenSizeEditor::sltHandleSizeChanged);
    248232
    249233            m_pLayout->addWidget(m_pSpinboxMaxHeight, 2, 1);
     
    266250
    267251        /* Init currently supported maximum guest size policy types: */
    268         QList<MaximumGuestScreenSizePolicy> supportedValues = QList<MaximumGuestScreenSizePolicy>()
    269                                                           << MaximumGuestScreenSizePolicy_Automatic
    270                                                           << MaximumGuestScreenSizePolicy_Any
    271                                                           << MaximumGuestScreenSizePolicy_Fixed;
     252        const QList<MaximumGuestScreenSizePolicy> supportedValues = QList<MaximumGuestScreenSizePolicy>()
     253                                                                  << MaximumGuestScreenSizePolicy_Automatic
     254                                                                  << MaximumGuestScreenSizePolicy_Any
     255                                                                  << MaximumGuestScreenSizePolicy_Fixed;
    272256
    273257        /* Update combo with all the supported values: */
  • TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIMaximumGuestScreenSizeEditor.h

    r94289 r94395  
    6464    Q_OBJECT;
    6565
    66 signals:
    67 
    68     /** Notifies listeners about @a guiValue change. */
    69     void sigValueChanged(const UIMaximumGuestScreenSizeValue &guiValue);
    70 
    7166public:
    7267
    73     /** Constructs maximum guest screen size editor passing @a pParent to the base-class. */
     68    /** Constructs editor passing @a pParent to the base-class. */
    7469    UIMaximumGuestScreenSizeEditor(QWidget *pParent = 0);
    7570
     
    9388    /** Handles current policy index change. */
    9489    void sltHandleCurrentPolicyIndexChanged();
    95     /** Handles size change. */
    96     void sltHandleSizeChanged();
    9790
    9891private:
     
    10699    UIMaximumGuestScreenSizeValue  m_guiValue;
    107100
    108     /** Holds the main layout: */
    109     QGridLayout *m_pLayout;
    110     /** Holds the policy label instance. */
    111     QLabel      *m_pLabelPolicy;
    112     /** Holds the policy combo instance. */
    113     QComboBox   *m_pComboPolicy;
    114     /** Holds the max width label instance. */
    115     QLabel      *m_pLabelMaxWidth;
    116     /** Holds the max width spinbox instance. */
    117     QSpinBox    *m_pSpinboxMaxWidth;
    118     /** Holds the max height label instance. */
    119     QLabel      *m_pLabelMaxHeight;
    120     /** Holds the max height spinbox instance. */
    121     QSpinBox    *m_pSpinboxMaxHeight;
     101    /** @name Widgets
     102     * @{ */
     103        /** Holds the main layout: */
     104        QGridLayout *m_pLayout;
     105        /** Holds the policy label instance. */
     106        QLabel      *m_pLabelPolicy;
     107        /** Holds the policy combo instance. */
     108        QComboBox   *m_pComboPolicy;
     109        /** Holds the max width label instance. */
     110        QLabel      *m_pLabelMaxWidth;
     111        /** Holds the max width spinbox instance. */
     112        QSpinBox    *m_pSpinboxMaxWidth;
     113        /** Holds the max height label instance. */
     114        QLabel      *m_pLabelMaxHeight;
     115        /** Holds the max height spinbox instance. */
     116        QSpinBox    *m_pSpinboxMaxHeight;
     117    /** @} */
    122118};
    123119
  • TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIMonitorCountEditor.cpp

    r94362 r94395  
    6464int UIMonitorCountEditor::minimumLabelHorizontalHint() const
    6565{
    66     return m_pLabel->minimumSizeHint().width();
     66    return m_pLabel ? m_pLabel->minimumSizeHint().width() : 0;
    6767}
    6868
  • TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIMonitorCountEditor.h

    r94362 r94395  
    4747public:
    4848
    49     /** Constructs monitor count editor passing @a pParent to the base-class. */
     49    /** Constructs editor passing @a pParent to the base-class. */
    5050    UIMonitorCountEditor(QWidget *pParent = 0);
    5151
     
    8383    int  m_iValue;
    8484
    85     /** Holds the main layout instance. */
    86     QGridLayout      *m_pLayout;
    87     /** Holds the main label instance. */
    88     QLabel           *m_pLabel;
    89     /** Holds the slider instance. */
    90     QIAdvancedSlider *m_pSlider;
    91     /** Holds the spin-box instance. */
    92     QSpinBox         *m_pSpinBox;
    93     /** Holds minimum label instance. */
    94     QLabel           *m_pLabelMin;
    95     /** Holds maximum label instance. */
    96     QLabel           *m_pLabelMax;
     85    /** @name Widgets
     86     * @{ */
     87        /** Holds the main layout instance. */
     88        QGridLayout      *m_pLayout;
     89        /** Holds the main label instance. */
     90        QLabel           *m_pLabel;
     91        /** Holds the slider instance. */
     92        QIAdvancedSlider *m_pSlider;
     93        /** Holds the spin-box instance. */
     94        QSpinBox         *m_pSpinBox;
     95        /** Holds minimum label instance. */
     96        QLabel           *m_pLabelMin;
     97        /** Holds maximum label instance. */
     98        QLabel           *m_pLabelMax;
     99    /** @} */
    97100};
    98101
  • TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UINameAndSystemEditor.h

    r94030 r94395  
    7676public:
    7777
    78     /** Constructs VM parameters editor passing @a pParent to the base-class.
     78    /** Constructs editor passing @a pParent to the base-class.
    7979     * @param  fChooseName    Controls whether we should propose to choose name.
    8080     * @param  fChoosePath    Controls whether we should propose to choose path.
     
    173173    ulong selectedEditionIndex() const;
    174174
    175     /** Holds the current family ID list. */
    176     QStringList  m_familyIDs;
    177 
    178     /** Holds the current type cache. */
    179     QMap<QString, QList<UIGuestOSType> >  m_types;
    180 
    181     /** Holds the VM OS type ID. */
    182     QString  m_strTypeId;
    183     /** Holds the VM OS family ID. */
    184     QString  m_strFamilyId;
    185 
    186     /** Holds the currently chosen OS type IDs on per-family basis. */
    187     QMap<QString, QString>  m_currentIds;
    188 
    189     /** Holds whether we should propose to choose a name. */
    190     bool  m_fChooseName;
    191     /** Holds whether we should propose to choose a path. */
    192     bool  m_fChoosePath;
    193     /** Holds whether we should propose to choose an image. */
    194     bool  m_fChooseImage;
    195     /** Holds whether we should propose to choose an edition. */
    196     bool  m_fChooseEdition;
    197     /** Holds whether we should propose to choose a type. */
    198     bool  m_fChooseType;
    199     /** Holds whether host supports hardware virtualization. */
    200     bool  m_fSupportsHWVirtEx;
    201     /** Holds whether host supports long mode. */
    202     bool  m_fSupportsLongMode;
    203 
    204     /** Holds the main layout instance. */
    205     QGridLayout *m_pLayout;
    206 
    207     /** Holds the VM name label instance. */
    208     QLabel *m_pLabelName;
    209     /** Holds the VM path label instance. */
    210     QLabel *m_pLabelPath;
    211     /** Holds the ISO image label instance. */
    212     QLabel *m_pLabelImage;
    213     /** Holds the edition label instance. */
    214     QLabel *m_pLabelEdition;
    215     /** Holds the VM OS family label instance. */
    216     QLabel *m_pLabelFamily;
    217     /** Holds the VM OS type label instance. */
    218     QLabel *m_pLabelType;
    219     /** Holds the VM OS type icon instance. */
    220     QLabel *m_pIconType;
    221 
    222     /** Holds the VM name editor instance. */
    223     QILineEdit         *m_pEditorName;
    224     /** Holds the VM path editor instance. */
    225     UIFilePathSelector *m_pSelectorPath;
    226     /** Holds the file selector for ISO image (either for unattended install or to be attached to vm). */
    227     UIFilePathSelector *m_pSelectorImage;
    228     /** Holds the VM OS edition combo (currently only Windows ISO have this). */
    229     QComboBox          *m_pComboEdition;
    230     /** Holds the VM OS family combo instance. */
    231     QComboBox          *m_pComboFamily;
    232     /** Holds the VM OS type combo instance. */
    233     QComboBox          *m_pComboType;
     175    /** @name Arguments
     176     * @{ */
     177        /** Holds whether we should propose to choose a name. */
     178        bool  m_fChooseName;
     179        /** Holds whether we should propose to choose a path. */
     180        bool  m_fChoosePath;
     181        /** Holds whether we should propose to choose an image. */
     182        bool  m_fChooseImage;
     183        /** Holds whether we should propose to choose an edition. */
     184        bool  m_fChooseEdition;
     185        /** Holds whether we should propose to choose a type. */
     186        bool  m_fChooseType;
     187    /** @} */
     188
     189    /** @name Options
     190     * @{ */
     191        /** Holds whether host supports hardware virtualization. */
     192        bool  m_fSupportsHWVirtEx;
     193        /** Holds whether host supports long mode. */
     194        bool  m_fSupportsLongMode;
     195    /** @} */
     196
     197    /** @name Values
     198     * @{ */
     199        /** Holds the current family ID list. */
     200        QStringList  m_familyIDs;
     201
     202        /** Holds the current type cache. */
     203        QMap<QString, QList<UIGuestOSType> >  m_types;
     204
     205        /** Holds the VM OS type ID. */
     206        QString  m_strTypeId;
     207        /** Holds the VM OS family ID. */
     208        QString  m_strFamilyId;
     209
     210        /** Holds the currently chosen OS type IDs on per-family basis. */
     211        QMap<QString, QString>  m_currentIds;
     212    /** @} */
     213
     214    /** @name Widgets
     215     * @{ */
     216        /** Holds the main layout instance. */
     217        QGridLayout *m_pLayout;
     218
     219        /** Holds the VM name label instance. */
     220        QLabel *m_pLabelName;
     221        /** Holds the VM path label instance. */
     222        QLabel *m_pLabelPath;
     223        /** Holds the ISO image label instance. */
     224        QLabel *m_pLabelImage;
     225        /** Holds the edition label instance. */
     226        QLabel *m_pLabelEdition;
     227        /** Holds the VM OS family label instance. */
     228        QLabel *m_pLabelFamily;
     229        /** Holds the VM OS type label instance. */
     230        QLabel *m_pLabelType;
     231        /** Holds the VM OS type icon instance. */
     232        QLabel *m_pIconType;
     233
     234        /** Holds the VM name editor instance. */
     235        QILineEdit         *m_pEditorName;
     236        /** Holds the VM path editor instance. */
     237        UIFilePathSelector *m_pSelectorPath;
     238        /** Holds the file selector for ISO image (either for unattended install or to be attached to vm). */
     239        UIFilePathSelector *m_pSelectorImage;
     240        /** Holds the VM OS edition combo (currently only Windows ISO have this). */
     241        QComboBox          *m_pComboEdition;
     242        /** Holds the VM OS family combo instance. */
     243        QComboBox          *m_pComboFamily;
     244        /** Holds the VM OS type combo instance. */
     245        QComboBox          *m_pComboType;
     246    /** @} */
    234247};
    235248
  • TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UINetworkAttachmentEditor.h

    r94058 r94395  
    5454public:
    5555
    56     /** Constructs network attachment editor passing @a pParent to the base-class.
     56    /** Constructs editor passing @a pParent to the base-class.
    5757      * @param  fWithLabels  Brings whether we should add labels ourselves. */
    5858    UINetworkAttachmentEditor(QWidget *pParent = 0, bool fWithLabels = false);
  • TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIScaleFactorEditor.h

    r94357 r94395  
    4343public:
    4444
    45     /** Creates scale factor editor passing @a pParent to the base-class. */
     45    /** Constructs editor passing @a pParent to the base-class. */
    4646    UIScaleFactorEditor(QWidget *pParent);
    4747
  • TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIShortcutConfigurationEditor.h

    r93990 r94395  
    3737public:
    3838
    39     /** Constructs shortcut search functor. */
     39    /** Constructs search functor. */
    4040    UIShortcutSearchFunctor() {}
    4141
     
    5959public:
    6060
    61     /** Constructs shortcut configuration item on the basis of passed arguments.
     61    /** Constructs item on the basis of passed arguments.
    6262      * @param  strKey              Brings the unique key identifying held sequence.
    6363      * @param  strScope            Brings the scope of the held sequence.
     
    7777    {}
    7878
    79     /** Constructs shortcut configuration item on the basis of @a another one. */
     79    /** Constructs item on the basis of @a another one. */
    8080    UIShortcutConfigurationItem(const UIShortcutConfigurationItem &another)
    8181        : m_strKey(another.key())
     
    157157public:
    158158
    159     /** Constructs shortcut configuration editor passing @a pParent to the base-class. */
     159    /** Constructs editor passing @a pParent to the base-class. */
    160160    UIShortcutConfigurationEditor(QWidget *pParent = 0);
    161161
  • TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIUpdateSettingsEditor.cpp

    r94059 r94395  
    4444void UIUpdateSettingsEditor::setValue(const VBoxUpdateData &guiValue)
    4545{
    46     /* Update value if changed: */
     46    /* Update cached value and
     47     * widgets if value has changed: */
    4748    if (m_guiValue != guiValue)
    4849    {
    49         /* Update value itself: */
    5050        m_guiValue = guiValue;
    5151
    52         /* Update check-box if present: */
    5352        if (m_pCheckBox)
    5453        {
     
    5756            if (m_pCheckBox->isChecked())
    5857            {
    59                 /* Update period combo if present: */
    6058                if (m_pComboUpdatePeriod)
    6159                    m_pComboUpdatePeriod->setCurrentIndex(m_guiValue.periodIndex());
    62 
    63                 /* Update branch radio-buttons if present: */
    6460                if (m_mapRadioButtons.value(m_guiValue.branchIndex()))
    6561                    m_mapRadioButtons.value(m_guiValue.branchIndex())->setChecked(true);
    6662            }
    6763
    68             /* Update other related widgets: */
    6964            sltHandleUpdateToggle(m_pCheckBox->isChecked());
    7065        }
     
    162157{
    163158    /* Prepare main layout: */
    164     QGridLayout *pLayoutMain = new QGridLayout(this);
    165     if (pLayoutMain)
    166     {
    167         pLayoutMain->setContentsMargins(0, 0, 0, 0);
    168         pLayoutMain->setRowStretch(2, 1);
     159    QGridLayout *pLayout = new QGridLayout(this);
     160    if (pLayout)
     161    {
     162        pLayout->setContentsMargins(0, 0, 0, 0);
     163        pLayout->setRowStretch(2, 1);
    169164
    170165        /* Prepare update check-box: */
    171166        m_pCheckBox = new QCheckBox(this);
    172167        if (m_pCheckBox)
    173             pLayoutMain->addWidget(m_pCheckBox, 0, 0, 1, 2);
     168            pLayout->addWidget(m_pCheckBox, 0, 0, 1, 2);
    174169
    175170        /* Prepare 20-px shifting spacer: */
    176171        QSpacerItem *pSpacerItem = new QSpacerItem(20, 0, QSizePolicy::Fixed, QSizePolicy::Minimum);
    177172        if (pSpacerItem)
    178             pLayoutMain->addItem(pSpacerItem, 1, 0);
     173            pLayout->addItem(pSpacerItem, 1, 0);
    179174
    180175        /* Prepare update settings widget: */
     
    256251            }
    257252
    258             pLayoutMain->addWidget(m_pWidgetUpdateSettings, 1, 1);
     253            pLayout->addWidget(m_pWidgetUpdateSettings, 1, 1);
    259254        }
    260255    }
  • TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIUpdateSettingsEditor.h

    r94059 r94395  
    4343public:
    4444
    45     /** Constructs update settings editor passing @a pParent to the base-class. */
     45    /** Constructs editor passing @a pParent to the base-class. */
    4646    UIUpdateSettingsEditor(QWidget *pParent = 0);
    4747
  • TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIVRDEAuthLibraryEditor.cpp

    r93935 r94395  
    3737void UIVRDEAuthLibraryEditor::setValue(const QString &strValue)
    3838{
    39     if (m_pSelector)
     39    /* Update cached value and
     40     * editor if value has changed: */
     41    if (m_strValue != strValue)
    4042    {
    41         /* Update cached value and editor
    42          * if value has changed: */
    43         if (m_strValue != strValue)
    44         {
    45             m_strValue = strValue;
     43        m_strValue = strValue;
     44        if (m_pSelector)
    4645            m_pSelector->setPath(strValue);
    47         }
    4846    }
    4947}
     
    5654int UIVRDEAuthLibraryEditor::minimumLabelHorizontalHint() const
    5755{
    58     return m_pLabel->minimumSizeHint().width();
     56    return m_pLabel ? m_pLabel->minimumSizeHint().width() : 0;
    5957}
    6058
     
    7270        m_pSelector->setToolTip(tr("Holds the path to the library that provides "
    7371                                   "authentication for Remote Display (VRDP) clients."));
    74 }
    75 
    76 void UIVRDEAuthLibraryEditor::sltHandleSelectorPathChanged()
    77 {
    78     if (m_pSelector)
    79         emit sigValueChanged(m_pSelector->path());
    8072}
    8173
     
    10597            m_pSelector->setInitialPath(uiCommon().homeFolder());
    10698            m_pSelector->setMode(UIFilePathSelector::Mode_File_Open);
    107             connect(m_pSelector, &UIFilePathSelector::pathChanged,
    108                     this, &UIVRDEAuthLibraryEditor::sltHandleSelectorPathChanged);
    10999
    110100            m_pLayout->addWidget(m_pSelector, 0, 1);
  • TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIVRDEAuthLibraryEditor.h

    r93990 r94395  
    3939    Q_OBJECT;
    4040
    41 signals:
    42 
    43     /** Notifies listeners about @a enmValue change. */
    44     void sigValueChanged(const QString &strValue);
    45 
    4641public:
    4742
     
    6459    virtual void retranslateUi() RT_OVERRIDE;
    6560
    66 private slots:
    67 
    68     /** Handles selector path change. */
    69     void sltHandleSelectorPathChanged();
    70 
    7161private:
    7262
  • TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIVRDESettingsEditor.cpp

    r94378 r94395  
    4949void UIVRDESettingsEditor::setFeatureEnabled(bool fEnabled)
    5050{
     51    /* Update cached value and
     52     * check-box if value has changed: */
    5153    if (m_fFeatureEnabled != fEnabled)
    5254    {
     
    7577void UIVRDESettingsEditor::setPort(const QString &strPort)
    7678{
     79    /* Update cached value and
     80     * line-edit if value has changed: */
    7781    if (m_strPort != strPort)
    7882    {
     
    9094void UIVRDESettingsEditor::setAuthType(const KAuthType &enmType)
    9195{
     96    /* Update cached value and
     97     * combo if value has changed: */
    9298    if (m_enmAuthType != enmType)
    9399    {
    94100        m_enmAuthType = enmType;
    95         if (m_pComboAuthType)
    96         {
    97             /* We are doing that *now* because this combo have
    98              * dynamical content which depends on cashed value: */
    99             repopulateComboAuthType();
    100 
    101             const int iAuthTypePosition = m_pComboAuthType->findData(enmType);
    102             m_pComboAuthType->setCurrentIndex(iAuthTypePosition == -1 ? 0 : iAuthTypePosition);
    103         }
     101        repopulateComboAuthType();
    104102    }
    105103}
     
    112110void UIVRDESettingsEditor::setTimeout(const QString &strTimeout)
    113111{
     112    /* Update cached value and
     113     * line-edit if value has changed: */
    114114    if (m_strTimeout != strTimeout)
    115115    {
     
    127127void UIVRDESettingsEditor::setMultipleConnectionsAllowed(bool fAllowed)
    128128{
     129    /* Update cached value and
     130     * check-box if value has changed: */
    129131    if (m_fMultipleConnectionsAllowed != fAllowed)
    130132    {
     
    226228        if (m_pWidgetSettings)
    227229        {
    228             /* Update widget availability: */
    229             sltHandleFeatureToggled(m_pCheckboxFeature->isChecked());
    230 
    231230            /* Prepare 'settings' layout: */
    232231            QGridLayout *pLayoutRemoteDisplaySettings = new QGridLayout(m_pWidgetSettings);
     
    307306        }
    308307    }
     308
     309    /* Update widget availability: */
     310    if (m_pCheckboxFeature)
     311        sltHandleFeatureToggled(m_pCheckboxFeature->isChecked());
    309312}
    310313
     
    338341        foreach (const KAuthType &enmType, authTypes)
    339342            m_pComboAuthType->addItem(gpConverter->toString(enmType), QVariant::fromValue(enmType));
    340     }
    341 }
     343
     344        /* Look for proper index to choose: */
     345        const int iIndex = m_pComboAuthType->findData(QVariant::fromValue(m_enmAuthType));
     346        if (iIndex != -1)
     347            m_pComboAuthType->setCurrentIndex(iIndex);
     348    }
     349}
  • TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIVRDESettingsEditor.h

    r94379 r94395  
    2121# pragma once
    2222#endif
    23 
    24 /* Qt includes: */
    25 #include <QMap>
    2623
    2724/* GUI includes: */
     
    5047public:
    5148
    52     /** Constructs VRDE settings editor passing @a pParent to the base-class. */
     49    /** Constructs editor passing @a pParent to the base-class. */
    5350    UIVRDESettingsEditor(QWidget *pParent = 0);
    5451
     
    103100    void repopulateComboAuthType();
    104101
    105     /** @name Variables
     102    /** @name Values
    106103     * @{ */
    107104        /** Holds whether feature is enabled. */
  • TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIVideoMemoryEditor.cpp

    r94341 r94395  
    3434UIVideoMemoryEditor::UIVideoMemoryEditor(QWidget *pParent /* = 0 */)
    3535    : QIWithRetranslateUI<QWidget>(pParent)
     36    , m_iValue(0)
    3637    , m_comGuestOSType(CGuestOSType())
    3738    , m_cGuestScreenCount(1)
     
    4445    , m_iMaxVRAM(0)
    4546    , m_iMaxVRAMVisible(0)
    46     , m_iInitialVRAM(0)
    4747    , m_pLayout(0)
    4848    , m_pLabelMemory(0)
     
    5757void UIVideoMemoryEditor::setValue(int iValue)
    5858{
    59     if (m_pSlider)
    60     {
    61         m_iInitialVRAM = RT_MIN(iValue, m_iMaxVRAM);
    62         m_pSlider->setValue(m_iInitialVRAM);
     59    /* Update cached value and
     60     * slider if value has changed: */
     61    if (m_iValue != iValue)
     62    {
     63        m_iValue = RT_MIN(iValue, m_iMaxVRAM);
     64        if (m_pSlider)
     65            m_pSlider->setValue(m_iValue);
     66
     67        /* Update requirements: */
     68        updateRequirements();
    6369    }
    6470}
     
    6672int UIVideoMemoryEditor::value() const
    6773{
    68     return m_pSlider ? m_pSlider->value() : 0;
     74    return m_pSlider ? m_pSlider->value() : m_iValue;
    6975}
    7076
    7177void UIVideoMemoryEditor::setGuestOSType(const CGuestOSType &comGuestOSType)
    7278{
    73     /* Check if guest OS type really changed: */
    74     if (m_comGuestOSType == comGuestOSType)
    75         return;
    76 
    77     /* Remember new guest OS type: */
    78     m_comGuestOSType = comGuestOSType;
    79 
    80     /* Update requirements: */
    81     updateRequirements();
     79    /* Update cached value and
     80     * requirements if value has changed: */
     81    if (m_comGuestOSType != comGuestOSType)
     82    {
     83        /* Remember new guest OS type: */
     84        m_comGuestOSType = comGuestOSType;
     85
     86        /* Update requirements: */
     87        updateRequirements();
     88    }
    8289}
    8390
    8491void UIVideoMemoryEditor::setGuestScreenCount(int cGuestScreenCount)
    8592{
    86     /* Check if guest screen count really changed: */
    87     if (m_cGuestScreenCount == cGuestScreenCount)
    88         return;
    89 
    90     /* Remember new guest screen count: */
    91     m_cGuestScreenCount = cGuestScreenCount;
    92 
    93     /* Update requirements: */
    94     updateRequirements();
     93    /* Update cached value and
     94     * requirements if value has changed: */
     95    if (m_cGuestScreenCount != cGuestScreenCount)
     96    {
     97        /* Remember new guest screen count: */
     98        m_cGuestScreenCount = cGuestScreenCount;
     99
     100        /* Update requirements: */
     101        updateRequirements();
     102    }
    95103}
    96104
    97105void UIVideoMemoryEditor::setGraphicsControllerType(const KGraphicsControllerType &enmGraphicsControllerType)
    98106{
    99     /* Check if graphics controller type really changed: */
    100     if (m_enmGraphicsControllerType == enmGraphicsControllerType)
    101         return;
    102 
    103     /* Remember new graphics controller type: */
    104     m_enmGraphicsControllerType = enmGraphicsControllerType;
    105 
    106     /* Update requirements: */
    107     updateRequirements();
     107    /* Update cached value and
     108     * requirements if value has changed: */
     109    if (m_enmGraphicsControllerType != enmGraphicsControllerType)
     110    {
     111        /* Remember new graphics controller type: */
     112        m_enmGraphicsControllerType = enmGraphicsControllerType;
     113
     114        /* Update requirements: */
     115        updateRequirements();
     116    }
    108117}
    109118
     
    111120void UIVideoMemoryEditor::set3DAccelerationSupported(bool fSupported)
    112121{
    113     /* Check if 3D acceleration really changed: */
    114     if (m_f3DAccelerationSupported == fSupported)
    115         return;
    116 
    117     /* Remember new 3D acceleration: */
    118     m_f3DAccelerationSupported = fSupported;
    119 
    120     /* Update requirements: */
    121     updateRequirements();
     122    /* Update cached value and
     123     * requirements if value has changed: */
     124    if (m_f3DAccelerationSupported != fSupported)
     125    {
     126        /* Remember new 3D acceleration: */
     127        m_f3DAccelerationSupported = fSupported;
     128
     129        /* Update requirements: */
     130        updateRequirements();
     131    }
    122132}
    123133
    124134void UIVideoMemoryEditor::set3DAccelerationEnabled(bool fEnabled)
    125135{
    126     /* Check if 3D acceleration really changed: */
    127     if (m_f3DAccelerationEnabled == fEnabled)
    128         return;
    129 
    130     /* Remember new 3D acceleration: */
    131     m_f3DAccelerationEnabled = fEnabled;
    132 
    133     /* Update requirements: */
    134     updateRequirements();
     136    /* Update cached value and
     137     * requirements if value has changed: */
     138    if (m_f3DAccelerationEnabled != fEnabled)
     139    {
     140        /* Remember new 3D acceleration: */
     141        m_f3DAccelerationEnabled = fEnabled;
     142
     143        /* Update requirements: */
     144        updateRequirements();
     145    }
    135146}
    136147#endif /* VBOX_WITH_3D_ACCELERATION */
     
    315326            m_iMaxVRAMVisible = 256;
    316327    }
    317 #endif
     328#endif /* VBOX_WITH_3D_ACCELERATION */
    318329
    319330    /* Adjust visible maximum VRAM to be no less than initial VRAM: */
    320     m_iMaxVRAMVisible = qMax(m_iMaxVRAMVisible, m_iInitialVRAM);
     331    m_iMaxVRAMVisible = qMax(m_iMaxVRAMVisible, m_iValue);
    321332    /* Adjust visible maximum VRAM to be no less than recommended VRAM: */
    322333    m_iMaxVRAMVisible = qMax(m_iMaxVRAMVisible, iNeedMBytes);
  • TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIVideoMemoryEditor.h

    r94341 r94395  
    5151public:
    5252
    53     /** Constructs video-memory editor passing @a pParent to the base-class. */
     53    /** Constructs editor passing @a pParent to the base-class. */
    5454    UIVideoMemoryEditor(QWidget *pParent = 0);
    5555
     
    106106    static int calculatePageStep(int iMax);
    107107
    108     /** Holds the guest OS type ID. */
    109     CGuestOSType             m_comGuestOSType;
    110     /** Holds the guest screen count. */
    111     int                      m_cGuestScreenCount;
    112     /** Holds the graphics controller type. */
    113     KGraphicsControllerType  m_enmGraphicsControllerType;
     108    /** Holds the value to be selected. */
     109    int  m_iValue;
     110
     111    /** @name Options
     112     * @{ */
     113        /** Holds the guest OS type ID. */
     114        CGuestOSType             m_comGuestOSType;
     115        /** Holds the guest screen count. */
     116        int                      m_cGuestScreenCount;
     117        /** Holds the graphics controller type. */
     118        KGraphicsControllerType  m_enmGraphicsControllerType;
    114119#ifdef VBOX_WITH_3D_ACCELERATION
    115     /** Holds whether 3D acceleration is supported. */
    116     bool                     m_f3DAccelerationSupported;
    117     /** Holds whether 3D acceleration is enabled. */
    118     bool                     m_f3DAccelerationEnabled;
     120        /** Holds whether 3D acceleration is supported. */
     121        bool                     m_f3DAccelerationSupported;
     122        /** Holds whether 3D acceleration is enabled. */
     123        bool                     m_f3DAccelerationEnabled;
    119124#endif
    120125
    121     /** Holds the minimum lower limit of VRAM (MiB). */
    122     int  m_iMinVRAM;
    123     /** Holds the maximum upper limit of VRAM (MiB). */
    124     int  m_iMaxVRAM;
    125     /** Holds the upper limit of VRAM (MiB) for this dialog.
    126       * @note This value is lower than m_iMaxVRAM to save
    127       *       careless users from setting useless big values. */
    128     int  m_iMaxVRAMVisible;
    129     /** Holds the initial VRAM value when the dialog is opened. */
    130     int  m_iInitialVRAM;
     126        /** Holds the minimum lower limit of VRAM (MiB). */
     127        int  m_iMinVRAM;
     128        /** Holds the maximum upper limit of VRAM (MiB). */
     129        int  m_iMaxVRAM;
     130        /** Holds the upper limit of VRAM (MiB) for this dialog.
     131          * @note This value is lower than m_iMaxVRAM to save
     132          *       careless users from setting useless big values. */
     133        int  m_iMaxVRAMVisible;
     134    /** @} */
    131135
    132     /** Holds the main layout instance. */
    133     QGridLayout      *m_pLayout;
    134     /** Holds the memory label instance. */
    135     QLabel           *m_pLabelMemory;
    136     /** Holds the memory slider instance. */
    137     QIAdvancedSlider *m_pSlider;
    138     /** Holds minimum memory label instance. */
    139     QLabel           *m_pLabelMemoryMin;
    140     /** Holds maximum memory label instance. */
    141     QLabel           *m_pLabelMemoryMax;
    142     /** Holds the memory spin-box instance. */
    143     QSpinBox         *m_pSpinBox;
     136    /** @name Widgets
     137     * @{ */
     138        /** Holds the main layout instance. */
     139        QGridLayout      *m_pLayout;
     140        /** Holds the memory label instance. */
     141        QLabel           *m_pLabelMemory;
     142        /** Holds the memory slider instance. */
     143        QIAdvancedSlider *m_pSlider;
     144        /** Holds minimum memory label instance. */
     145        QLabel           *m_pLabelMemoryMin;
     146        /** Holds maximum memory label instance. */
     147        QLabel           *m_pLabelMemoryMax;
     148        /** Holds the memory spin-box instance. */
     149        QSpinBox         *m_pSpinBox;
     150    /** @} */
    144151};
    145152
  • TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIVirtualCPUEditor.h

    r93990 r94395  
    4646public:
    4747
    48     /** @param  fWithLabel  Determines whether we should add label ourselves. */
     48    /** Constructs editor passing @a pParent to the base-class.
     49      * @param  fWithLabel  Determines whether we should add label ourselves. */
    4950    UIVirtualCPUEditor(QWidget *pParent = 0, bool fWithLabel = false);
    5051
  • TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIVisualStateEditor.cpp

    r94148 r94395  
    4141void UIVisualStateEditor::setMachineId(const QUuid &uMachineId)
    4242{
    43     m_uMachineId = uMachineId;
     43    /* Update cached value and
     44     * combo if value has changed: */
     45    if (m_uMachineId != uMachineId)
     46    {
     47        m_uMachineId = uMachineId;
     48        populateCombo();
     49    }
    4450}
    4551
    4652void UIVisualStateEditor::setValue(UIVisualStateType enmValue)
    4753{
    48     if (m_pCombo)
     54    /* Update cached value and
     55     * combo if value has changed: */
     56    if (m_enmValue != enmValue)
    4957    {
    50         /* Update cached value and
    51          * combo if value has changed: */
    52         if (m_enmValue != enmValue)
    53         {
    54             m_enmValue = enmValue;
    55             populateCombo();
    56         }
    57 
    58         /* Look for proper index to choose: */
    59         int iIndex = m_pCombo->findData(QVariant::fromValue(m_enmValue));
    60         if (iIndex != -1)
    61             m_pCombo->setCurrentIndex(iIndex);
     58        m_enmValue = enmValue;
     59        populateCombo();
    6260    }
    6361}
     
    7068int UIVisualStateEditor::minimumLabelHorizontalHint() const
    7169{
    72     return m_pLabel->minimumSizeHint().width();
     70    return m_pLabel ? m_pLabel->minimumSizeHint().width() : 0;
    7371}
    7472
     
    9391                                "as soon as possible, otherwise desired one will be defined."));
    9492    }
    95 }
    96 
    97 void UIVisualStateEditor::sltHandleCurrentIndexChanged()
    98 {
    99     if (m_pCombo)
    100         emit sigValueChanged(m_pCombo->itemData(m_pCombo->currentIndex()).value<UIVisualStateType>());
    10193}
    10294
     
    129121                if (m_pLabel)
    130122                    m_pLabel->setBuddy(m_pCombo);
    131                 connect(m_pCombo, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
    132                         this, &UIVisualStateEditor::sltHandleCurrentIndexChanged);
    133123                pComboLayout->addWidget(m_pCombo);
    134124            }
     
    181171            m_pCombo->addItem(QString(), QVariant::fromValue(enmType));
    182172
     173        /* Look for proper index to choose: */
     174        const int iIndex = m_pCombo->findData(QVariant::fromValue(m_enmValue));
     175        if (iIndex != -1)
     176            m_pCombo->setCurrentIndex(iIndex);
     177
    183178        /* Retranslate finally: */
    184179        retranslateUi();
  • TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIVisualStateEditor.h

    r94148 r94395  
    4141    Q_OBJECT;
    4242
    43 signals:
    44 
    45     /** Notifies listeners about @a enmValue change. */
    46     void sigValueChanged(UIVisualStateType enmValue);
    47 
    4843public:
    4944
    50     /** Constructs visual state editor passing @a pParent to the base-class. */
     45    /** Constructs editor passing @a pParent to the base-class. */
    5146    UIVisualStateEditor(QWidget *pParent = 0);
    5247
     
    7166    /** Handles translation event. */
    7267    virtual void retranslateUi() RT_OVERRIDE;
    73 
    74 private slots:
    75 
    76     /** Handles current index change. */
    77     void sltHandleCurrentIndexChanged();
    7868
    7969private:
Note: See TracChangeset for help on using the changeset viewer.

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