Changeset 84915 in vbox
- Timestamp:
- Jun 23, 2020 10:39:22 AM (5 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/VirtualBox1.qrc
r84305 r84915 158 158 <file alias="extension_pack_uninstall_disabled_16px.png">images/extension_pack_uninstall_disabled_16px.png</file> 159 159 <file alias="extension_pack_warning_16px.png">images/extension_pack_warning_16px.png</file> 160 <file alias="eye-off.png">images/eye-off.png</file> 161 <file alias="eye-on.png">images/eye-on.png</file> 160 162 <file alias="favorite_24px.png">images/favorite_24px.png</file> 161 163 <file alias="favorite_pressed_24px.png">images/favorite_pressed_24px.png</file> … … 436 438 <file alias="machine_details_manager_disabled_16px.png">images/machine_details_manager_disabled_16px.png</file> 437 439 <file alias="machine_details_manager_disabled_24px.png">images/machine_details_manager_disabled_24px.png</file> 438 <file alias="machine_warning_16px.png">images/machine_warning_16px.png</file>439 440 </qresource> 440 441 </RCC> -
trunk/src/VBox/Frontends/VirtualBox/VirtualBox2.qrc
r84309 r84915 1 1 <RCC> 2 2 <qresource suffix="/"> 3 <file alias="machine_warning_16px.png">images/machine_warning_16px.png</file> 3 4 <file alias="media_manager_16px.png">images/media_manager_16px.png</file> 4 5 <file alias="media_manager_24px.png">images/media_manager_24px.png</file> … … 14 15 <file alias="menubar_settings_disabled_16px.png">images/menubar_settings_disabled_16px.png</file> 15 16 <file alias="minimize_16px.png">images/minimize_16px.png</file> 17 <file alias="monitor_glossy.png">images/monitor_glossy.png</file> 16 18 <file alias="monitor.png">images/monitor.png</file> 17 <file alias="monitor_glossy.png">images/monitor_glossy.png</file>18 19 <file alias="mouse_16px.png">images/mouse_16px.png</file> 19 20 <file alias="mouse_can_seamless_16px.png">images/mouse_can_seamless_16px.png</file> … … 37 38 <file alias="nw_write_16px.png">images/nw_write_16px.png</file> 38 39 <file alias="ok_16px.png">images/ok_16px.png</file> 40 <file alias="os_archlinux_64.png">images/os_archlinux_64.png</file> 39 41 <file alias="os_archlinux.png">images/os_archlinux.png</file> 40 <file alias="os_archlinux_64.png">images/os_archlinux_64.png</file>41 42 <file alias="os_cloud.png">images/os_cloud.png</file> 43 <file alias="os_debian_64.png">images/os_debian_64.png</file> 42 44 <file alias="os_debian.png">images/os_debian.png</file> 43 <file alias="os_debian_64.png">images/os_debian_64.png</file>44 45 <file alias="os_dos.png">images/os_dos.png</file> 46 <file alias="os_fedora_64.png">images/os_fedora_64.png</file> 45 47 <file alias="os_fedora.png">images/os_fedora.png</file> 46 <file alias="os_f edora_64.png">images/os_fedora_64.png</file>48 <file alias="os_freebsd_64.png">images/os_freebsd_64.png</file> 47 49 <file alias="os_freebsd.png">images/os_freebsd.png</file> 48 <file alias="os_ freebsd_64.png">images/os_freebsd_64.png</file>50 <file alias="os_gentoo_64.png">images/os_gentoo_64.png</file> 49 51 <file alias="os_gentoo.png">images/os_gentoo.png</file> 50 <file alias="os_gentoo_64.png">images/os_gentoo_64.png</file>51 52 <file alias="os_jrockitve.png">images/os_jrockitve.png</file> 52 53 <file alias="os_l4.png">images/os_l4.png</file> 54 <file alias="os_linux22.png">images/os_linux22.png</file> 55 <file alias="os_linux24_64.png">images/os_linux24_64.png</file> 56 <file alias="os_linux24.png">images/os_linux24.png</file> 57 <file alias="os_linux26_64.png">images/os_linux26_64.png</file> 58 <file alias="os_linux26.png">images/os_linux26.png</file> 59 <file alias="os_linux_64.png">images/os_linux_64.png</file> 53 60 <file alias="os_linux.png">images/os_linux.png</file> 54 <file alias="os_linux22.png">images/os_linux22.png</file> 55 <file alias="os_linux24.png">images/os_linux24.png</file> 56 <file alias="os_linux24_64.png">images/os_linux24_64.png</file> 57 <file alias="os_linux26.png">images/os_linux26.png</file> 58 <file alias="os_linux26_64.png">images/os_linux26_64.png</file> 59 <file alias="os_linux_64.png">images/os_linux_64.png</file> 61 <file alias="os_macosx_64.png">images/os_macosx_64.png</file> 60 62 <file alias="os_macosx.png">images/os_macosx.png</file> 61 <file alias="os_ma cosx_64.png">images/os_macosx_64.png</file>63 <file alias="os_mandriva_64.png">images/os_mandriva_64.png</file> 62 64 <file alias="os_mandriva.png">images/os_mandriva.png</file> 63 <file alias="os_ mandriva_64.png">images/os_mandriva_64.png</file>65 <file alias="os_netbsd_64.png">images/os_netbsd_64.png</file> 64 66 <file alias="os_netbsd.png">images/os_netbsd.png</file> 65 <file alias="os_netbsd_64.png">images/os_netbsd_64.png</file>66 67 <file alias="os_netware.png">images/os_netware.png</file> 68 <file alias="os_openbsd_64.png">images/os_openbsd_64.png</file> 67 69 <file alias="os_openbsd.png">images/os_openbsd.png</file> 68 <file alias="os_open bsd_64.png">images/os_openbsd_64.png</file>70 <file alias="os_opensuse_64.png">images/os_opensuse_64.png</file> 69 71 <file alias="os_opensuse.png">images/os_opensuse.png</file> 70 <file alias="os_o pensuse_64.png">images/os_opensuse_64.png</file>72 <file alias="os_oracle_64.png">images/os_oracle_64.png</file> 71 73 <file alias="os_oracle.png">images/os_oracle.png</file> 72 <file alias="os_oracle _64.png">images/os_oracle_64.png</file>74 <file alias="os_oraclesolaris_64.png">images/os_oraclesolaris_64.png</file> 73 75 <file alias="os_oraclesolaris.png">images/os_oraclesolaris.png</file> 74 <file alias="os_o raclesolaris_64.png">images/os_oraclesolaris_64.png</file>76 <file alias="os_os2ecs.png">images/os_os2ecs.png</file> 75 77 <file alias="os_os2_other.png">images/os_os2_other.png</file> 76 <file alias="os_os2ecs.png">images/os_os2ecs.png</file>77 78 <file alias="os_os2warp3.png">images/os_os2warp3.png</file> 79 <file alias="os_os2warp45.png">images/os_os2warp45.png</file> 78 80 <file alias="os_os2warp4.png">images/os_os2warp4.png</file> 79 <file alias="os_o s2warp45.png">images/os_os2warp45.png</file>81 <file alias="os_other_64.png">images/os_other_64.png</file> 80 82 <file alias="os_other.png">images/os_other.png</file> 81 <file alias="os_other_64.png">images/os_other_64.png</file>82 83 <file alias="os_qnx.png">images/os_qnx.png</file> 84 <file alias="os_redhat_64.png">images/os_redhat_64.png</file> 83 85 <file alias="os_redhat.png">images/os_redhat.png</file> 84 <file alias="os_ redhat_64.png">images/os_redhat_64.png</file>86 <file alias="os_solaris_64.png">images/os_solaris_64.png</file> 85 87 <file alias="os_solaris.png">images/os_solaris.png</file> 86 <file alias="os_ solaris_64.png">images/os_solaris_64.png</file>88 <file alias="os_turbolinux_64.png">images/os_turbolinux_64.png</file> 87 89 <file alias="os_turbolinux.png">images/os_turbolinux.png</file> 88 <file alias="os_ turbolinux_64.png">images/os_turbolinux_64.png</file>90 <file alias="os_ubuntu_64.png">images/os_ubuntu_64.png</file> 89 91 <file alias="os_ubuntu.png">images/os_ubuntu.png</file> 90 <file alias="os_ ubuntu_64.png">images/os_ubuntu_64.png</file>92 <file alias="os_win10_64.png">images/os_win10_64.png</file> 91 93 <file alias="os_win10.png">images/os_win10.png</file> 92 <file alias="os_win10_64.png">images/os_win10_64.png</file>93 <file alias="os_win2k.png">images/os_win2k.png</file>94 94 <file alias="os_win2k12_64.png">images/os_win2k12_64.png</file> 95 95 <file alias="os_win2k16_64.png">images/os_win2k16_64.png</file> 96 96 <file alias="os_win2k19_64.png">images/os_win2k19_64.png</file> 97 <file alias="os_win2k3_64.png">images/os_win2k3_64.png</file> 97 98 <file alias="os_win2k3.png">images/os_win2k3.png</file> 98 <file alias="os_win2k 3_64.png">images/os_win2k3_64.png</file>99 <file alias="os_win2k8_64.png">images/os_win2k8_64.png</file> 99 100 <file alias="os_win2k8.png">images/os_win2k8.png</file> 100 <file alias="os_win2k 8_64.png">images/os_win2k8_64.png</file>101 <file alias="os_win2k.png">images/os_win2k.png</file> 101 102 <file alias="os_win31.png">images/os_win31.png</file> 103 <file alias="os_win7_64.png">images/os_win7_64.png</file> 102 104 <file alias="os_win7.png">images/os_win7.png</file> 103 <file alias="os_win7_64.png">images/os_win7_64.png</file> 105 <file alias="os_win81_64.png">images/os_win81_64.png</file> 106 <file alias="os_win81.png">images/os_win81.png</file> 107 <file alias="os_win8_64.png">images/os_win8_64.png</file> 104 108 <file alias="os_win8.png">images/os_win8.png</file> 105 <file alias="os_win81.png">images/os_win81.png</file>106 <file alias="os_win81_64.png">images/os_win81_64.png</file>107 <file alias="os_win8_64.png">images/os_win8_64.png</file>108 109 <file alias="os_win95.png">images/os_win95.png</file> 109 110 <file alias="os_win98.png">images/os_win98.png</file> 110 <file alias="os_win_other.png">images/os_win_other.png</file>111 <file alias="os_win_other_64.png">images/os_win_other_64.png</file>112 111 <file alias="os_winme.png">images/os_winme.png</file> 113 112 <file alias="os_winnt4.png">images/os_winnt4.png</file> 113 <file alias="os_win_other_64.png">images/os_win_other_64.png</file> 114 <file alias="os_win_other.png">images/os_win_other.png</file> 115 <file alias="os_winvista_64.png">images/os_winvista_64.png</file> 114 116 <file alias="os_winvista.png">images/os_winvista.png</file> 115 <file alias="os_win vista_64.png">images/os_winvista_64.png</file>117 <file alias="os_winxp_64.png">images/os_winxp_64.png</file> 116 118 <file alias="os_winxp.png">images/os_winxp.png</file> 117 <file alias="os_ winxp_64.png">images/os_winxp_64.png</file>119 <file alias="os_xandros_64.png">images/os_xandros_64.png</file> 118 120 <file alias="os_xandros.png">images/os_xandros.png</file> 119 <file alias="os_xandros_64.png">images/os_xandros_64.png</file>120 121 <file alias="pcie_16px.png">images/pcie_16px.png</file> 121 122 <file alias="pcie_add_16px.png">images/pcie_add_16px.png</file> … … 294 295 <file alias="state_saving_16px.png">images/state_saving_16px.png</file> 295 296 <file alias="state_stuck_16px.png">images/state_stuck_16px.png</file> 296 <file alias="status_check_16px.png">images/status_check_16px.png</file>297 <file alias="status_error_16px.png">images/status_error_16px.png</file>298 297 <file alias="statusbar_16px.png">images/statusbar_16px.png</file> 299 298 <file alias="statusbar_disabled_16px.png">images/statusbar_disabled_16px.png</file> … … 302 301 <file alias="statusbar_settings_16px.png">images/statusbar_settings_16px.png</file> 303 302 <file alias="statusbar_settings_disabled_16px.png">images/statusbar_settings_disabled_16px.png</file> 303 <file alias="status_check_16px.png">images/status_check_16px.png</file> 304 <file alias="status_error_16px.png">images/status_error_16px.png</file> 304 305 <file alias="subnet_16px.png">images/subnet_16px.png</file> 305 306 <file alias="system_type_16px.png">images/system_type_16px.png</file> … … 423 424 <file alias="welcome_200px.png">images/welcome_200px.png</file> 424 425 <file alias="welcome_screen_24px.png">images/welcome_screen_24px.png</file> 426 <file alias="wizard_clone_bg.png">images/wizard_clone_bg.png</file> 425 427 <file alias="wizard_clone.png">images/wizard_clone.png</file> 426 <file alias="wizard_ clone_bg.png">images/wizard_clone_bg.png</file>428 <file alias="wizard_first_run_bg.png">images/wizard_first_run_bg.png</file> 427 429 <file alias="wizard_first_run.png">images/wizard_first_run.png</file> 428 <file alias="wizard_ first_run_bg.png">images/wizard_first_run_bg.png</file>430 <file alias="wizard_new_cloud_vm_bg.png">images/wizard_new_cloud_vm_bg.png</file> 429 431 <file alias="wizard_new_cloud_vm.png">images/wizard_new_cloud_vm.png</file> 430 <file alias="wizard_new_ cloud_vm_bg.png">images/wizard_new_cloud_vm_bg.png</file>432 <file alias="wizard_new_harddisk_bg.png">images/wizard_new_harddisk_bg.png</file> 431 433 <file alias="wizard_new_harddisk.png">images/wizard_new_harddisk.png</file> 432 <file alias="wizard_new_ harddisk_bg.png">images/wizard_new_harddisk_bg.png</file>434 <file alias="wizard_new_welcome_bg.png">images/wizard_new_welcome_bg.png</file> 433 435 <file alias="wizard_new_welcome.png">images/wizard_new_welcome.png</file> 434 <file alias="wizard_ new_welcome_bg.png">images/wizard_new_welcome_bg.png</file>436 <file alias="wizard_ovf_export_bg.png">images/wizard_ovf_export_bg.png</file> 435 437 <file alias="wizard_ovf_export.png">images/wizard_ovf_export.png</file> 436 <file alias="wizard_ovf_ export_bg.png">images/wizard_ovf_export_bg.png</file>438 <file alias="wizard_ovf_import_bg.png">images/wizard_ovf_import_bg.png</file> 437 439 <file alias="wizard_ovf_import.png">images/wizard_ovf_import.png</file> 438 <file alias="wizard_ovf_import_bg.png">images/wizard_ovf_import_bg.png</file>439 440 </qresource> 440 441 </RCC> -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.cpp
r84906 r84915 382 382 } 383 383 384 // int UIWizardNewVM::nextId() const385 // {386 // switch (currentId())387 // {388 // case PageUnattended:389 // return PageNameType;390 // break;391 // case PageNameType:392 // if (!isUnattendedInstallEnabled())393 // return PageHardware;394 // else395 // return PageInstallSetup;396 // break;397 // case PageInstallSetup:398 // return PageHardware;399 // case PageHardware:400 // return PageDisk;401 // break;402 // case PageDisk:403 // return UIWizard::nextId();404 // case PageMax:405 // default:406 // return PageUnattended;407 // break;408 // }409 // return UIWizard::nextId();410 // }411 412 384 void UIWizardNewVM::sltHandleWizardCancel() 413 385 { -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.h
r84892 r84915 85 85 /* Attaches default devices: */ 86 86 bool attachDefaultDevices(const CGuestOSType &comGuestType); 87 //virtual int nextId() const /* override */;88 87 89 88 /* Who will be able to create virtual-machine: */ -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasicInstallSetup.cpp
r84906 r84915 22 22 #include <QSpacerItem> 23 23 #include <QLabel> 24 #include <QLineEdit>25 24 #include <QSpinBox> 25 #include <QStyle> 26 #include <QToolButton> 26 27 27 28 /* GUI includes: */ … … 30 31 #include "UIBaseMemorySlider.h" 31 32 #include "UICommon.h" 33 #include "UIIconPool.h" 32 34 #include "UIVirtualCPUEditor.h" 33 35 #include "UIWizardNewVMPageBasicInstallSetup.h" 34 36 #include "UIWizardNewVM.h" 35 37 38 UIPasswordLineEdit::UIPasswordLineEdit(QWidget *pParent /*= 0 */) 39 :QLineEdit(pParent) 40 , m_pTextVisibilityButton(0) 41 { 42 prepare(); 43 } 44 45 void UIPasswordLineEdit::toggleTextVisibility(bool fTextVisible) 46 { 47 if (fTextVisible) 48 { 49 setEchoMode(QLineEdit::Normal); 50 if(m_pTextVisibilityButton) 51 m_pTextVisibilityButton->setIcon(UIIconPool::iconSet(":/eye-off.png")); 52 return; 53 } 54 setEchoMode(QLineEdit::Password); 55 if(m_pTextVisibilityButton) 56 m_pTextVisibilityButton->setIcon(UIIconPool::iconSet(":/eye-on.png")); 57 } 58 59 void UIPasswordLineEdit::prepare() 60 { 61 m_pTextVisibilityButton = new QToolButton(this); 62 m_pTextVisibilityButton->setAutoRaise(true); 63 m_pTextVisibilityButton->setCursor(Qt::ArrowCursor); 64 m_pTextVisibilityButton->show(); 65 connect(m_pTextVisibilityButton, &QToolButton::clicked, this, &UIPasswordLineEdit::sltHandleTextVisibilityChange); 66 toggleTextVisibility(false); 67 } 68 69 void UIPasswordLineEdit::paintEvent(QPaintEvent *pevent) 70 { 71 QLineEdit::paintEvent(pevent); 72 int iFrameWidth = style()->pixelMetric(QStyle::PM_DefaultFrameWidth); 73 int iSize = height() - 2 * iFrameWidth; 74 m_pTextVisibilityButton->setGeometry(width() - iSize, iFrameWidth, iSize, iSize); 75 76 } 77 78 void UIPasswordLineEdit::sltHandleTextVisibilityChange() 79 { 80 bool fTextVisible = false; 81 if (echoMode() == QLineEdit::Normal) 82 fTextVisible = false; 83 else 84 fTextVisible = true; 85 toggleTextVisibility(fTextVisible); 86 emit sigTextVisibilityToggled(fTextVisible); 87 } 36 88 37 89 UIUserNamePasswordEditor::UIUserNamePasswordEditor(QWidget *pParent /* = 0 */) 38 90 : QIWithRetranslateUI<QWidget>(pParent) 39 , m_pUserName Field(0)40 , m_pPassword Field(0)41 , m_pPasswordRepeat Field(0)42 , m_pUserName FieldLabel(0)43 , m_pPassword FieldLabel(0)44 , m_pPasswordRepeat FieldLabel(0)91 , m_pUserNameLineEdit(0) 92 , m_pPasswordLineEdit(0) 93 , m_pPasswordRepeatLineEdit(0) 94 , m_pUserNameLabel(0) 95 , m_pPasswordLabel(0) 96 , m_pPasswordRepeatLabel(0) 45 97 { 46 98 prepare(); … … 49 101 QString UIUserNamePasswordEditor::userName() const 50 102 { 51 if (m_pUserName Field)52 return m_pUserName Field->text();103 if (m_pUserNameLineEdit) 104 return m_pUserNameLineEdit->text(); 53 105 return QString(); 54 106 } … … 56 108 void UIUserNamePasswordEditor::setUserName(const QString &strUserName) 57 109 { 58 if (m_pUserName Field)59 return m_pUserName Field->setText(strUserName);110 if (m_pUserNameLineEdit) 111 return m_pUserNameLineEdit->setText(strUserName); 60 112 } 61 113 62 114 QString UIUserNamePasswordEditor::password() const 63 115 { 64 if (m_pPassword Field)65 return m_pPassword Field->text();116 if (m_pPasswordLineEdit) 117 return m_pPasswordLineEdit->text(); 66 118 return QString(); 67 119 } … … 69 121 void UIUserNamePasswordEditor::setPassword(const QString &strPassword) 70 122 { 71 if (m_pPassword Field)72 m_pPassword Field->setText(strPassword);73 if (m_pPasswordRepeat Field)74 m_pPasswordRepeat Field->setText(strPassword);123 if (m_pPasswordLineEdit) 124 m_pPasswordLineEdit->setText(strPassword); 125 if (m_pPasswordRepeatLineEdit) 126 m_pPasswordRepeatLineEdit->setText(strPassword); 75 127 } 76 128 77 129 void UIUserNamePasswordEditor::retranslateUi() 78 130 { 79 if (m_pUserName FieldLabel)80 { 81 m_pUserName FieldLabel->setText(UIWizardNewVM::tr("User Name:"));82 m_pUserName FieldLabel->setToolTip(UIWizardNewVM::tr("Type the user name which will be used in attended install:"));83 84 } 85 if (m_pPassword FieldLabel)86 { 87 m_pPassword FieldLabel->setText(UIWizardNewVM::tr("Password:"));88 m_pPassword FieldLabel->setToolTip(UIWizardNewVM::tr("Type the password for the user name"));89 90 } 91 if (m_pPasswordRepeat FieldLabel)92 { 93 m_pPasswordRepeat FieldLabel->setText(UIWizardNewVM::tr("Repeat Password:"));94 m_pPasswordRepeat FieldLabel->setToolTip(UIWizardNewVM::tr("Retype the password:"));95 } 96 } 97 98 void UIUserNamePasswordEditor::addLineEdit(QLabel *&pLabel, QLineEdit *&pLineEdit, QGridLayout *pLayout, bool fIsPasswordField /* = false */) 99 { 100 static int iRow = 0; 131 if (m_pUserNameLabel) 132 { 133 m_pUserNameLabel->setText(UIWizardNewVM::tr("User Name:")); 134 m_pUserNameLabel->setToolTip(UIWizardNewVM::tr("Type the user name which will be used in attended install:")); 135 136 } 137 if (m_pPasswordLabel) 138 { 139 m_pPasswordLabel->setText(UIWizardNewVM::tr("Password:")); 140 m_pPasswordLabel->setToolTip(UIWizardNewVM::tr("Type the password for the user name")); 141 142 } 143 if (m_pPasswordRepeatLabel) 144 { 145 m_pPasswordRepeatLabel->setText(UIWizardNewVM::tr("Repeat Password:")); 146 m_pPasswordRepeatLabel->setToolTip(UIWizardNewVM::tr("Retype the password:")); 147 } 148 } 149 150 template <class T> 151 void UIUserNamePasswordEditor::addLineEdit(int &iRow, QLabel *&pLabel, T *&pLineEdit, QGridLayout *pLayout) 152 { 101 153 if (!pLayout || pLabel || pLineEdit) 102 154 return; … … 106 158 pLayout->addWidget(pLabel, iRow, 0, 1, 1, Qt::AlignRight); 107 159 108 pLineEdit = new QLineEdit;160 pLineEdit = new T; 109 161 if (!pLineEdit) 110 162 return; … … 112 164 113 165 pLabel->setBuddy(pLineEdit); 114 if (fIsPasswordField)115 pLineEdit->setEchoMode(QLineEdit::Password);116 166 ++iRow; 117 167 return; … … 124 174 return; 125 175 setLayout(pMainLayout); 126 127 addLineEdit(m_pUserNameFieldLabel, m_pUserNameField, pMainLayout); 128 addLineEdit(m_pPasswordFieldLabel, m_pPasswordField, pMainLayout, true); 129 addLineEdit(m_pPasswordRepeatFieldLabel, m_pPasswordRepeatField, pMainLayout, true); 176 int iRow = 0; 177 addLineEdit<QLineEdit>(iRow, m_pUserNameLabel, m_pUserNameLineEdit, pMainLayout); 178 addLineEdit<UIPasswordLineEdit>(iRow, m_pPasswordLabel, m_pPasswordLineEdit, pMainLayout); 179 addLineEdit<UIPasswordLineEdit>(iRow, m_pPasswordRepeatLabel, m_pPasswordRepeatLineEdit, pMainLayout); 180 181 connect(m_pPasswordLineEdit, &UIPasswordLineEdit::sigTextVisibilityToggled, 182 this, &UIUserNamePasswordEditor::sltHandlePasswordVisibility); 183 connect(m_pPasswordRepeatLineEdit, &UIPasswordLineEdit::sigTextVisibilityToggled, 184 this, &UIUserNamePasswordEditor::sltHandlePasswordVisibility); 130 185 131 186 retranslateUi(); 187 } 188 189 void UIUserNamePasswordEditor::sltHandlePasswordVisibility(bool fPasswordVisible) 190 { 191 if (m_pPasswordLineEdit) 192 m_pPasswordLineEdit->toggleTextVisibility(fPasswordVisible); 193 if (m_pPasswordRepeatLineEdit) 194 m_pPasswordRepeatLineEdit->toggleTextVisibility(fPasswordVisible); 132 195 } 133 196 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasicInstallSetup.h
r84906 r84915 23 23 24 24 /* Qt includes: */ 25 #include <QLineEdit> 25 26 #include <QWidget> 26 27 … … 32 33 class QGridLayout; 33 34 class QLabel; 34 class QLineEdit;35 35 class QSpinBox; 36 36 class QIRichTextLabel; 37 37 struct UIUnattendedInstallData; 38 39 class UIPasswordLineEdit : public QLineEdit 40 { 41 Q_OBJECT; 42 43 signals: 44 45 void sigTextVisibilityToggled(bool fTextVisible); 46 47 public: 48 49 UIPasswordLineEdit(QWidget *pParent = 0); 50 void toggleTextVisibility(bool fTextVisible); 51 52 protected: 53 54 virtual void paintEvent(QPaintEvent *pevent) /* override */; 55 56 private: 57 58 void prepare(); 59 60 QToolButton *m_pTextVisibilityButton; 61 62 private slots: 63 64 void sltHandleTextVisibilityChange(); 65 }; 38 66 39 67 class UIUserNamePasswordEditor : public QIWithRetranslateUI<QWidget> … … 59 87 60 88 void prepare(); 61 void addLineEdit(QLabel *&pLabel, QLineEdit *&pLineEdit, QGridLayout *pLayout, bool fIsPasswordField = false); 89 template <class T> 90 void addLineEdit(int &iRow, QLabel *&pLabel, T *&pLineEdit, QGridLayout *pLayout); 62 91 63 QLineEdit *m_pUserNameField;64 QLineEdit *m_pPasswordField;65 QLineEdit *m_pPasswordRepeatField;92 QLineEdit *m_pUserNameLineEdit; 93 UIPasswordLineEdit *m_pPasswordLineEdit; 94 UIPasswordLineEdit *m_pPasswordRepeatLineEdit; 66 95 67 QLabel *m_pUserName FieldLabel;68 QLabel *m_pPassword FieldLabel;69 QLabel *m_pPasswordRepeat FieldLabel;96 QLabel *m_pUserNameLabel; 97 QLabel *m_pPasswordLabel; 98 QLabel *m_pPasswordRepeatLabel; 70 99 100 private slots: 101 102 void sltHandlePasswordVisibility(bool fPasswordVisible); 71 103 }; 72 104 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasicNameType.cpp
r84890 r84915 347 347 int UIWizardNewVMPageBasicNameType::nextId() const 348 348 { 349 UIWizardNewVM *pWizard = qobject_cast<UIWizardNewVM*>(wizard());350 if (!pWizard || !pWizard->isUnattendedInstallEnabled())351 return UIWizardNewVM::PageHardware;349 // UIWizardNewVM *pWizard = qobject_cast<UIWizardNewVM*>(wizard()); 350 // if (!pWizard || !pWizard->isUnattendedInstallEnabled()) 351 // return UIWizardNewVM::PageHardware; 352 352 return UIWizardNewVM::PageInstallSetup; 353 353 }
Note:
See TracChangeset
for help on using the changeset viewer.