Changeset 94395 in vbox
- Timestamp:
- Mar 29, 2022 4:29:26 PM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 150711
- 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 42 42 void UIAudioControllerEditor::setValue(KAudioControllerType enmValue) 43 43 { 44 if (m_pCombo) 44 /* Update cached value and 45 * combo if value has changed: */ 46 if (m_enmValue != enmValue) 45 47 { 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(); 58 50 } 59 51 } … … 66 58 int UIAudioControllerEditor::minimumLabelHorizontalHint() const 67 59 { 68 return m_pLabel ->minimumSizeHint().width();60 return m_pLabel ? m_pLabel->minimumSizeHint().width() : 0; 69 61 } 70 62 … … 89 81 "VirtualBox will provide different audio hardware to the virtual machine.")); 90 82 } 91 }92 93 void UIAudioControllerEditor::sltHandleCurrentIndexChanged()94 {95 if (m_pCombo)96 emit sigValueChanged(m_pCombo->itemData(m_pCombo->currentIndex()).value<KAudioControllerType>());97 83 } 98 84 … … 125 111 if (m_pLabel) 126 112 m_pLabel->setBuddy(m_pCombo); 127 connect(m_pCombo, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged),128 this, &UIAudioControllerEditor::sltHandleCurrentIndexChanged);129 113 pComboLayout->addWidget(m_pCombo); 130 114 } … … 165 149 m_pCombo->addItem(QString(), QVariant::fromValue(enmType)); 166 150 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 167 156 /* Retranslate finally: */ 168 157 retranslateUi(); -
TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIAudioControllerEditor.h ¶
r94039 r94395 42 42 Q_OBJECT; 43 43 44 signals:45 46 /** Notifies listeners about @a enmValue change. */47 void sigValueChanged(KAudioControllerType enmValue);48 49 44 public: 50 45 51 /** Constructs audio controllereditor passing @a pParent to the base-class. */46 /** Constructs editor passing @a pParent to the base-class. */ 52 47 UIAudioControllerEditor(QWidget *pParent = 0); 53 48 … … 69 64 /** Handles translation event. */ 70 65 virtual void retranslateUi() RT_OVERRIDE; 71 72 private slots:73 74 /** Handles current index change. */75 void sltHandleCurrentIndexChanged();76 66 77 67 private: -
TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIAudioHostDriverEditor.cpp ¶
r94298 r94395 42 42 void UIAudioHostDriverEditor::setValue(KAudioDriverType enmValue) 43 43 { 44 if (m_pCombo) 44 /* Update cached value and 45 * combo if value has changed: */ 46 if (m_enmValue != enmValue) 45 47 { 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(); 58 50 } 59 51 } … … 66 58 int UIAudioHostDriverEditor::minimumLabelHorizontalHint() const 67 59 { 68 return m_pLabel ->minimumSizeHint().width();60 return m_pLabel ? m_pLabel->minimumSizeHint().width() : 0; 69 61 } 70 62 … … 89 81 "see an audio card, however every access to it will be ignored.")); 90 82 } 91 }92 93 void UIAudioHostDriverEditor::sltHandleCurrentIndexChanged()94 {95 if (m_pCombo)96 emit sigValueChanged(m_pCombo->itemData(m_pCombo->currentIndex()).value<KAudioDriverType>());97 83 } 98 84 … … 125 111 if (m_pLabel) 126 112 m_pLabel->setBuddy(m_pCombo); 127 connect(m_pCombo, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged),128 this, &UIAudioHostDriverEditor::sltHandleCurrentIndexChanged);129 113 pComboLayout->addWidget(m_pCombo); 130 114 } … … 165 149 m_pCombo->addItem(QString(), QVariant::fromValue(enmType)); 166 150 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 167 156 /* Retranslate finally: */ 168 157 retranslateUi(); -
TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIAudioHostDriverEditor.h ¶
r94039 r94395 42 42 Q_OBJECT; 43 43 44 signals:45 46 /** Notifies listeners about @a enmValue change. */47 void sigValueChanged(KAudioDriverType enmValue);48 49 44 public: 50 45 51 /** Constructs audio host drivereditor passing @a pParent to the base-class. */46 /** Constructs editor passing @a pParent to the base-class. */ 52 47 UIAudioHostDriverEditor(QWidget *pParent = 0); 53 48 … … 69 64 /** Handles translation event. */ 70 65 virtual void retranslateUi() RT_OVERRIDE; 71 72 private slots:73 74 /** Handles current index change. */75 void sltHandleCurrentIndexChanged();76 66 77 67 private: -
TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIAutoCaptureKeyboardEditor.cpp ¶
r93936 r94395 36 36 void UIAutoCaptureKeyboardEditor::setValue(bool fValue) 37 37 { 38 if (m_pCheckBox) 38 /* Update cached value and 39 * check-box if value has changed: */ 40 if (m_fValue != fValue) 39 41 { 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); 47 45 } 48 46 } … … 59 57 if (m_pCheckBox) 60 58 { 59 m_pCheckBox->setText(tr("&Auto Capture Keyboard")); 61 60 m_pCheckBox->setToolTip(tr("When checked, the keyboard is automatically captured every time the VM window is " 62 61 "activated. When the keyboard is captured, all keystrokes (including system ones like " 63 62 "Alt-Tab) are directed to the VM.")); 64 m_pCheckBox->setText(tr("&Auto Capture Keyboard"));65 63 } 66 64 } … … 69 67 { 70 68 /* Prepare main layout: */ 71 QGridLayout *pLayout Main= new QGridLayout(this);72 if (pLayout Main)69 QGridLayout *pLayout = new QGridLayout(this); 70 if (pLayout) 73 71 { 74 pLayout Main->setContentsMargins(0, 0, 0, 0);75 pLayout Main->setColumnStretch(1, 1);72 pLayout->setContentsMargins(0, 0, 0, 0); 73 pLayout->setColumnStretch(1, 1); 76 74 77 75 /* Prepare label: */ 78 76 m_pLabel = new QLabel(this); 79 77 if (m_pLabel) 80 pLayout Main->addWidget(m_pLabel, 0, 0);78 pLayout->addWidget(m_pLabel, 0, 0); 81 79 /* Prepare check-box: */ 82 80 m_pCheckBox = new QCheckBox(this); 83 81 if (m_pCheckBox) 84 pLayout Main->addWidget(m_pCheckBox, 0, 1);82 pLayout->addWidget(m_pCheckBox, 0, 1); 85 83 } 86 84 -
TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIAutoCaptureKeyboardEditor.h ¶
r93990 r94395 36 36 public: 37 37 38 /** Constructs auto capture keyboardeditor passing @a pParent to the base-class. */38 /** Constructs editor passing @a pParent to the base-class. */ 39 39 UIAutoCaptureKeyboardEditor(QWidget *pParent = 0); 40 40 -
TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIBaseMemoryEditor.cpp ¶
r93115 r94395 62 62 63 63 /** Holds the minimum RAM. */ 64 uint m_uMinRAM;64 uint m_uMinRAM; 65 65 /** Holds the maximum optimal RAM. */ 66 uint m_uMaxRAMOpt;66 uint m_uMaxRAMOpt; 67 67 /** Holds the maximum allowed RAM. */ 68 uint m_uMaxRAMAlw;68 uint m_uMaxRAMAlw; 69 69 /** Holds the maximum possible RAM. */ 70 uint m_uMaxRAM;70 uint m_uMaxRAM; 71 71 }; 72 72 … … 83 83 , m_uMaxRAM(0) 84 84 { 85 /* Prepare: */86 85 prepare(); 87 86 } … … 94 93 , m_uMaxRAM(0) 95 94 { 96 /* Prepare: */97 95 prepare(); 98 96 } … … 243 241 : QIWithRetranslateUI<QWidget>(pParent) 244 242 , m_fWithLabel(fWithLabel) 243 , m_iValue(0) 245 244 , m_pLabelMemory(0) 246 245 , m_pSlider(0) … … 254 253 void UIBaseMemoryEditor::setValue(int iValue) 255 254 { 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 } 258 263 } 259 264 260 265 int UIBaseMemoryEditor::value() const 261 266 { 262 return m_pSlider ? m_pSlider->value() : 0;267 return m_pSlider ? m_pSlider->value() : m_iValue; 263 268 } 264 269 … … 324 329 { 325 330 /* Create main layout: */ 326 QGridLayout *p MainLayout = new QGridLayout(this);327 if (p MainLayout)328 { 329 p MainLayout->setContentsMargins(0, 0, 0, 0);331 QGridLayout *pLayout = new QGridLayout(this); 332 if (pLayout) 333 { 334 pLayout->setContentsMargins(0, 0, 0, 0); 330 335 int iRow = 0; 331 336 … … 334 339 m_pLabelMemory = new QLabel(this); 335 340 if (m_pLabelMemory) 336 p MainLayout->addWidget(m_pLabelMemory, 0, iRow++, 1, 1);341 pLayout->addWidget(m_pLabelMemory, 0, iRow++, 1, 1); 337 342 338 343 /* Create slider layout: */ … … 376 381 377 382 /* Add slider layout to main layout: */ 378 p MainLayout->addLayout(pSliderLayout, 0, iRow++, 2, 1);383 pLayout->addLayout(pSliderLayout, 0, iRow++, 2, 1); 379 384 } 380 385 … … 390 395 connect(m_pSpinBox, static_cast<void(QSpinBox::*)(int)>(&QSpinBox::valueChanged), 391 396 this, &UIBaseMemoryEditor::sltHandleSpinBoxChange); 392 p MainLayout->addWidget(m_pSpinBox, 0, iRow++, 1, 1);397 pLayout->addWidget(m_pSpinBox, 0, iRow++, 1, 1); 393 398 } 394 399 } -
TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIBaseMemoryEditor.h ¶
r93990 r94395 43 43 /** Notifies listeners about value has became @a fValid. */ 44 44 void sigValidChanged(bool fValid); 45 /** Notifies listeners about @a iValue has changed. */ 45 46 void sigValueChanged(int iValue); 46 47 47 48 public: 48 49 49 /** Constructs base-memoryeditor passing @a pParent to the base-class.50 /** Constructs editor passing @a pParent to the base-class. 50 51 * @param fWithLabel Brings whether we should add label ourselves. */ 51 52 UIBaseMemoryEditor(QWidget *pParent = 0, bool fWithLabel = false); … … 84 85 bool m_fWithLabel; 85 86 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 /** @} */ 96 103 }; 97 104 -
TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIBootOrderEditor.cpp ¶
r93996 r94395 486 486 { 487 487 /* Create main layout: */ 488 QGridLayout *p MainLayout = new QGridLayout(this);489 if (p MainLayout)490 { 491 p MainLayout->setContentsMargins(0, 0, 0, 0);488 QGridLayout *pLayout = new QGridLayout(this); 489 if (pLayout) 490 { 491 pLayout->setContentsMargins(0, 0, 0, 0); 492 492 int iRow = 0; 493 493 … … 496 496 m_pLabel = new QLabel(this); 497 497 if (m_pLabel) 498 p MainLayout->addWidget(m_pLabel, 0, iRow++, 1, 1);498 pLayout->addWidget(m_pLabel, 0, iRow++, 1, 1); 499 499 500 500 /* Create table layout: */ … … 541 541 542 542 /* Add table layout to main layout: */ 543 p MainLayout->addLayout(pTableLayout, 0, iRow++, 3, 1);543 pLayout->addLayout(pTableLayout, 0, iRow++, 3, 1); 544 544 } 545 545 } -
TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIBootOrderEditor.h ¶
r93990 r94395 42 42 struct UIBootItemData 43 43 { 44 /** Constructs bootitem data. */44 /** Constructs item data. */ 45 45 UIBootItemData() 46 46 : m_enmType(KDeviceType_Null) … … 57 57 } 58 58 59 /** Holds the bootdevice type. */59 /** Holds the device type. */ 60 60 KDeviceType m_enmType; 61 /** Holds whether the bootdevice enabled. */61 /** Holds whether the device enabled. */ 62 62 bool m_fEnabled; 63 63 }; … … 69 69 namespace UIBootDataTools 70 70 { 71 /** Loads bootitem list for passed @a comMachine. */71 /** Loads item list for passed @a comMachine. */ 72 72 SHARED_LIBRARY_STUFF UIBootItemDataList loadBootItems(const CMachine &comMachine); 73 73 /** Saves @a bootItems list to passed @a comMachine. */ … … 92 92 public: 93 93 94 /** Constructs boot ordereditor passing @a pParent to the base-class.94 /** Constructs editor passing @a pParent to the base-class. 95 95 * @param fWithLabel Brings whether we should add label ourselves. */ 96 96 UIBootOrderEditor(QWidget *pParent = 0, bool fWithLabel = false); … … 111 111 private slots: 112 112 113 /** Handles current bootitem change. */113 /** Handles current item change. */ 114 114 void sltHandleCurrentBootItemChange(); 115 115 -
TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIColorThemeEditor.cpp ¶
r94145 r94395 38 38 void UIColorThemeEditor::setValue(UIColorThemeType enmValue) 39 39 { 40 if (m_pCombo) 40 /* Update cached value and 41 * combo if value has changed: */ 42 if (m_enmValue != enmValue) 41 43 { 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(); 54 46 } 55 47 } … … 75 67 } 76 68 77 void UIColorThemeEditor::sltHandleCurrentIndexChanged()78 {79 if (m_pCombo)80 emit sigValueChanged(m_pCombo->itemData(m_pCombo->currentIndex()).value<UIColorThemeType>());81 }82 83 69 void UIColorThemeEditor::prepare() 84 70 { 85 71 /* Create main layout: */ 86 QGridLayout *p MainLayout = new QGridLayout(this);87 if (p MainLayout)72 QGridLayout *pLayout = new QGridLayout(this); 73 if (pLayout) 88 74 { 89 p MainLayout->setContentsMargins(0, 0, 0, 0);75 pLayout->setContentsMargins(0, 0, 0, 0); 90 76 91 77 /* Create label: */ 92 78 m_pLabel = new QLabel(this); 93 79 if (m_pLabel) 94 p MainLayout->addWidget(m_pLabel, 0, 0);80 pLayout->addWidget(m_pLabel, 0, 0); 95 81 96 82 /* Create combo layout: */ … … 106 92 if (m_pLabel) 107 93 m_pLabel->setBuddy(m_pCombo); 108 connect(m_pCombo, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged),109 this, &UIColorThemeEditor::sltHandleCurrentIndexChanged);110 94 pComboLayout->addWidget(m_pCombo); 111 95 } … … 115 99 116 100 /* Add combo-layout into main-layout: */ 117 p MainLayout->addLayout(pComboLayout, 0, 1);101 pLayout->addLayout(pComboLayout, 0, 1); 118 102 } 119 103 } … … 143 127 m_pCombo->addItem(QString(), QVariant::fromValue(enmType)); 144 128 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 145 134 /* Retranslate finally: */ 146 135 retranslateUi(); -
TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIColorThemeEditor.h ¶
r94145 r94395 39 39 Q_OBJECT; 40 40 41 signals:42 43 /** Notifies listeners about @a enmValue change. */44 void sigValueChanged(UIColorThemeType enmValue);45 46 41 public: 47 42 48 /** Constructs color themeeditor passing @a pParent to the base-class. */43 /** Constructs editor passing @a pParent to the base-class. */ 49 44 UIColorThemeEditor(QWidget *pParent = 0); 50 45 … … 59 54 virtual void retranslateUi() RT_OVERRIDE; 60 55 61 private slots:62 63 /** Handles current index change. */64 void sltHandleCurrentIndexChanged();65 66 56 private: 67 57 … … 70 60 /** Populates combo. */ 71 61 void populateCombo(); 72 73 /** Holds whether descriptive label should be created. */74 bool m_fWithLabel;75 62 76 63 /** Holds the value to be selected. */ -
TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIDefaultMachineFolderEditor.cpp ¶
r93935 r94395 38 38 void UIDefaultMachineFolderEditor::setValue(const QString &strValue) 39 39 { 40 if (m_pSelector) 40 /* Update cached value and editor 41 * if value has changed: */ 42 if (m_strValue != strValue) 41 43 { 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); 49 47 } 50 48 } … … 57 55 int UIDefaultMachineFolderEditor::minimumLabelHorizontalHint() const 58 56 { 59 return m_pLabel ->minimumSizeHint().width();57 return m_pLabel ? m_pLabel->minimumSizeHint().width() : 0; 60 58 } 61 59 … … 73 71 m_pSelector->setToolTip(tr("Holds the path to the default virtual machine folder. This folder is used, " 74 72 "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());81 73 } 82 74 … … 105 97 m_pLabel->setBuddy(m_pSelector); 106 98 m_pSelector->setInitialPath(uiCommon().homeFolder()); 107 connect(m_pSelector, &UIFilePathSelector::pathChanged,108 this, &UIDefaultMachineFolderEditor::sltHandleSelectorPathChanged);109 99 110 100 m_pLayout->addWidget(m_pSelector, 0, 1); -
TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIDefaultMachineFolderEditor.h ¶
r93990 r94395 39 39 Q_OBJECT; 40 40 41 signals:42 43 /** Notifies listeners about @a enmValue change. */44 void sigValueChanged(const QString &strValue);45 46 41 public: 47 42 … … 64 59 virtual void retranslateUi() RT_OVERRIDE; 65 60 66 private slots:67 68 /** Handles selector path change. */69 void sltHandleSelectorPathChanged();70 71 61 private: 72 62 -
TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIGlobalDisplayFeaturesEditor.cpp ¶
r94248 r94395 41 41 void UIGlobalDisplayFeaturesEditor::setActivateOnMouseHover(bool fOn) 42 42 { 43 if (m_pCheckBoxActivateOnMouseHover) 43 /* Update cached value and 44 * check-box if value has changed: */ 45 if (m_fActivateOnMouseHover != fOn) 44 46 { 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); 52 50 } 53 51 } … … 62 60 void UIGlobalDisplayFeaturesEditor::setDisableHostScreenSaver(bool fOn) 63 61 { 64 if (m_pCheckBoxDisableHostScreenSaver) 62 /* Update cached value and 63 * check-box if value has changed: */ 64 if (m_fDisableHostScreenSaver != fOn) 65 65 { 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); 73 69 } 74 70 } … … 83 79 int UIGlobalDisplayFeaturesEditor::minimumLabelHorizontalHint() const 84 80 { 85 return m_pLabel ->minimumSizeHint().width();81 return m_pLabel ? m_pLabel->minimumSizeHint().width() : 0; 86 82 } 87 83 … … 96 92 if (m_pLabel) 97 93 m_pLabel->setText(tr("Extended Features:")); 94 98 95 if (m_pCheckBoxActivateOnMouseHover) 99 96 { 97 m_pCheckBoxActivateOnMouseHover->setText(tr("&Raise Window Under Mouse Pointer")); 100 98 m_pCheckBoxActivateOnMouseHover->setToolTip(tr("When checked, machine windows will be raised " 101 99 "when the mouse pointer moves over them.")); 102 m_pCheckBoxActivateOnMouseHover->setText(tr("&Raise Window Under Mouse Pointer"));103 100 } 101 104 102 if (m_pCheckBoxDisableHostScreenSaver) 105 103 { 104 m_pCheckBoxDisableHostScreenSaver->setText(tr("&Disable Host Screen Saver")); 106 105 m_pCheckBoxDisableHostScreenSaver->setToolTip(tr("When checked, screen saver of " 107 106 "the host OS is disabled.")); 108 m_pCheckBoxDisableHostScreenSaver->setText(tr("&Disable Host Screen Saver"));109 107 } 110 108 } -
TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIGlobalDisplayFeaturesEditor.h ¶
r94248 r94395 37 37 public: 38 38 39 /** Constructs global display featureseditor passing @a pParent to the base-class. */39 /** Constructs editor passing @a pParent to the base-class. */ 40 40 UIGlobalDisplayFeaturesEditor(QWidget *pParent = 0); 41 41 … … 65 65 void prepare(); 66 66 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 /** @} */ 71 74 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 /** @} */ 80 86 }; 81 87 -
TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIGlobalProxyFeaturesEditor.cpp ¶
r94251 r94395 105 105 if (m_pRadioButtonProxyAuto) 106 106 { 107 m_pRadioButtonProxyAuto->setText(tr("&Auto-detect Host Proxy Settings")); 107 108 m_pRadioButtonProxyAuto->setToolTip(tr("When chosen, VirtualBox will try to auto-detect host proxy settings for tasks " 108 109 "like downloading Guest Additions from the network or checking for updates.")); 109 m_pRadioButtonProxyAuto->setText(tr("&Auto-detect Host Proxy Settings"));110 110 } 111 111 if (m_pRadioButtonProxyDisabled) 112 112 { 113 m_pRadioButtonProxyDisabled->setText(tr("&Direct Connection to the Internet")); 113 114 m_pRadioButtonProxyDisabled->setToolTip(tr("When chosen, VirtualBox will use direct Internet connection for tasks like " 114 115 "downloading Guest Additions from the network or checking for updates.")); 115 m_pRadioButtonProxyDisabled->setText(tr("&Direct Connection to the Internet"));116 116 } 117 117 if (m_pRadioButtonProxyEnabled) 118 118 { 119 m_pRadioButtonProxyEnabled->setText(tr("&Manual Proxy Configuration")); 119 120 m_pRadioButtonProxyEnabled->setToolTip(tr("When chosen, VirtualBox will use the proxy settings supplied for tasks like " 120 121 "downloading Guest Additions from the network or checking for updates.")); 121 m_pRadioButtonProxyEnabled->setText(tr("&Manual Proxy Configuration"));122 122 } 123 123 -
TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIGlobalProxyFeaturesEditor.h ¶
r94251 r94395 48 48 public: 49 49 50 /** Constructs global proxy featureseditor passing @a pParent to the base-class. */50 /** Constructs editor passing @a pParent to the base-class. */ 51 51 UIGlobalProxyFeaturesEditor(QWidget *pParent = 0); 52 52 … … 76 76 void prepare(); 77 77 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 /** @} */ 82 85 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 /** @} */ 97 103 }; 98 104 -
TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIGraphicsControllerEditor.cpp ¶
r94358 r94395 43 43 void UIGraphicsControllerEditor::setValue(KGraphicsControllerType enmValue) 44 44 { 45 if (m_pCombo) 45 /* Update cached value and 46 * combo if value has changed: */ 47 if (m_enmValue != enmValue) 46 48 { 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(); 59 51 } 60 52 } … … 67 59 int UIGraphicsControllerEditor::minimumLabelHorizontalHint() const 68 60 { 69 return m_pLabel ->minimumSizeHint().width();61 return m_pLabel ? m_pLabel->minimumSizeHint().width() : 0; 70 62 } 71 63 … … 166 158 m_pCombo->addItem(QString(), QVariant::fromValue(enmType)); 167 159 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 168 165 /* Retranslate finally: */ 169 166 retranslateUi(); -
TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIGraphicsControllerEditor.h ¶
r94358 r94395 49 49 public: 50 50 51 /** Constructs graphics controllereditor passing @a pParent to the base-class. */51 /** Constructs editor passing @a pParent to the base-class. */ 52 52 UIGraphicsControllerEditor(QWidget *pParent = 0); 53 53 -
TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIHostComboEditor.h ¶
r94064 r94395 100 100 public: 101 101 102 /** Constructs host-combowrapper on the basis of passed @a strHostCombo. */102 /** Constructs wrapper on the basis of passed @a strHostCombo. */ 103 103 UIHostComboWrapper(const QString &strHostCombo = QString()) 104 104 : m_strHostCombo(strHostCombo) … … 129 129 public: 130 130 131 /** Constructs host-comboeditor passing @a pParent to the base-class. */131 /** Constructs editor passing @a pParent to the base-class. */ 132 132 UIHostComboEditor(QWidget *pParent); 133 133 … … 171 171 public: 172 172 173 /** Constructs host-comboeditor private part. */173 /** Constructs editor private part. */ 174 174 UIHostComboEditorPrivate(); 175 /** Destructs host-comboeditor private part. */175 /** Destructs editor private part. */ 176 176 ~UIHostComboEditorPrivate(); 177 177 -
TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIHotKeyEditor.h ¶
r93990 r94395 111 111 public: 112 112 113 /** Constructs hot-keyeditor passing @a pParent to the base-class. */113 /** Constructs editor passing @a pParent to the base-class. */ 114 114 UIHotKeyEditor(QWidget *pParent); 115 115 -
TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UILanguageSettingsEditor.cpp ¶
r93996 r94395 212 212 void UILanguageSettingsEditor::setValue(const QString &strValue) 213 213 { 214 /* Update value if changed: */ 214 /* Update cached value and 215 * tree-widget if value has changed: */ 215 216 if (m_strValue != strValue) 216 217 { 217 /* Update value itself: */218 218 m_strValue = strValue; 219 220 /* Update tree-widget if present: */221 219 if (m_pTreeWidget) 222 220 reloadLanguageTree(m_strValue); … … 321 319 322 320 void UILanguageSettingsEditor::prepare() 323 {324 /* Prepare everything: */325 prepareWidgets();326 prepareConnections();327 328 /* Apply language settings: */329 retranslateUi();330 }331 332 void UILanguageSettingsEditor::prepareWidgets()333 321 { 334 322 /* Prepare main layout: */ … … 369 357 } 370 358 } 371 } 372 373 void UILanguageSettingsEditor::prepareConnections() 374 { 359 360 /* Prepare connections: */ 375 361 connect(m_pTreeWidget, &QITreeWidget::painted, this, &UILanguageSettingsEditor::sltHandleItemPainting); 376 362 connect(m_pTreeWidget, &QITreeWidget::currentItemChanged, this, &UILanguageSettingsEditor::sltHandleCurrentItemChange); 363 364 /* Apply language settings: */ 365 retranslateUi(); 377 366 } 378 367 -
TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UILanguageSettingsEditor.h ¶
r93990 r94395 38 38 public: 39 39 40 /** Constructs language settingseditor passing @a pParent to the base-class. */40 /** Constructs editor passing @a pParent to the base-class. */ 41 41 UILanguageSettingsEditor(QWidget *pParent = 0); 42 42 … … 68 68 /** Prepares all. */ 69 69 void prepare(); 70 /** Prepares widgets. */71 void prepareWidgets();72 /** Prepares connections. */73 void prepareConnections();74 70 /** Cleanups all. */ 75 71 void cleanup(); -
TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIMachineAudioFeaturesEditor.cpp ¶
r94298 r94395 41 41 void UIMachineAudioFeaturesEditor::setEnableOutput(bool fOn) 42 42 { 43 if (m_pCheckBoxEnableOutput) 43 /* Update cached value and 44 * check-box if value has changed: */ 45 if (m_fEnableOutput != fOn) 44 46 { 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); 52 50 } 53 51 } … … 62 60 void UIMachineAudioFeaturesEditor::setEnableInput(bool fOn) 63 61 { 64 if (m_pCheckBoxEnableInput) 62 /* Update cached value and 63 * check-box if value has changed: */ 64 if (m_fEnableInput != fOn) 65 65 { 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); 73 69 } 74 70 } … … 83 79 int UIMachineAudioFeaturesEditor::minimumLabelHorizontalHint() const 84 80 { 85 return m_pLabel ->minimumSizeHint().width();81 return m_pLabel ? m_pLabel->minimumSizeHint().width() : 0; 86 82 } 87 83 -
TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIMachineAudioFeaturesEditor.h ¶
r94298 r94395 37 37 public: 38 38 39 /** Constructs machine audio featureseditor passing @a pParent to the base-class. */39 /** Constructs editor passing @a pParent to the base-class. */ 40 40 UIMachineAudioFeaturesEditor(QWidget *pParent = 0); 41 41 … … 65 65 void prepare(); 66 66 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 /** @} */ 71 74 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 /** @} */ 80 86 }; 81 87 -
TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIMachineDisplayScreenFeaturesEditor.cpp ¶
r94361 r94395 43 43 { 44 44 m_fEnable3DAcceleration = fOn; 45 m_pCheckBoxEnable3DAcceleration->setCheckState( fOn ? Qt::Checked : Qt::Unchecked);45 m_pCheckBoxEnable3DAcceleration->setCheckState(m_fEnable3DAcceleration ? Qt::Checked : Qt::Unchecked); 46 46 } 47 47 } … … 57 57 int UIMachineDisplayScreenFeaturesEditor::minimumLabelHorizontalHint() const 58 58 { 59 return m_pLabel ->minimumSizeHint().width();59 return m_pLabel ? m_pLabel->minimumSizeHint().width() : 0; 60 60 } 61 61 -
TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIMachineDisplayScreenFeaturesEditor.h ¶
r94361 r94395 42 42 public: 43 43 44 /** Constructs machine display screen featureseditor passing @a pParent to the base-class. */44 /** Constructs editor passing @a pParent to the base-class. */ 45 45 UIMachineDisplayScreenFeaturesEditor(QWidget *pParent = 0); 46 46 … … 65 65 void prepare(); 66 66 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 /** @} */ 69 72 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 /** @} */ 76 82 }; 77 83 -
TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIMaximumGuestScreenSizeEditor.cpp ¶
r94289 r94395 75 75 if (m_pComboPolicy) 76 76 { 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)); 78 78 if (iIndex != -1) 79 79 { … … 85 85 if (m_pSpinboxMaxWidth && m_pSpinboxMaxHeight) 86 86 { 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()); 91 91 } 92 92 } … … 161 161 if (m_pSpinboxMaxHeight) 162 162 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());175 163 } 176 164 } … … 223 211 m_pSpinboxMaxWidth->setMinimum(iMinWidth); 224 212 m_pSpinboxMaxWidth->setMaximum(iMaxSize); 225 connect(m_pSpinboxMaxWidth, static_cast<void(QSpinBox::*)(int)>(&QSpinBox::valueChanged),226 this, &UIMaximumGuestScreenSizeEditor::sltHandleSizeChanged);227 213 228 214 m_pLayout->addWidget(m_pSpinboxMaxWidth, 1, 1); … … 244 230 m_pSpinboxMaxHeight->setMinimum(iMinHeight); 245 231 m_pSpinboxMaxHeight->setMaximum(iMaxSize); 246 connect(m_pSpinboxMaxHeight, static_cast<void(QSpinBox::*)(int)>(&QSpinBox::valueChanged),247 this, &UIMaximumGuestScreenSizeEditor::sltHandleSizeChanged);248 232 249 233 m_pLayout->addWidget(m_pSpinboxMaxHeight, 2, 1); … … 266 250 267 251 /* Init currently supported maximum guest size policy types: */ 268 QList<MaximumGuestScreenSizePolicy> supportedValues= QList<MaximumGuestScreenSizePolicy>()269 << MaximumGuestScreenSizePolicy_Automatic270 << MaximumGuestScreenSizePolicy_Any271 << MaximumGuestScreenSizePolicy_Fixed;252 const QList<MaximumGuestScreenSizePolicy> supportedValues = QList<MaximumGuestScreenSizePolicy>() 253 << MaximumGuestScreenSizePolicy_Automatic 254 << MaximumGuestScreenSizePolicy_Any 255 << MaximumGuestScreenSizePolicy_Fixed; 272 256 273 257 /* Update combo with all the supported values: */ -
TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIMaximumGuestScreenSizeEditor.h ¶
r94289 r94395 64 64 Q_OBJECT; 65 65 66 signals:67 68 /** Notifies listeners about @a guiValue change. */69 void sigValueChanged(const UIMaximumGuestScreenSizeValue &guiValue);70 71 66 public: 72 67 73 /** Constructs maximum guest screen sizeeditor passing @a pParent to the base-class. */68 /** Constructs editor passing @a pParent to the base-class. */ 74 69 UIMaximumGuestScreenSizeEditor(QWidget *pParent = 0); 75 70 … … 93 88 /** Handles current policy index change. */ 94 89 void sltHandleCurrentPolicyIndexChanged(); 95 /** Handles size change. */96 void sltHandleSizeChanged();97 90 98 91 private: … … 106 99 UIMaximumGuestScreenSizeValue m_guiValue; 107 100 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 /** @} */ 122 118 }; 123 119 -
TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIMonitorCountEditor.cpp ¶
r94362 r94395 64 64 int UIMonitorCountEditor::minimumLabelHorizontalHint() const 65 65 { 66 return m_pLabel ->minimumSizeHint().width();66 return m_pLabel ? m_pLabel->minimumSizeHint().width() : 0; 67 67 } 68 68 -
TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIMonitorCountEditor.h ¶
r94362 r94395 47 47 public: 48 48 49 /** Constructs monitor counteditor passing @a pParent to the base-class. */49 /** Constructs editor passing @a pParent to the base-class. */ 50 50 UIMonitorCountEditor(QWidget *pParent = 0); 51 51 … … 83 83 int m_iValue; 84 84 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 /** @} */ 97 100 }; 98 101 -
TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UINameAndSystemEditor.h ¶
r94030 r94395 76 76 public: 77 77 78 /** Constructs VM parameterseditor passing @a pParent to the base-class.78 /** Constructs editor passing @a pParent to the base-class. 79 79 * @param fChooseName Controls whether we should propose to choose name. 80 80 * @param fChoosePath Controls whether we should propose to choose path. … … 173 173 ulong selectedEditionIndex() const; 174 174 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 /** @} */ 234 247 }; 235 248 -
TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UINetworkAttachmentEditor.h ¶
r94058 r94395 54 54 public: 55 55 56 /** Constructs network attachmenteditor passing @a pParent to the base-class.56 /** Constructs editor passing @a pParent to the base-class. 57 57 * @param fWithLabels Brings whether we should add labels ourselves. */ 58 58 UINetworkAttachmentEditor(QWidget *pParent = 0, bool fWithLabels = false); -
TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIScaleFactorEditor.h ¶
r94357 r94395 43 43 public: 44 44 45 /** C reates scale factoreditor passing @a pParent to the base-class. */45 /** Constructs editor passing @a pParent to the base-class. */ 46 46 UIScaleFactorEditor(QWidget *pParent); 47 47 -
TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIShortcutConfigurationEditor.h ¶
r93990 r94395 37 37 public: 38 38 39 /** Constructs s hortcut search functor. */39 /** Constructs search functor. */ 40 40 UIShortcutSearchFunctor() {} 41 41 … … 59 59 public: 60 60 61 /** Constructs shortcut configurationitem on the basis of passed arguments.61 /** Constructs item on the basis of passed arguments. 62 62 * @param strKey Brings the unique key identifying held sequence. 63 63 * @param strScope Brings the scope of the held sequence. … … 77 77 {} 78 78 79 /** Constructs shortcut configurationitem on the basis of @a another one. */79 /** Constructs item on the basis of @a another one. */ 80 80 UIShortcutConfigurationItem(const UIShortcutConfigurationItem &another) 81 81 : m_strKey(another.key()) … … 157 157 public: 158 158 159 /** Constructs shortcut configurationeditor passing @a pParent to the base-class. */159 /** Constructs editor passing @a pParent to the base-class. */ 160 160 UIShortcutConfigurationEditor(QWidget *pParent = 0); 161 161 -
TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIUpdateSettingsEditor.cpp ¶
r94059 r94395 44 44 void UIUpdateSettingsEditor::setValue(const VBoxUpdateData &guiValue) 45 45 { 46 /* Update value if changed: */ 46 /* Update cached value and 47 * widgets if value has changed: */ 47 48 if (m_guiValue != guiValue) 48 49 { 49 /* Update value itself: */50 50 m_guiValue = guiValue; 51 51 52 /* Update check-box if present: */53 52 if (m_pCheckBox) 54 53 { … … 57 56 if (m_pCheckBox->isChecked()) 58 57 { 59 /* Update period combo if present: */60 58 if (m_pComboUpdatePeriod) 61 59 m_pComboUpdatePeriod->setCurrentIndex(m_guiValue.periodIndex()); 62 63 /* Update branch radio-buttons if present: */64 60 if (m_mapRadioButtons.value(m_guiValue.branchIndex())) 65 61 m_mapRadioButtons.value(m_guiValue.branchIndex())->setChecked(true); 66 62 } 67 63 68 /* Update other related widgets: */69 64 sltHandleUpdateToggle(m_pCheckBox->isChecked()); 70 65 } … … 162 157 { 163 158 /* Prepare main layout: */ 164 QGridLayout *pLayout Main= new QGridLayout(this);165 if (pLayout Main)166 { 167 pLayout Main->setContentsMargins(0, 0, 0, 0);168 pLayout Main->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); 169 164 170 165 /* Prepare update check-box: */ 171 166 m_pCheckBox = new QCheckBox(this); 172 167 if (m_pCheckBox) 173 pLayout Main->addWidget(m_pCheckBox, 0, 0, 1, 2);168 pLayout->addWidget(m_pCheckBox, 0, 0, 1, 2); 174 169 175 170 /* Prepare 20-px shifting spacer: */ 176 171 QSpacerItem *pSpacerItem = new QSpacerItem(20, 0, QSizePolicy::Fixed, QSizePolicy::Minimum); 177 172 if (pSpacerItem) 178 pLayout Main->addItem(pSpacerItem, 1, 0);173 pLayout->addItem(pSpacerItem, 1, 0); 179 174 180 175 /* Prepare update settings widget: */ … … 256 251 } 257 252 258 pLayout Main->addWidget(m_pWidgetUpdateSettings, 1, 1);253 pLayout->addWidget(m_pWidgetUpdateSettings, 1, 1); 259 254 } 260 255 } -
TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIUpdateSettingsEditor.h ¶
r94059 r94395 43 43 public: 44 44 45 /** Constructs update settingseditor passing @a pParent to the base-class. */45 /** Constructs editor passing @a pParent to the base-class. */ 46 46 UIUpdateSettingsEditor(QWidget *pParent = 0); 47 47 -
TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIVRDEAuthLibraryEditor.cpp ¶
r93935 r94395 37 37 void UIVRDEAuthLibraryEditor::setValue(const QString &strValue) 38 38 { 39 if (m_pSelector) 39 /* Update cached value and 40 * editor if value has changed: */ 41 if (m_strValue != strValue) 40 42 { 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) 46 45 m_pSelector->setPath(strValue); 47 }48 46 } 49 47 } … … 56 54 int UIVRDEAuthLibraryEditor::minimumLabelHorizontalHint() const 57 55 { 58 return m_pLabel ->minimumSizeHint().width();56 return m_pLabel ? m_pLabel->minimumSizeHint().width() : 0; 59 57 } 60 58 … … 72 70 m_pSelector->setToolTip(tr("Holds the path to the library that provides " 73 71 "authentication for Remote Display (VRDP) clients.")); 74 }75 76 void UIVRDEAuthLibraryEditor::sltHandleSelectorPathChanged()77 {78 if (m_pSelector)79 emit sigValueChanged(m_pSelector->path());80 72 } 81 73 … … 105 97 m_pSelector->setInitialPath(uiCommon().homeFolder()); 106 98 m_pSelector->setMode(UIFilePathSelector::Mode_File_Open); 107 connect(m_pSelector, &UIFilePathSelector::pathChanged,108 this, &UIVRDEAuthLibraryEditor::sltHandleSelectorPathChanged);109 99 110 100 m_pLayout->addWidget(m_pSelector, 0, 1); -
TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIVRDEAuthLibraryEditor.h ¶
r93990 r94395 39 39 Q_OBJECT; 40 40 41 signals:42 43 /** Notifies listeners about @a enmValue change. */44 void sigValueChanged(const QString &strValue);45 46 41 public: 47 42 … … 64 59 virtual void retranslateUi() RT_OVERRIDE; 65 60 66 private slots:67 68 /** Handles selector path change. */69 void sltHandleSelectorPathChanged();70 71 61 private: 72 62 -
TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIVRDESettingsEditor.cpp ¶
r94378 r94395 49 49 void UIVRDESettingsEditor::setFeatureEnabled(bool fEnabled) 50 50 { 51 /* Update cached value and 52 * check-box if value has changed: */ 51 53 if (m_fFeatureEnabled != fEnabled) 52 54 { … … 75 77 void UIVRDESettingsEditor::setPort(const QString &strPort) 76 78 { 79 /* Update cached value and 80 * line-edit if value has changed: */ 77 81 if (m_strPort != strPort) 78 82 { … … 90 94 void UIVRDESettingsEditor::setAuthType(const KAuthType &enmType) 91 95 { 96 /* Update cached value and 97 * combo if value has changed: */ 92 98 if (m_enmAuthType != enmType) 93 99 { 94 100 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(); 104 102 } 105 103 } … … 112 110 void UIVRDESettingsEditor::setTimeout(const QString &strTimeout) 113 111 { 112 /* Update cached value and 113 * line-edit if value has changed: */ 114 114 if (m_strTimeout != strTimeout) 115 115 { … … 127 127 void UIVRDESettingsEditor::setMultipleConnectionsAllowed(bool fAllowed) 128 128 { 129 /* Update cached value and 130 * check-box if value has changed: */ 129 131 if (m_fMultipleConnectionsAllowed != fAllowed) 130 132 { … … 226 228 if (m_pWidgetSettings) 227 229 { 228 /* Update widget availability: */229 sltHandleFeatureToggled(m_pCheckboxFeature->isChecked());230 231 230 /* Prepare 'settings' layout: */ 232 231 QGridLayout *pLayoutRemoteDisplaySettings = new QGridLayout(m_pWidgetSettings); … … 307 306 } 308 307 } 308 309 /* Update widget availability: */ 310 if (m_pCheckboxFeature) 311 sltHandleFeatureToggled(m_pCheckboxFeature->isChecked()); 309 312 } 310 313 … … 338 341 foreach (const KAuthType &enmType, authTypes) 339 342 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 21 21 # pragma once 22 22 #endif 23 24 /* Qt includes: */25 #include <QMap>26 23 27 24 /* GUI includes: */ … … 50 47 public: 51 48 52 /** Constructs VRDE settingseditor passing @a pParent to the base-class. */49 /** Constructs editor passing @a pParent to the base-class. */ 53 50 UIVRDESettingsEditor(QWidget *pParent = 0); 54 51 … … 103 100 void repopulateComboAuthType(); 104 101 105 /** @name Va riables102 /** @name Values 106 103 * @{ */ 107 104 /** Holds whether feature is enabled. */ -
TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIVideoMemoryEditor.cpp ¶
r94341 r94395 34 34 UIVideoMemoryEditor::UIVideoMemoryEditor(QWidget *pParent /* = 0 */) 35 35 : QIWithRetranslateUI<QWidget>(pParent) 36 , m_iValue(0) 36 37 , m_comGuestOSType(CGuestOSType()) 37 38 , m_cGuestScreenCount(1) … … 44 45 , m_iMaxVRAM(0) 45 46 , m_iMaxVRAMVisible(0) 46 , m_iInitialVRAM(0)47 47 , m_pLayout(0) 48 48 , m_pLabelMemory(0) … … 57 57 void UIVideoMemoryEditor::setValue(int iValue) 58 58 { 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(); 63 69 } 64 70 } … … 66 72 int UIVideoMemoryEditor::value() const 67 73 { 68 return m_pSlider ? m_pSlider->value() : 0;74 return m_pSlider ? m_pSlider->value() : m_iValue; 69 75 } 70 76 71 77 void UIVideoMemoryEditor::setGuestOSType(const CGuestOSType &comGuestOSType) 72 78 { 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 } 82 89 } 83 90 84 91 void UIVideoMemoryEditor::setGuestScreenCount(int cGuestScreenCount) 85 92 { 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 } 95 103 } 96 104 97 105 void UIVideoMemoryEditor::setGraphicsControllerType(const KGraphicsControllerType &enmGraphicsControllerType) 98 106 { 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 } 108 117 } 109 118 … … 111 120 void UIVideoMemoryEditor::set3DAccelerationSupported(bool fSupported) 112 121 { 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 } 122 132 } 123 133 124 134 void UIVideoMemoryEditor::set3DAccelerationEnabled(bool fEnabled) 125 135 { 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 } 135 146 } 136 147 #endif /* VBOX_WITH_3D_ACCELERATION */ … … 315 326 m_iMaxVRAMVisible = 256; 316 327 } 317 #endif 328 #endif /* VBOX_WITH_3D_ACCELERATION */ 318 329 319 330 /* Adjust visible maximum VRAM to be no less than initial VRAM: */ 320 m_iMaxVRAMVisible = qMax(m_iMaxVRAMVisible, m_i InitialVRAM);331 m_iMaxVRAMVisible = qMax(m_iMaxVRAMVisible, m_iValue); 321 332 /* Adjust visible maximum VRAM to be no less than recommended VRAM: */ 322 333 m_iMaxVRAMVisible = qMax(m_iMaxVRAMVisible, iNeedMBytes); -
TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIVideoMemoryEditor.h ¶
r94341 r94395 51 51 public: 52 52 53 /** Constructs video-memoryeditor passing @a pParent to the base-class. */53 /** Constructs editor passing @a pParent to the base-class. */ 54 54 UIVideoMemoryEditor(QWidget *pParent = 0); 55 55 … … 106 106 static int calculatePageStep(int iMax); 107 107 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; 114 119 #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; 119 124 #endif 120 125 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 /** @} */ 131 135 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 /** @} */ 144 151 }; 145 152 -
TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIVirtualCPUEditor.h ¶
r93990 r94395 46 46 public: 47 47 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. */ 49 50 UIVirtualCPUEditor(QWidget *pParent = 0, bool fWithLabel = false); 50 51 -
TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIVisualStateEditor.cpp ¶
r94148 r94395 41 41 void UIVisualStateEditor::setMachineId(const QUuid &uMachineId) 42 42 { 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 } 44 50 } 45 51 46 52 void UIVisualStateEditor::setValue(UIVisualStateType enmValue) 47 53 { 48 if (m_pCombo) 54 /* Update cached value and 55 * combo if value has changed: */ 56 if (m_enmValue != enmValue) 49 57 { 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(); 62 60 } 63 61 } … … 70 68 int UIVisualStateEditor::minimumLabelHorizontalHint() const 71 69 { 72 return m_pLabel ->minimumSizeHint().width();70 return m_pLabel ? m_pLabel->minimumSizeHint().width() : 0; 73 71 } 74 72 … … 93 91 "as soon as possible, otherwise desired one will be defined.")); 94 92 } 95 }96 97 void UIVisualStateEditor::sltHandleCurrentIndexChanged()98 {99 if (m_pCombo)100 emit sigValueChanged(m_pCombo->itemData(m_pCombo->currentIndex()).value<UIVisualStateType>());101 93 } 102 94 … … 129 121 if (m_pLabel) 130 122 m_pLabel->setBuddy(m_pCombo); 131 connect(m_pCombo, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged),132 this, &UIVisualStateEditor::sltHandleCurrentIndexChanged);133 123 pComboLayout->addWidget(m_pCombo); 134 124 } … … 181 171 m_pCombo->addItem(QString(), QVariant::fromValue(enmType)); 182 172 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 183 178 /* Retranslate finally: */ 184 179 retranslateUi(); -
TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIVisualStateEditor.h ¶
r94148 r94395 41 41 Q_OBJECT; 42 42 43 signals:44 45 /** Notifies listeners about @a enmValue change. */46 void sigValueChanged(UIVisualStateType enmValue);47 48 43 public: 49 44 50 /** Constructs visual stateeditor passing @a pParent to the base-class. */45 /** Constructs editor passing @a pParent to the base-class. */ 51 46 UIVisualStateEditor(QWidget *pParent = 0); 52 47 … … 71 66 /** Handles translation event. */ 72 67 virtual void retranslateUi() RT_OVERRIDE; 73 74 private slots:75 76 /** Handles current index change. */77 void sltHandleCurrentIndexChanged();78 68 79 69 private:
Note:
See TracChangeset
for help on using the changeset viewer.