Changeset 85680 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Aug 11, 2020 9:33:36 AM (4 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 1 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/VBoxUI.pro
r85679 r85680 36 36 src/settings/machine/UIMachineSettingsDisplay.ui \ 37 37 src/settings/machine/UIMachineSettingsStorage.ui \ 38 src/settings/machine/UIMachineSettingsAudio.ui \39 38 src/settings/machine/UIMachineSettingsNetwork.ui \ 40 39 src/settings/machine/UIMachineSettingsSerial.ui \ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsAudio.cpp
r82968 r85680 16 16 */ 17 17 18 /* Qt includes: */ 19 #include <QCheckBox> 20 #include <QLabel> 21 #include <QVBoxLayout> 22 18 23 /* GUI includes: */ 24 #include "UIAudioControllerEditor.h" 25 #include "UIAudioHostDriverEditor.h" 19 26 #include "UIConverter.h" 27 #include "UIErrorString.h" 20 28 #include "UIMachineSettingsAudio.h" 21 #include "UIErrorString.h"22 29 23 30 /* COM includes: */ … … 69 76 UIMachineSettingsAudio::UIMachineSettingsAudio() 70 77 : m_pCache(0) 78 , m_pAudioHostDriverLabel(0) 79 , m_pAudioControllerLabel(0) 80 , m_pLabelAudioExtended(0) 81 , m_pContainerAudioSubOptions(0) 82 , m_pAudioHostDriverEditor(0) 83 , m_pAudioControllerEditor(0) 71 84 { 72 85 /* Prepare: */ … … 161 174 void UIMachineSettingsAudio::retranslateUi() 162 175 { 163 /* Translate generated strings: */ 164 Ui::UIMachineSettingsAudio::retranslateUi(this); 176 m_pCheckBoxAudio->setWhatsThis(QApplication::translate("UIMachineSettingsAudio", "When checked, a virtual PCI audio card" 177 "will be plugged into the virtual machine and will communicate with" 178 "the host audio system using the specified driver.")); 179 m_pCheckBoxAudio->setText(QApplication::translate("UIMachineSettingsAudio", "Enable &Audio")); 180 m_pAudioHostDriverLabel->setText(QApplication::translate("UIMachineSettingsAudio", "Host Audio &Driver:")); 181 m_pAudioHostDriverEditor->setWhatsThis(QApplication::translate("UIMachineSettingsAudio", "Selects the audio output driver." 182 "The <b>Null Audio Driver</b> makes the guest see an audio card," 183 "however every access to it will be ignored.")); 184 m_pAudioControllerLabel->setText(QApplication::translate("UIMachineSettingsAudio", "Audio &Controller:")); 185 m_pAudioControllerEditor->setWhatsThis(QApplication::translate("UIMachineSettingsAudio", "Selects the type of the virtual sound" 186 "card. Depending on this value, VirtualBox will provide different" 187 "audio hardware to the virtual machine.")); 188 m_pLabelAudioExtended->setText(QApplication::translate("UIMachineSettingsAudio", "Extended Features:")); 189 m_pCheckBoxAudioOutput->setWhatsThis(QApplication::translate("UIMachineSettingsAudio", "When checked, output to the virtual" 190 "audio device will reach the host. Otherwise the guest is muted.")); 191 m_pCheckBoxAudioOutput->setText(QApplication::translate("UIMachineSettingsAudio", "Enable Audio &Output")); 192 m_pCheckBoxAudioInput->setWhatsThis(QApplication::translate("UIMachineSettingsAudio", "When checked, the guest will be able" 193 "to capture audio input from the host. Otherwise the guest will" 194 "capture only silence.")); 195 m_pCheckBoxAudioInput->setText(QApplication::translate("UIMachineSettingsAudio", "Enable Audio &Input")); 196 165 197 } 166 198 … … 181 213 void UIMachineSettingsAudio::prepare() 182 214 { 183 /* Apply UI decorations: */ 184 Ui::UIMachineSettingsAudio::setupUi(this); 215 prepareWidgets(); 185 216 186 217 /* Prepare cache: */ … … 211 242 } 212 243 244 void UIMachineSettingsAudio::prepareWidgets() 245 { 246 if (objectName().isEmpty()) 247 setObjectName(QStringLiteral("UIMachineSettingsAudio")); 248 QVBoxLayout *pMainLayout = new QVBoxLayout(this); 249 pMainLayout->setObjectName(QStringLiteral("pMainLayout")); 250 QWidget *pContainerAudioOptions = new QWidget(); 251 pContainerAudioOptions->setObjectName(QStringLiteral("pContainerAudioOptions")); 252 QGridLayout *pContainerLayoutAudioOptions = new QGridLayout(pContainerAudioOptions); 253 pContainerLayoutAudioOptions->setObjectName(QStringLiteral("pContainerLayoutAudioOptions")); 254 pContainerLayoutAudioOptions->setContentsMargins(0, 0, 0, 0); 255 m_pCheckBoxAudio = new QCheckBox(pContainerAudioOptions); 256 m_pCheckBoxAudio->setObjectName(QStringLiteral("m_pCheckBoxAudio")); 257 pContainerLayoutAudioOptions->addWidget(m_pCheckBoxAudio, 0, 0, 1, 2); 258 259 QSpacerItem *pSpacerItem = new QSpacerItem(20, 0, QSizePolicy::Fixed, QSizePolicy::Minimum); 260 pContainerLayoutAudioOptions->addItem(pSpacerItem, 1, 0, 1, 1); 261 262 m_pContainerAudioSubOptions = new QWidget(pContainerAudioOptions); 263 m_pContainerAudioSubOptions->setObjectName(QStringLiteral("m_pContainerAudioSubOptions")); 264 QGridLayout *pContainerLayoutAudioSubOptions = new QGridLayout(m_pContainerAudioSubOptions); 265 pContainerLayoutAudioSubOptions->setContentsMargins(0, 0, 0, 0); 266 pContainerLayoutAudioSubOptions->setObjectName(QStringLiteral("pContainerLayoutAudioSubOptions")); 267 pContainerLayoutAudioSubOptions->setContentsMargins(0, 0, 0, 0); 268 m_pAudioHostDriverLabel = new QLabel(m_pContainerAudioSubOptions); 269 m_pAudioHostDriverLabel->setObjectName(QStringLiteral("m_pAudioHostDriverLabel")); 270 m_pAudioHostDriverLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); 271 pContainerLayoutAudioSubOptions->addWidget(m_pAudioHostDriverLabel, 0, 0, 1, 1); 272 273 m_pAudioHostDriverEditor = new UIAudioHostDriverEditor(m_pContainerAudioSubOptions); 274 m_pAudioHostDriverEditor->setObjectName(QStringLiteral("m_pAudioHostDriverEditor")); 275 pContainerLayoutAudioSubOptions->addWidget(m_pAudioHostDriverEditor, 0, 1, 1, 1); 276 277 m_pAudioControllerLabel = new QLabel(m_pContainerAudioSubOptions); 278 m_pAudioControllerLabel->setObjectName(QStringLiteral("m_pAudioControllerLabel")); 279 m_pAudioControllerLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); 280 pContainerLayoutAudioSubOptions->addWidget(m_pAudioControllerLabel, 1, 0, 1, 1); 281 282 m_pAudioControllerEditor = new UIAudioControllerEditor(m_pContainerAudioSubOptions); 283 m_pAudioControllerEditor->setObjectName(QStringLiteral("m_pAudioControllerEditor")); 284 pContainerLayoutAudioSubOptions->addWidget(m_pAudioControllerEditor, 1, 1, 1, 1); 285 286 m_pLabelAudioExtended = new QLabel(m_pContainerAudioSubOptions); 287 m_pLabelAudioExtended->setObjectName(QStringLiteral("m_pLabelAudioExtended")); 288 m_pLabelAudioExtended->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); 289 pContainerLayoutAudioSubOptions->addWidget(m_pLabelAudioExtended, 2, 0, 1, 1); 290 291 m_pCheckBoxAudioOutput = new QCheckBox(m_pContainerAudioSubOptions); 292 m_pCheckBoxAudioOutput->setObjectName(QStringLiteral("m_pCheckBoxAudioOutput")); 293 QSizePolicy sizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); 294 sizePolicy.setHorizontalStretch(1); 295 sizePolicy.setVerticalStretch(0); 296 sizePolicy.setHeightForWidth(m_pCheckBoxAudioOutput->sizePolicy().hasHeightForWidth()); 297 m_pCheckBoxAudioOutput->setSizePolicy(sizePolicy); 298 pContainerLayoutAudioSubOptions->addWidget(m_pCheckBoxAudioOutput, 2, 1, 1, 1); 299 300 m_pCheckBoxAudioInput = new QCheckBox(m_pContainerAudioSubOptions); 301 m_pCheckBoxAudioInput->setObjectName(QStringLiteral("m_pCheckBoxAudioInput")); 302 sizePolicy.setHeightForWidth(m_pCheckBoxAudioInput->sizePolicy().hasHeightForWidth()); 303 m_pCheckBoxAudioInput->setSizePolicy(sizePolicy); 304 pContainerLayoutAudioSubOptions->addWidget(m_pCheckBoxAudioInput, 3, 1, 1, 1); 305 306 pContainerLayoutAudioOptions->addWidget(m_pContainerAudioSubOptions, 1, 1, 1, 1); 307 pMainLayout->addWidget(pContainerAudioOptions); 308 309 QSpacerItem *pSpacerItem1 = new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding); 310 pMainLayout->addItem(pSpacerItem1); 311 312 QObject::connect(m_pCheckBoxAudio, &QCheckBox::toggled, m_pContainerAudioSubOptions, &QWidget::setEnabled); 313 } 314 213 315 void UIMachineSettingsAudio::cleanup() 214 316 { … … 278 380 return fSuccess; 279 381 } 280 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsAudio.h
r82968 r85680 24 24 /* GUI includes: */ 25 25 #include "UISettingsPage.h" 26 #include "UIMachineSettingsAudio.gen.h"27 26 28 27 /* Forward declarations: */ 28 class QCheckBox; 29 class QLabel; 30 class UIAudioControllerEditor; 31 class UIAudioHostDriverEditor; 29 32 struct UIDataSettingsMachineAudio; 30 33 typedef UISettingsCache<UIDataSettingsMachineAudio> UISettingsCacheMachineAudio; 31 34 32 35 /** Machine settings: Audio page. */ 33 class SHARED_LIBRARY_STUFF UIMachineSettingsAudio : public UISettingsPageMachine, 34 public Ui::UIMachineSettingsAudio 36 class SHARED_LIBRARY_STUFF UIMachineSettingsAudio : public UISettingsPageMachine 35 37 { 36 38 Q_OBJECT; … … 72 74 /** Prepares all. */ 73 75 void prepare(); 76 /** Prepares widgets. */ 77 void prepareWidgets(); 74 78 /** Cleanups all. */ 75 79 void cleanup(); … … 80 84 /** Holds the page data cache instance. */ 81 85 UISettingsCacheMachineAudio *m_pCache; 86 87 QCheckBox *m_pCheckBoxAudio; 88 QCheckBox *m_pCheckBoxAudioOutput; 89 QCheckBox *m_pCheckBoxAudioInput; 90 91 /** @name Widgets 92 * @{ */ 93 QLabel *m_pAudioHostDriverLabel; 94 QLabel *m_pAudioControllerLabel; 95 QLabel *m_pLabelAudioExtended; 96 QWidget *m_pContainerAudioSubOptions; 97 UIAudioHostDriverEditor *m_pAudioHostDriverEditor; 98 UIAudioControllerEditor *m_pAudioControllerEditor; 99 /** @} */ 82 100 }; 83 101 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsInterface.cpp
r85679 r85680 144 144 , m_pActionPool(0) 145 145 , m_pCache(0) 146 , m_pStatusBarEditor(0) 147 , m_pMenuBarEditor(0) 148 , m_pCheckBoxShowMiniToolBar(0) 149 , m_pComboToolBarAlignment(0) 150 , m_pLabelVisualState(0) 151 , m_pVisualStateEditor(0) 152 , m_pLabelMiniToolBar(0) 146 153 { 147 154 /* Prepare: */
Note:
See TracChangeset
for help on using the changeset viewer.