Changeset 67811 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Jul 5, 2017 6:56:54 PM (8 years ago)
- svn:sync-xref-src-repo-rev:
- 116736
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/hostnetwork
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/hostnetwork/UIHostNetworkDetailsWidget.cpp
r67703 r67811 78 78 } 79 79 80 void UIHostNetworkDetailsWidget::clearData()81 {82 /* Reset old/new data: */83 m_oldData = UIDataHostNetwork();84 m_newData = m_oldData;85 86 /* Load 'Interface' data: */87 loadDataForInterface();88 /* Load 'DHCP server' data: */89 loadDataForDHCPServer();90 }91 92 80 void UIHostNetworkDetailsWidget::retranslateUi() 93 81 { … … 232 220 void UIHostNetworkDetailsWidget::sltHandleButtonBoxClick(QAbstractButton *pButton) 233 221 { 222 /* Make sure button-box exists: */ 223 AssertPtrReturnVoid(m_pButtonBoxInterface); 224 AssertPtrReturnVoid(m_pButtonBoxServer); 225 234 226 /* Disable buttons first of all: */ 235 if (m_pButtonBoxInterface) 236 { 237 m_pButtonBoxInterface->button(QDialogButtonBox::Cancel)->setEnabled(false); 238 m_pButtonBoxInterface->button(QDialogButtonBox::Ok)->setEnabled(false); 239 } 240 if (m_pButtonBoxServer) 241 { 242 m_pButtonBoxServer->button(QDialogButtonBox::Cancel)->setEnabled(false); 243 m_pButtonBoxServer->button(QDialogButtonBox::Ok)->setEnabled(false); 244 } 227 m_pButtonBoxInterface->button(QDialogButtonBox::Cancel)->setEnabled(false); 228 m_pButtonBoxInterface->button(QDialogButtonBox::Ok)->setEnabled(false); 229 m_pButtonBoxServer->button(QDialogButtonBox::Cancel)->setEnabled(false); 230 m_pButtonBoxServer->button(QDialogButtonBox::Ok)->setEnabled(false); 245 231 246 232 /* Compare with known buttons: */ 247 if ( ( m_pButtonBoxInterface 248 && pButton == m_pButtonBoxInterface->button(QDialogButtonBox::Cancel)) 249 || ( m_pButtonBoxServer 250 && pButton == m_pButtonBoxServer->button(QDialogButtonBox::Cancel))) 233 if ( pButton == m_pButtonBoxInterface->button(QDialogButtonBox::Cancel) 234 || pButton == m_pButtonBoxServer->button(QDialogButtonBox::Cancel)) 251 235 emit sigDataChangeRejected(); 252 253 236 else 254 255 if ( ( m_pButtonBoxInterface 256 && pButton == m_pButtonBoxInterface->button(QDialogButtonBox::Ok)) 257 || ( m_pButtonBoxServer 258 && pButton == m_pButtonBoxServer->button(QDialogButtonBox::Ok))) 237 if ( pButton == m_pButtonBoxInterface->button(QDialogButtonBox::Ok) 238 || pButton == m_pButtonBoxServer->button(QDialogButtonBox::Ok)) 259 239 emit sigDataChangeAccepted(); 260 240 } … … 280 260 /* Configure layout: */ 281 261 pLayout->setContentsMargins(0, 0, 0, 0); 262 282 263 /* Prepare tab-widget: */ 283 264 prepareTabWidget(); … … 295 276 /* Prepare 'DHCP server' tab: */ 296 277 prepareTabDHCPServer(); 278 297 279 /* Add into layout: */ 298 280 layout()->addWidget(m_pTabWidget); -
trunk/src/VBox/Frontends/VirtualBox/src/hostnetwork/UIHostNetworkDetailsWidget.h
r67703 r67811 158 158 159 159 160 /** Host Network Manager: Host network details 160 /** Host Network Manager: Host network details-widget. */ 161 161 class UIHostNetworkDetailsWidget : public QIWithRetranslateUI<QWidget> 162 162 { … … 175 175 public: 176 176 177 /** Constructs host network details dialog for the passed @a pParent and @a data. */ 177 /** Constructs medium details dialog passing @a pParent to the base-class. 178 * @param enmEmbedding Brings embedding type. */ 178 179 UIHostNetworkDetailsWidget(EmbedTo enmEmbedding, QWidget *pParent = 0); 179 180 … … 182 183 /** Defines the host network @a data. */ 183 184 void setData(const UIDataHostNetwork &data); 184 /** Clears the host network data. */185 void clearData();186 185 187 186 protected: … … 265 264 /** Holds the new data copy. */ 266 265 UIDataHostNetwork m_newData; 266 267 267 /** Holds the tab-widget. */ 268 QITabWidget 268 QITabWidget *m_pTabWidget; 269 269 /** @} */ 270 270 -
trunk/src/VBox/Frontends/VirtualBox/src/hostnetwork/UIHostNetworkManager.cpp
r67703 r67811 662 662 { 663 663 /* Otherwise => clear details and close the area: */ 664 m_pDetailsWidget-> clearData();664 m_pDetailsWidget->setData(UIDataHostNetwork()); 665 665 sltToggleHostNetworkDetailsVisibility(false); 666 666 } … … 1028 1028 if (pButton == button(ButtonType_Reset)) 1029 1029 emit sigDataChangeRejected(); 1030 1031 1030 else 1032 1033 1031 if (pButton == button(ButtonType_Apply)) 1034 1032 emit sigDataChangeAccepted(); -
trunk/src/VBox/Frontends/VirtualBox/src/hostnetwork/UIHostNetworkManager.h
r67686 r67811 45 45 signals: 46 46 47 /** Notifies listeners about host network details 47 /** Notifies listeners about host network details-widget @a fVisible. */ 48 48 void sigHostNetworkDetailsVisibilityChanged(bool fVisible); 49 49 /** Notifies listeners about host network details data @a fDiffers. */ … … 79 79 public slots: 80 80 81 /** @name Menu/actionstuff.81 /** @name Details-widget stuff. 82 82 * @{ */ 83 83 /** Handles command to reset host network details changes. */
Note:
See TracChangeset
for help on using the changeset viewer.