VirtualBox

Changeset 94577 in vbox


Ignore:
Timestamp:
Apr 12, 2022 7:55:35 PM (3 years ago)
Author:
vboxsync
Message:

FE/Qt/Ds: bugref:6899: Machine settings: Network page accessibility improvements (part 5); A bit of cleanup and doxygen.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsNetwork.cpp

    r94555 r94577  
    154154    Q_OBJECT;
    155155
     156signals:
     157
     158    /** Notifies about tab content changed. */
     159    void sigTabUpdated();
     160
     161    /** Notifies about advanced button state change to @a fExpanded. */
     162    void sigNotifyAdvancedButtonStateChange(bool fExpanded);
     163
    156164public:
    157165
    158     /* Constructor: */
     166    /** Constructs tab passing @a pParent to the base-class. */
    159167    UIMachineSettingsNetwork(UIMachineSettingsNetworkPage *pParent);
    160168
    161     /* Load / Save API: */
     169    /** Loads adapter data from @a adapterCache. */
    162170    void getAdapterDataFromCache(const UISettingsCacheMachineNetworkAdapter &adapterCache);
     171    /** Saves adapter data to @a adapterCache. */
    163172    void putAdapterDataToCache(UISettingsCacheMachineNetworkAdapter &adapterCache);
    164173
     
    166175    bool validate(QList<UIValidationMessage> &messages);
    167176
    168     /* Navigation stuff: */
    169     QWidget *setOrderAfter(QWidget *pAfter);
    170 
    171     /* Other public stuff: */
     177    /** Configures tab order according to passed @a pWidget. */
     178    QWidget *setOrderAfter(QWidget *pWidget);
     179
     180    /** Returns tab title. */
    172181    QString tabTitle() const;
     182    /** Returns tab attachment type. */
    173183    KNetworkAttachmentType attachmentType() const;
     184    /** Returne tab alternative name for @a enmType specified. */
    174185    QString alternativeName(KNetworkAttachmentType enmType = KNetworkAttachmentType_Null) const;
     186
     187    /** Performs tab polishing. */
    175188    void polishTab();
     189    /** Reloads tab alternatives. */
    176190    void reloadAlternatives();
    177191
    178192    /** Defines whether the advanced button is @a fExpanded. */
    179     void setAdvancedButtonState(bool fExpanded);
    180 
    181 signals:
    182 
    183     /* Signal to notify listeners about tab content changed: */
    184     void sigTabUpdated();
    185 
    186     /** Notifies about the advanced button state change to @a fExpanded. */
    187     void sigNotifyAdvancedButtonStateChange(bool fExpanded);
     193    void setAdvancedButtonExpanded(bool fExpanded);
    188194
    189195protected:
     
    194200private slots:
    195201
    196     /* Different handlers: */
     202    /** Handles adapter activity change. */
    197203    void sltHandleAdapterActivityChange();
     204    /** Handles adapter attachment type change. */
    198205    void sltHandleAttachmentTypeChange();
     206    /** Handles adapter alternative name change. */
    199207    void sltHandleAlternativeNameChange();
    200208
     
    208216    void prepareConnections();
    209217
    210     /* Parent page: */
     218    /** Holds parent page reference. */
    211219    UIMachineSettingsNetworkPage *m_pParent;
    212220
    213     /* Other variables: */
    214     int m_iSlot;
     221    /** Holds tab slot number. */
     222    int  m_iSlot;
    215223
    216224    /** @name Widgets
     
    476484}
    477485
    478 QWidget *UIMachineSettingsNetwork::setOrderAfter(QWidget *pAfter)
    479 {
    480     setTabOrder(pAfter, m_pCheckBoxAdapter);
     486QWidget *UIMachineSettingsNetwork::setOrderAfter(QWidget *pWidget)
     487{
     488    setTabOrder(pWidget, m_pCheckBoxAdapter);
    481489    setTabOrder(m_pCheckBoxAdapter, m_pEditorAttachmentType);
    482490    setTabOrder(m_pEditorAttachmentType, m_pEditorNetworkFeatures);
     
    534542}
    535543
    536 void UIMachineSettingsNetwork::setAdvancedButtonState(bool fExpanded)
     544void UIMachineSettingsNetwork::setAdvancedButtonExpanded(bool fExpanded)
    537545{
    538546    m_pEditorNetworkFeatures->setAdvancedButtonExpanded(fExpanded);
     
    679687    connect(m_pEditorNetworkFeatures, &UIMachineNetworkFeaturesEditor::sigMACAddressChanged,
    680688            m_pParent, &UIMachineSettingsNetworkPage::revalidate);
    681     connect(this, &UIMachineSettingsNetwork::sigTabUpdated, m_pParent,
    682             &UIMachineSettingsNetworkPage::sltHandleTabUpdate);
     689    connect(this, &UIMachineSettingsNetwork::sigTabUpdated,
     690            m_pParent, &UIMachineSettingsNetworkPage::sltHandleTabUpdate);
    683691}
    684692
     
    927935        UIMachineSettingsNetwork *pTab = qobject_cast<UIMachineSettingsNetwork*>(m_pTabWidget->widget(iSlot));
    928936        AssertPtrReturnVoid(pTab);
    929         pTab->setAdvancedButtonState(fExpanded);
     937        pTab->setAdvancedButtonExpanded(fExpanded);
    930938    }
    931939}
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