Changeset 87219 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Jan 12, 2021 7:51:48 AM (4 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 3 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
r87158 r87219 622 622 src/medium/UIMediumManager.h \ 623 623 src/monitor/resource/UIResourceMonitor.h \ 624 src/networkmanager/UI NetworkDetailsWidget.h \624 src/networkmanager/UIDetailsWidgetHostNetwork.h \ 625 625 src/networkmanager/UINetworkManager.h \ 626 626 src/snapshots/UISnapshotDetailsWidget.h \ … … 1103 1103 src/medium/UIMediumManager.cpp \ 1104 1104 src/monitor/resource/UIResourceMonitor.cpp \ 1105 src/networkmanager/UI NetworkDetailsWidget.cpp \1105 src/networkmanager/UIDetailsWidgetHostNetwork.cpp \ 1106 1106 src/networkmanager/UINetworkManager.cpp \ 1107 1107 src/networkmanager/UINetworkManagerUtils.cpp \ -
trunk/src/VBox/Frontends/VirtualBox/src/networkmanager/UIDetailsWidgetHostNetwork.cpp
r87218 r87219 1 1 /* $Id$ */ 2 2 /** @file 3 * VBox Qt GUI - UI NetworkDetailsWidgetclass implementation.3 * VBox Qt GUI - UIDetailsWidgetHostNetwork class implementation. 4 4 */ 5 5 6 6 /* 7 * Copyright (C) 2009-202 0Oracle Corporation7 * Copyright (C) 2009-2021 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 30 30 #include "QITabWidget.h" 31 31 #include "UIIconPool.h" 32 #include "UI NetworkDetailsWidget.h"32 #include "UIDetailsWidgetHostNetwork.h" 33 33 #include "UINetworkManagerUtils.h" 34 34 … … 38 38 39 39 40 UI NetworkDetailsWidget::UINetworkDetailsWidget(EmbedTo enmEmbedding, QWidget *pParent /* = 0 */)40 UIDetailsWidgetHostNetwork::UIDetailsWidgetHostNetwork(EmbedTo enmEmbedding, QWidget *pParent /* = 0 */) 41 41 : QIWithRetranslateUI<QWidget>(pParent) 42 42 , m_enmEmbedding(enmEmbedding) … … 60 60 } 61 61 62 void UI NetworkDetailsWidget::setData(const UIDataHostNetwork &data)62 void UIDetailsWidgetHostNetwork::setData(const UIDataHostNetwork &data) 63 63 { 64 64 /* Cache old/new data: */ … … 72 72 } 73 73 74 void UI NetworkDetailsWidget::retranslateUi()74 void UIDetailsWidgetHostNetwork::retranslateUi() 75 75 { 76 76 /* Translate tab-widget: */ … … 132 132 } 133 133 134 void UI NetworkDetailsWidget::sltToggledButtonAutomatic(bool fChecked)134 void UIDetailsWidgetHostNetwork::sltToggledButtonAutomatic(bool fChecked) 135 135 { 136 136 m_newData.m_interface.m_fDHCPEnabled = fChecked; … … 140 140 } 141 141 142 void UI NetworkDetailsWidget::sltToggledButtonManual(bool fChecked)142 void UIDetailsWidgetHostNetwork::sltToggledButtonManual(bool fChecked) 143 143 { 144 144 m_newData.m_interface.m_fDHCPEnabled = !fChecked; … … 148 148 } 149 149 150 void UI NetworkDetailsWidget::sltTextChangedIPv4(const QString &strText)150 void UIDetailsWidgetHostNetwork::sltTextChangedIPv4(const QString &strText) 151 151 { 152 152 m_newData.m_interface.m_strAddress = strText; … … 155 155 } 156 156 157 void UI NetworkDetailsWidget::sltTextChangedNMv4(const QString &strText)157 void UIDetailsWidgetHostNetwork::sltTextChangedNMv4(const QString &strText) 158 158 { 159 159 m_newData.m_interface.m_strMask = strText; … … 162 162 } 163 163 164 void UI NetworkDetailsWidget::sltTextChangedIPv6(const QString &strText)164 void UIDetailsWidgetHostNetwork::sltTextChangedIPv6(const QString &strText) 165 165 { 166 166 m_newData.m_interface.m_strAddress6 = strText; … … 169 169 } 170 170 171 void UI NetworkDetailsWidget::sltTextChangedNMv6(const QString &strText)171 void UIDetailsWidgetHostNetwork::sltTextChangedNMv6(const QString &strText) 172 172 { 173 173 m_newData.m_interface.m_strPrefixLength6 = strText; … … 176 176 } 177 177 178 void UI NetworkDetailsWidget::sltStatusChangedServer(int iChecked)178 void UIDetailsWidgetHostNetwork::sltStatusChangedServer(int iChecked) 179 179 { 180 180 m_newData.m_dhcpserver.m_fEnabled = (bool)iChecked; … … 184 184 } 185 185 186 void UI NetworkDetailsWidget::sltTextChangedAddress(const QString &strText)186 void UIDetailsWidgetHostNetwork::sltTextChangedAddress(const QString &strText) 187 187 { 188 188 m_newData.m_dhcpserver.m_strAddress = strText; … … 191 191 } 192 192 193 void UI NetworkDetailsWidget::sltTextChangedMask(const QString &strText)193 void UIDetailsWidgetHostNetwork::sltTextChangedMask(const QString &strText) 194 194 { 195 195 m_newData.m_dhcpserver.m_strMask = strText; … … 198 198 } 199 199 200 void UI NetworkDetailsWidget::sltTextChangedLowerAddress(const QString &strText)200 void UIDetailsWidgetHostNetwork::sltTextChangedLowerAddress(const QString &strText) 201 201 { 202 202 m_newData.m_dhcpserver.m_strLowerAddress = strText; … … 205 205 } 206 206 207 void UI NetworkDetailsWidget::sltTextChangedUpperAddress(const QString &strText)207 void UIDetailsWidgetHostNetwork::sltTextChangedUpperAddress(const QString &strText) 208 208 { 209 209 m_newData.m_dhcpserver.m_strUpperAddress = strText; … … 212 212 } 213 213 214 void UI NetworkDetailsWidget::sltHandleButtonBoxClick(QAbstractButton *pButton)214 void UIDetailsWidgetHostNetwork::sltHandleButtonBoxClick(QAbstractButton *pButton) 215 215 { 216 216 /* Make sure button-box exists: */ … … 234 234 } 235 235 236 void UI NetworkDetailsWidget::prepare()236 void UIDetailsWidgetHostNetwork::prepare() 237 237 { 238 238 /* Prepare this: */ … … 246 246 } 247 247 248 void UI NetworkDetailsWidget::prepareThis()248 void UIDetailsWidgetHostNetwork::prepareThis() 249 249 { 250 250 /* Create layout: */ … … 260 260 } 261 261 262 void UI NetworkDetailsWidget::prepareTabWidget()262 void UIDetailsWidgetHostNetwork::prepareTabWidget() 263 263 { 264 264 /* Create tab-widget: */ … … 276 276 } 277 277 278 void UI NetworkDetailsWidget::prepareTabInterface()278 void UIDetailsWidgetHostNetwork::prepareTabInterface() 279 279 { 280 280 /* Create 'Interface' tab: */ … … 308 308 /* Configure radio-button: */ 309 309 connect(m_pButtonAutomatic, &QRadioButton::toggled, 310 this, &UI NetworkDetailsWidget::sltToggledButtonAutomatic);310 this, &UIDetailsWidgetHostNetwork::sltToggledButtonAutomatic); 311 311 /* Add into layout: */ 312 312 pLayoutAutomatic->addWidget(m_pButtonAutomatic); … … 343 343 /* Configure radio-button: */ 344 344 connect(m_pButtonManual, &QRadioButton::toggled, 345 this, &UI NetworkDetailsWidget::sltToggledButtonManual);345 this, &UIDetailsWidgetHostNetwork::sltToggledButtonManual); 346 346 /* Add into layout: */ 347 347 pLayoutManual->addWidget(m_pButtonManual); … … 388 388 m_pLabelIPv4->setBuddy(m_pEditorIPv4); 389 389 connect(m_pEditorIPv4, &QLineEdit::textChanged, 390 this, &UI NetworkDetailsWidget::sltTextChangedIPv4);390 this, &UIDetailsWidgetHostNetwork::sltTextChangedIPv4); 391 391 /* Add into layout: */ 392 392 pLayoutIPv4->addWidget(m_pEditorIPv4); … … 429 429 m_pLabelNMv4->setBuddy(m_pEditorNMv4); 430 430 connect(m_pEditorNMv4, &QLineEdit::textChanged, 431 this, &UI NetworkDetailsWidget::sltTextChangedNMv4);431 this, &UIDetailsWidgetHostNetwork::sltTextChangedNMv4); 432 432 /* Add into layout: */ 433 433 pLayoutNMv4->addWidget(m_pEditorNMv4); … … 470 470 m_pLabelIPv6->setBuddy(m_pEditorIPv6); 471 471 connect(m_pEditorIPv6, &QLineEdit::textChanged, 472 this, &UI NetworkDetailsWidget::sltTextChangedIPv6);472 this, &UIDetailsWidgetHostNetwork::sltTextChangedIPv6); 473 473 /* Add into layout: */ 474 474 pLayoutIPv6->addWidget(m_pEditorIPv6); … … 511 511 m_pLabelNMv6->setBuddy(m_pEditorNMv6); 512 512 connect(m_pEditorNMv6, &QLineEdit::textChanged, 513 this, &UI NetworkDetailsWidget::sltTextChangedNMv6);513 this, &UIDetailsWidgetHostNetwork::sltTextChangedNMv6); 514 514 /* Add into layout: */ 515 515 pLayoutNMv6->addWidget(m_pEditorNMv6); … … 558 558 /* Configure button-box: */ 559 559 m_pButtonBoxInterface->setStandardButtons(QDialogButtonBox::Cancel | QDialogButtonBox::Ok); 560 connect(m_pButtonBoxInterface, &QIDialogButtonBox::clicked, this, &UI NetworkDetailsWidget::sltHandleButtonBoxClick);560 connect(m_pButtonBoxInterface, &QIDialogButtonBox::clicked, this, &UIDetailsWidgetHostNetwork::sltHandleButtonBoxClick); 561 561 562 562 /* Add into layout: */ … … 569 569 } 570 570 571 void UI NetworkDetailsWidget::prepareTabDHCPServer()571 void UIDetailsWidgetHostNetwork::prepareTabDHCPServer() 572 572 { 573 573 /* Create 'DHCP server' tab: */ … … 594 594 /* Configure check-box: */ 595 595 connect(m_pCheckBoxDHCP, &QCheckBox::stateChanged, 596 this, &UI NetworkDetailsWidget::sltStatusChangedServer);596 this, &UIDetailsWidgetHostNetwork::sltStatusChangedServer); 597 597 /* Add into layout: */ 598 598 pLayoutDHCPServer->addWidget(m_pCheckBoxDHCP, 0, 0, 1, 2); … … 624 624 m_pLabelDHCPAddress->setBuddy(m_pEditorDHCPAddress); 625 625 connect(m_pEditorDHCPAddress, &QLineEdit::textChanged, 626 this, &UI NetworkDetailsWidget::sltTextChangedAddress);626 this, &UIDetailsWidgetHostNetwork::sltTextChangedAddress); 627 627 /* Add into layout: */ 628 628 pLayoutDHCPAddress->addWidget(m_pEditorDHCPAddress); … … 665 665 m_pLabelDHCPMask->setBuddy(m_pEditorDHCPMask); 666 666 connect(m_pEditorDHCPMask, &QLineEdit::textChanged, 667 this, &UI NetworkDetailsWidget::sltTextChangedMask);667 this, &UIDetailsWidgetHostNetwork::sltTextChangedMask); 668 668 /* Add into layout: */ 669 669 pLayoutDHCPMask->addWidget(m_pEditorDHCPMask); … … 706 706 m_pLabelDHCPLowerAddress->setBuddy(m_pEditorDHCPLowerAddress); 707 707 connect(m_pEditorDHCPLowerAddress, &QLineEdit::textChanged, 708 this, &UI NetworkDetailsWidget::sltTextChangedLowerAddress);708 this, &UIDetailsWidgetHostNetwork::sltTextChangedLowerAddress); 709 709 /* Add into layout: */ 710 710 pLayoutDHCPLowerAddress->addWidget(m_pEditorDHCPLowerAddress); … … 747 747 m_pLabelDHCPUpperAddress->setBuddy(m_pEditorDHCPUpperAddress); 748 748 connect(m_pEditorDHCPUpperAddress, &QLineEdit::textChanged, 749 this, &UI NetworkDetailsWidget::sltTextChangedUpperAddress);749 this, &UIDetailsWidgetHostNetwork::sltTextChangedUpperAddress); 750 750 /* Add into layout: */ 751 751 pLayoutDHCPUpperAddress->addWidget(m_pEditorDHCPUpperAddress); … … 794 794 /* Configure button-box: */ 795 795 m_pButtonBoxServer->setStandardButtons(QDialogButtonBox::Cancel | QDialogButtonBox::Ok); 796 connect(m_pButtonBoxServer, &QIDialogButtonBox::clicked, this, &UI NetworkDetailsWidget::sltHandleButtonBoxClick);796 connect(m_pButtonBoxServer, &QIDialogButtonBox::clicked, this, &UIDetailsWidgetHostNetwork::sltHandleButtonBoxClick); 797 797 798 798 /* Add into layout: */ … … 805 805 } 806 806 807 void UI NetworkDetailsWidget::loadDataForInterface()807 void UIDetailsWidgetHostNetwork::loadDataForInterface() 808 808 { 809 809 /* Toggle IPv4 & IPv6 interface fields availability: */ … … 832 832 } 833 833 834 void UI NetworkDetailsWidget::loadDataForDHCPServer()834 void UIDetailsWidgetHostNetwork::loadDataForDHCPServer() 835 835 { 836 836 /* Toggle DHCP server fields availability: */ … … 873 873 } 874 874 875 void UI NetworkDetailsWidget::revalidate(QWidget *pWidget /* = 0 */)875 void UIDetailsWidgetHostNetwork::revalidate(QWidget *pWidget /* = 0 */) 876 876 { 877 877 /* Validate 'Interface' tab content: */ … … 958 958 } 959 959 960 void UI NetworkDetailsWidget::retranslateValidation(QWidget *pWidget /* = 0 */)960 void UIDetailsWidgetHostNetwork::retranslateValidation(QWidget *pWidget /* = 0 */) 961 961 { 962 962 /* Translate 'Interface' tab content: */ … … 992 992 } 993 993 994 void UI NetworkDetailsWidget::updateButtonStates()994 void UIDetailsWidgetHostNetwork::updateButtonStates() 995 995 { 996 996 // if (m_oldData != m_newData) -
trunk/src/VBox/Frontends/VirtualBox/src/networkmanager/UIDetailsWidgetHostNetwork.h
r87218 r87219 1 1 /* $Id$ */ 2 2 /** @file 3 * VBox Qt GUI - UI NetworkDetailsWidgetclass declaration.3 * VBox Qt GUI - UIDetailsWidgetHostNetwork class declaration. 4 4 */ 5 5 6 6 /* 7 * Copyright (C) 2009-202 0Oracle Corporation7 * Copyright (C) 2009-2021 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 16 16 */ 17 17 18 #ifndef FEQT_INCLUDED_SRC_networkmanager_UI NetworkDetailsWidget_h19 #define FEQT_INCLUDED_SRC_networkmanager_UI NetworkDetailsWidget_h18 #ifndef FEQT_INCLUDED_SRC_networkmanager_UIDetailsWidgetHostNetwork_h 19 #define FEQT_INCLUDED_SRC_networkmanager_UIDetailsWidgetHostNetwork_h 20 20 #ifndef RT_WITHOUT_PRAGMA_ONCE 21 21 # pragma once … … 73 73 74 74 /** Holds interface name. */ 75 QString m_strName;75 QString m_strName; 76 76 /** Holds whether DHCP is enabled for that interface. */ 77 bool m_fDHCPEnabled;77 bool m_fDHCPEnabled; 78 78 /** Holds IPv4 interface address. */ 79 QString m_strAddress;79 QString m_strAddress; 80 80 /** Holds IPv4 interface mask. */ 81 QString m_strMask;81 QString m_strMask; 82 82 /** Holds whether IPv6 protocol supported. */ 83 bool m_fSupportedIPv6;83 bool m_fSupportedIPv6; 84 84 /** Holds IPv6 interface address. */ 85 QString m_strAddress6;85 QString m_strAddress6; 86 86 /** Holds IPv6 interface prefix length. */ 87 QString m_strPrefixLength6;87 QString m_strPrefixLength6; 88 88 }; 89 89 … … 119 119 120 120 /** Holds whether DHCP server enabled. */ 121 bool m_fEnabled;121 bool m_fEnabled; 122 122 /** Holds DHCP server address. */ 123 QString m_strAddress;123 QString m_strAddress; 124 124 /** Holds DHCP server mask. */ 125 QString m_strMask;125 QString m_strMask; 126 126 /** Holds DHCP server lower address. */ 127 QString m_strLowerAddress;127 QString m_strLowerAddress; 128 128 /** Holds DHCP server upper address. */ 129 QString m_strUpperAddress;129 QString m_strUpperAddress; 130 130 }; 131 131 … … 155 155 156 156 /** Holds the interface data. */ 157 UIDataHostNetworkInterface m_interface;157 UIDataHostNetworkInterface m_interface; 158 158 /** Holds the DHCP server data. */ 159 UIDataDHCPServer m_dhcpserver;159 UIDataDHCPServer m_dhcpserver; 160 160 }; 161 161 162 162 163 163 /** Host Network Manager: Host network details-widget. */ 164 class UI NetworkDetailsWidget: public QIWithRetranslateUI<QWidget>164 class UIDetailsWidgetHostNetwork : public QIWithRetranslateUI<QWidget> 165 165 { 166 166 Q_OBJECT; … … 180 180 /** Constructs medium details dialog passing @a pParent to the base-class. 181 181 * @param enmEmbedding Brings embedding type. */ 182 UI NetworkDetailsWidget(EmbedTo enmEmbedding, QWidget *pParent = 0);182 UIDetailsWidgetHostNetwork(EmbedTo enmEmbedding, QWidget *pParent = 0); 183 183 184 184 /** Returns the host network data. */ … … 354 354 }; 355 355 356 #endif /* !FEQT_INCLUDED_SRC_networkmanager_UI NetworkDetailsWidget_h */357 356 #endif /* !FEQT_INCLUDED_SRC_networkmanager_UIDetailsWidgetHostNetwork_h */ 357 -
trunk/src/VBox/Frontends/VirtualBox/src/networkmanager/UINetworkManager.cpp
r87089 r87219 5 5 6 6 /* 7 * Copyright (C) 2009-202 0Oracle Corporation7 * Copyright (C) 2009-2021 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 27 27 #include "QITreeWidget.h" 28 28 #include "UIActionPoolManager.h" 29 #include "UIDetailsWidgetHostNetwork.h" 29 30 #include "UIExtraDataManager.h" 30 31 #include "UIIconPool.h" 31 32 #include "UIMessageCenter.h" 32 #include "UINetworkDetailsWidget.h"33 33 #include "UINetworkManager.h" 34 34 #include "UINetworkManagerUtils.h" … … 890 890 { 891 891 /* Prepare host network details-widget: */ 892 m_pDetailsWidgetHostNetwork = new UI NetworkDetailsWidget(m_enmEmbedding, m_pTabHostNetwork);892 m_pDetailsWidgetHostNetwork = new UIDetailsWidgetHostNetwork(m_enmEmbedding, m_pTabHostNetwork); 893 893 if (m_pDetailsWidgetHostNetwork) 894 894 { 895 895 m_pDetailsWidgetHostNetwork->setVisible(false); 896 896 m_pDetailsWidgetHostNetwork->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); 897 connect(m_pDetailsWidgetHostNetwork, &UI NetworkDetailsWidget::sigDataChanged,897 connect(m_pDetailsWidgetHostNetwork, &UIDetailsWidgetHostNetwork::sigDataChanged, 898 898 this, &UINetworkManagerWidget::sigDetailsDataChangedHostNetwork); 899 connect(m_pDetailsWidgetHostNetwork, &UI NetworkDetailsWidget::sigDataChangeRejected,899 connect(m_pDetailsWidgetHostNetwork, &UIDetailsWidgetHostNetwork::sigDataChangeRejected, 900 900 this, &UINetworkManagerWidget::sltHandleCurrentItemChangeHostNetwork); 901 connect(m_pDetailsWidgetHostNetwork, &UI NetworkDetailsWidget::sigDataChangeAccepted,901 connect(m_pDetailsWidgetHostNetwork, &UIDetailsWidgetHostNetwork::sigDataChangeAccepted, 902 902 this, &UINetworkManagerWidget::sltApplyDetailsChangesHostNetwork); 903 903 -
trunk/src/VBox/Frontends/VirtualBox/src/networkmanager/UINetworkManager.h
r87210 r87219 5 5 6 6 /* 7 * Copyright (C) 2009-202 0Oracle Corporation7 * Copyright (C) 2009-2021 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 38 38 class QITreeWidget; 39 39 class UIActionPool; 40 class UI NetworkDetailsWidget;40 class UIDetailsWidgetHostNetwork; 41 41 class UIItemHostNetwork; 42 42 class QIToolBar; … … 188 188 189 189 /** Holds the host network tab. */ 190 QWidget *m_pTabHostNetwork;190 QWidget *m_pTabHostNetwork; 191 191 /** Holds the host network layout. */ 192 QVBoxLayout *m_pLayoutHostNetwork;192 QVBoxLayout *m_pLayoutHostNetwork; 193 193 /** Holds the host network tree-widget instance. */ 194 QITreeWidget *m_pTreeWidgetHostNetwork;194 QITreeWidget *m_pTreeWidgetHostNetwork; 195 195 /** Holds the host network details-widget instance. */ 196 UI NetworkDetailsWidget*m_pDetailsWidgetHostNetwork;196 UIDetailsWidgetHostNetwork *m_pDetailsWidgetHostNetwork; 197 197 /** @} */ 198 198 };
Note:
See TracChangeset
for help on using the changeset viewer.