Changeset 94577 in vbox
- Timestamp:
- Apr 12, 2022 7:55:35 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsNetwork.cpp
r94555 r94577 154 154 Q_OBJECT; 155 155 156 signals: 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 156 164 public: 157 165 158 /* Constructor:*/166 /** Constructs tab passing @a pParent to the base-class. */ 159 167 UIMachineSettingsNetwork(UIMachineSettingsNetworkPage *pParent); 160 168 161 /* Load / Save API:*/169 /** Loads adapter data from @a adapterCache. */ 162 170 void getAdapterDataFromCache(const UISettingsCacheMachineNetworkAdapter &adapterCache); 171 /** Saves adapter data to @a adapterCache. */ 163 172 void putAdapterDataToCache(UISettingsCacheMachineNetworkAdapter &adapterCache); 164 173 … … 166 175 bool validate(QList<UIValidationMessage> &messages); 167 176 168 /* Navigation stuff:*/169 QWidget *setOrderAfter(QWidget *p After);170 171 /* Other public stuff:*/177 /** Configures tab order according to passed @a pWidget. */ 178 QWidget *setOrderAfter(QWidget *pWidget); 179 180 /** Returns tab title. */ 172 181 QString tabTitle() const; 182 /** Returns tab attachment type. */ 173 183 KNetworkAttachmentType attachmentType() const; 184 /** Returne tab alternative name for @a enmType specified. */ 174 185 QString alternativeName(KNetworkAttachmentType enmType = KNetworkAttachmentType_Null) const; 186 187 /** Performs tab polishing. */ 175 188 void polishTab(); 189 /** Reloads tab alternatives. */ 176 190 void reloadAlternatives(); 177 191 178 192 /** 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); 188 194 189 195 protected: … … 194 200 private slots: 195 201 196 /* Different handlers:*/202 /** Handles adapter activity change. */ 197 203 void sltHandleAdapterActivityChange(); 204 /** Handles adapter attachment type change. */ 198 205 void sltHandleAttachmentTypeChange(); 206 /** Handles adapter alternative name change. */ 199 207 void sltHandleAlternativeNameChange(); 200 208 … … 208 216 void prepareConnections(); 209 217 210 /* Parent page:*/218 /** Holds parent page reference. */ 211 219 UIMachineSettingsNetworkPage *m_pParent; 212 220 213 /* Other variables:*/214 int m_iSlot;221 /** Holds tab slot number. */ 222 int m_iSlot; 215 223 216 224 /** @name Widgets … … 476 484 } 477 485 478 QWidget *UIMachineSettingsNetwork::setOrderAfter(QWidget *p After)479 { 480 setTabOrder(p After, m_pCheckBoxAdapter);486 QWidget *UIMachineSettingsNetwork::setOrderAfter(QWidget *pWidget) 487 { 488 setTabOrder(pWidget, m_pCheckBoxAdapter); 481 489 setTabOrder(m_pCheckBoxAdapter, m_pEditorAttachmentType); 482 490 setTabOrder(m_pEditorAttachmentType, m_pEditorNetworkFeatures); … … 534 542 } 535 543 536 void UIMachineSettingsNetwork::setAdvancedButton State(bool fExpanded)544 void UIMachineSettingsNetwork::setAdvancedButtonExpanded(bool fExpanded) 537 545 { 538 546 m_pEditorNetworkFeatures->setAdvancedButtonExpanded(fExpanded); … … 679 687 connect(m_pEditorNetworkFeatures, &UIMachineNetworkFeaturesEditor::sigMACAddressChanged, 680 688 m_pParent, &UIMachineSettingsNetworkPage::revalidate); 681 connect(this, &UIMachineSettingsNetwork::sigTabUpdated, m_pParent,682 &UIMachineSettingsNetworkPage::sltHandleTabUpdate);689 connect(this, &UIMachineSettingsNetwork::sigTabUpdated, 690 m_pParent, &UIMachineSettingsNetworkPage::sltHandleTabUpdate); 683 691 } 684 692 … … 927 935 UIMachineSettingsNetwork *pTab = qobject_cast<UIMachineSettingsNetwork*>(m_pTabWidget->widget(iSlot)); 928 936 AssertPtrReturnVoid(pTab); 929 pTab->setAdvancedButton State(fExpanded);937 pTab->setAdvancedButtonExpanded(fExpanded); 930 938 } 931 939 }
Note:
See TracChangeset
for help on using the changeset viewer.