VirtualBox

Changeset 85680 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Aug 11, 2020 9:33:36 AM (4 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9812. Removing UIMachineSettingsAudio.ui

Location:
trunk/src/VBox/Frontends/VirtualBox
Files:
1 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/VBoxUI.pro

    r85679 r85680  
    3636    src/settings/machine/UIMachineSettingsDisplay.ui \
    3737    src/settings/machine/UIMachineSettingsStorage.ui \
    38     src/settings/machine/UIMachineSettingsAudio.ui \
    3938    src/settings/machine/UIMachineSettingsNetwork.ui \
    4039    src/settings/machine/UIMachineSettingsSerial.ui \
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsAudio.cpp

    r82968 r85680  
    1616 */
    1717
     18/* Qt includes: */
     19#include <QCheckBox>
     20#include <QLabel>
     21#include <QVBoxLayout>
     22
    1823/* GUI includes: */
     24#include "UIAudioControllerEditor.h"
     25#include "UIAudioHostDriverEditor.h"
    1926#include "UIConverter.h"
     27#include "UIErrorString.h"
    2028#include "UIMachineSettingsAudio.h"
    21 #include "UIErrorString.h"
    2229
    2330/* COM includes: */
     
    6976UIMachineSettingsAudio::UIMachineSettingsAudio()
    7077    : 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)
    7184{
    7285    /* Prepare: */
     
    161174void UIMachineSettingsAudio::retranslateUi()
    162175{
    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
    165197}
    166198
     
    181213void UIMachineSettingsAudio::prepare()
    182214{
    183     /* Apply UI decorations: */
    184     Ui::UIMachineSettingsAudio::setupUi(this);
     215    prepareWidgets();
    185216
    186217    /* Prepare cache: */
     
    211242}
    212243
     244void 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
    213315void UIMachineSettingsAudio::cleanup()
    214316{
     
    278380    return fSuccess;
    279381}
    280 
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsAudio.h

    r82968 r85680  
    2424/* GUI includes: */
    2525#include "UISettingsPage.h"
    26 #include "UIMachineSettingsAudio.gen.h"
    2726
    2827/* Forward declarations: */
     28class QCheckBox;
     29class QLabel;
     30class UIAudioControllerEditor;
     31class UIAudioHostDriverEditor;
    2932struct UIDataSettingsMachineAudio;
    3033typedef UISettingsCache<UIDataSettingsMachineAudio> UISettingsCacheMachineAudio;
    3134
    3235/** Machine settings: Audio page. */
    33 class SHARED_LIBRARY_STUFF UIMachineSettingsAudio : public UISettingsPageMachine,
    34                                                     public Ui::UIMachineSettingsAudio
     36class SHARED_LIBRARY_STUFF UIMachineSettingsAudio : public UISettingsPageMachine
    3537{
    3638    Q_OBJECT;
     
    7274    /** Prepares all. */
    7375    void prepare();
     76    /** Prepares widgets. */
     77    void prepareWidgets();
    7478    /** Cleanups all. */
    7579    void cleanup();
     
    8084    /** Holds the page data cache instance. */
    8185    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    /** @} */
    82100};
    83101
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsInterface.cpp

    r85679 r85680  
    144144    , m_pActionPool(0)
    145145    , 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)
    146153{
    147154    /* Prepare: */
Note: See TracChangeset for help on using the changeset viewer.

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