Changeset 85818 in vbox
- Timestamp:
- Aug 18, 2020 12:02:48 PM (4 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 1 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/VBoxUI.pro
r85813 r85818 24 24 src/settings/UISettingsDialog.ui \ 25 25 src/settings/global/UIGlobalSettingsLanguage.ui \ 26 src/settings/global/UIGlobalSettingsExtension.ui \ 27 src/settings/global/UIGlobalSettingsProxy.ui 26 src/settings/global/UIGlobalSettingsExtension.ui 28 27 29 28 TRANSLATIONS = \ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsProxy.cpp
r82968 r85818 18 18 /* Qt includes: */ 19 19 #include <QButtonGroup> 20 #include <QGridLayout> 21 #include <QLabel> 22 #include <QRadioButton> 20 23 #include <QRegExpValidator> 21 24 22 25 /* GUI includes: */ 26 #include "QILineEdit.h" 23 27 #include "QIWidgetValidator.h" 24 28 #include "UIGlobalSettingsProxy.h" … … 64 68 UIGlobalSettingsProxy::UIGlobalSettingsProxy() 65 69 : m_pCache(0) 70 , m_pRadioProxyAuto(0) 71 , m_pRadioProxyDisabled(0) 72 , m_pRadioProxyEnabled(0) 73 , m_pHostEditor(0) 74 , m_pHostLabel(0) 75 , m_pContainerProxy(0) 66 76 { 67 77 /* Prepare: */ … … 193 203 void UIGlobalSettingsProxy::retranslateUi() 194 204 { 195 /* Translate uic generated strings: */ 196 Ui::UIGlobalSettingsProxy::retranslateUi(this); 205 m_pRadioProxyAuto->setWhatsThis(tr("When chosen, VirtualBox will try to auto-detect host proxy settings for tasks like " 206 "downloading Guest Additions from the network or checking for updates.")); 207 m_pRadioProxyAuto->setText(tr("&Auto-detect Host Proxy Settings")); 208 m_pRadioProxyDisabled->setWhatsThis(tr("When chosen, VirtualBox will use direct Internet connection for tasks like downloading " 209 "Guest Additions from the network or checking for updates.")); 210 m_pRadioProxyDisabled->setText(tr("&Direct Connection to the Internet")); 211 m_pRadioProxyEnabled->setWhatsThis(tr("When chosen, VirtualBox will use the proxy settings supplied for tasks like downloading " 212 "Guest Additions from the network or checking for updates.")); 213 m_pRadioProxyEnabled->setText(tr("&Manual Proxy Configuration")); 214 m_pHostLabel->setText(tr("&URL:")); 197 215 198 216 /* Translate proxy URL editor: */ … … 216 234 void UIGlobalSettingsProxy::prepare() 217 235 { 218 /* Apply UI decorations: */ 219 Ui::UIGlobalSettingsProxy::setupUi(this); 236 prepareWidgets(); 220 237 221 238 /* Prepare cache: */ … … 250 267 } 251 268 269 void UIGlobalSettingsProxy::prepareWidgets() 270 { 271 if (objectName().isEmpty()) 272 setObjectName(QStringLiteral("UIGlobalSettingsProxy")); 273 QGridLayout *pMainLayout = new QGridLayout(this); 274 pMainLayout->setContentsMargins(0, 0, 0, 0); 275 pMainLayout->setObjectName(QStringLiteral("pMainLayout")); 276 m_pRadioProxyAuto = new QRadioButton(); 277 m_pRadioProxyAuto->setObjectName(QStringLiteral("m_pRadioProxyAuto")); 278 pMainLayout->addWidget(m_pRadioProxyAuto, 0, 0, 1, 2); 279 280 m_pRadioProxyDisabled = new QRadioButton(); 281 m_pRadioProxyDisabled->setObjectName(QStringLiteral("m_pRadioProxyDisabled")); 282 pMainLayout->addWidget(m_pRadioProxyDisabled, 1, 0, 1, 2); 283 284 m_pRadioProxyEnabled = new QRadioButton(); 285 m_pRadioProxyEnabled->setObjectName(QStringLiteral("m_pRadioProxyEnabled")); 286 pMainLayout->addWidget(m_pRadioProxyEnabled, 2, 0, 1, 2); 287 288 QSpacerItem *pSpacerItem = new QSpacerItem(20, 0, QSizePolicy::Fixed, QSizePolicy::Minimum); 289 pMainLayout->addItem(pSpacerItem, 3, 0, 1, 1); 290 291 m_pContainerProxy = new QWidget(); 292 m_pContainerProxy->setObjectName(QStringLiteral("m_pContainerProxy")); 293 QSizePolicy sizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Minimum); 294 sizePolicy.setHorizontalStretch(1); 295 sizePolicy.setVerticalStretch(0); 296 sizePolicy.setHeightForWidth(m_pContainerProxy->sizePolicy().hasHeightForWidth()); 297 m_pContainerProxy->setSizePolicy(sizePolicy); 298 QHBoxLayout *pHBoxLayout = new QHBoxLayout(m_pContainerProxy); 299 pHBoxLayout->setContentsMargins(0, 0, 0, 0); 300 pHBoxLayout->setObjectName(QStringLiteral("pHBoxLayout")); 301 pHBoxLayout->setContentsMargins(0, 0, 0, 0); 302 m_pHostLabel = new QLabel(m_pContainerProxy); 303 m_pHostLabel->setObjectName(QStringLiteral("m_pHostLabel")); 304 m_pHostLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); 305 pHBoxLayout->addWidget(m_pHostLabel); 306 307 m_pHostEditor = new QILineEdit(m_pContainerProxy); 308 m_pHostEditor->setObjectName(QStringLiteral("m_pHostEditor")); 309 pHBoxLayout->addWidget(m_pHostEditor); 310 pMainLayout->addWidget(m_pContainerProxy, 3, 1, 1, 1); 311 312 QSpacerItem *pSpacerItem1 = new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding); 313 pMainLayout->addItem(pSpacerItem1, 4, 0, 1, 2); 314 315 m_pHostLabel->setBuddy(m_pHostEditor); 316 } 317 252 318 void UIGlobalSettingsProxy::cleanup() 253 319 { -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsProxy.h
r82968 r85818 24 24 /* GUI includes: */ 25 25 #include "UISettingsPage.h" 26 #include "UIGlobalSettingsProxy.gen.h"27 26 #include "VBoxUtils.h" 28 27 29 28 /* Forward declarations: */ 29 class QLabel; 30 class QRadioButton; 31 class QILineEdit; 30 32 struct UIDataSettingsGlobalProxy; 31 33 typedef UISettingsCache<UIDataSettingsGlobalProxy> UISettingsCacheGlobalProxy; 32 34 33 35 /** Global settings: Proxy page. */ 34 class SHARED_LIBRARY_STUFF UIGlobalSettingsProxy : public UISettingsPageGlobal, 35 public Ui::UIGlobalSettingsProxy 36 class SHARED_LIBRARY_STUFF UIGlobalSettingsProxy : public UISettingsPageGlobal 36 37 { 37 38 Q_OBJECT; … … 75 76 /** Prepares all. */ 76 77 void prepare(); 78 /** Prepares wıdgets. */ 79 void prepareWidgets(); 77 80 /** Cleanups all. */ 78 81 void cleanup(); … … 83 86 /** Holds the page data cache instance. */ 84 87 UISettingsCacheGlobalProxy *m_pCache; 88 89 /** @name Widgets 90 * @{ */ 91 QRadioButton *m_pRadioProxyAuto; 92 QRadioButton *m_pRadioProxyDisabled; 93 QRadioButton *m_pRadioProxyEnabled; 94 QILineEdit *m_pHostEditor; 95 QLabel *m_pHostLabel; 96 QWidget *m_pContainerProxy; 97 /** @} */ 85 98 }; 86 99
Note:
See TracChangeset
for help on using the changeset viewer.