Changeset 60932 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- May 10, 2016 4:34:28 PM (9 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic1.cpp
r60930 r60932 31 31 # include "UIMessageCenter.h" 32 32 # include "UINameAndSystemEditor.h" 33 # include "UIFilePathSelector.h" 33 34 # include "QIRichTextLabel.h" 34 35 … … 204 205 } 205 206 207 void UIWizardNewVMPage1::adjustToolTip(const QString &strNewName /* = QString() */) 208 { 209 /* Compose tool-tip: */ 210 QString strToolTip; 211 /* If name is empty: */ 212 if (strNewName.isEmpty()) 213 { 214 /* We are just reseting the tool-tip to default: */ 215 strToolTip = UIWizardNewVM::tr("<p><nobr>Holds the name or full path to the virtual " 216 "machine folder you are about to create.</nobr></p>"); 217 } 218 /* If name is NOT empty: */ 219 else 220 { 221 /* Compose the machine file-path, acquire the machine folder from it: */ 222 const QString strMachineFilePath = composeMachineFilePath(strNewName); 223 const QString strMachineFolder = QDir::toNativeSeparators(QFileInfo(strMachineFilePath).absolutePath()); 224 /* And compose the location-editor tool-tip accordingly: */ 225 strToolTip = UIWizardNewVM::tr("<p><nobr>You are about to create the virtual machine in the " 226 "following folder:</nobr><br><nobr><b>%1</b></nobr></p>") 227 .arg(strMachineFolder); 228 } 229 /* Assign tool-tip: */ 230 m_pNameAndSystemEditor->locationEditor()->setToolTip(strToolTip); 231 } 232 206 233 bool UIWizardNewVMPage1::machineFolderCreated() 207 234 { … … 291 318 /* Setup connections: */ 292 319 connect(m_pNameAndSystemEditor, SIGNAL(sigNameChanged(const QString &)), this, SLOT(sltNameChanged(const QString &))); 320 connect(m_pNameAndSystemEditor, SIGNAL(sigNameChanged(const QString &)), this, SLOT(sltAdjustToolTip(const QString &))); 293 321 connect(m_pNameAndSystemEditor, SIGNAL(sigOsTypeChanged()), this, SLOT(sltOsTypeChanged())); 294 322 … … 299 327 registerField("machineBaseName", this, "machineBaseName"); 300 328 registerField("machineFilePath", this, "machineFilePath"); 329 330 /* Initialize tool-tip: */ 331 adjustToolTip(); 301 332 } 302 333 … … 305 336 /* Call to base-class: */ 306 337 onNameChanged(strNewName); 338 } 339 340 void UIWizardNewVMPageBasic1::sltAdjustToolTip(const QString &strNewName) 341 { 342 /* Call to base-class: */ 343 adjustToolTip(strNewName); 307 344 } 308 345 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic1.h
r60930 r60932 37 37 void onNameChanged(QString strNewName); 38 38 void onOsTypeChanged(); 39 40 /** Adjusts tool-tip according to @a strNewName. */ 41 void adjustToolTip(const QString &strNewName = QString()); 39 42 40 43 /* Helping stuff: */ … … 101 104 void sltOsTypeChanged(); 102 105 106 /** Adjusts tool-tip according to @a strNewName. */ 107 void sltAdjustToolTip(const QString &strNewName); 108 103 109 private: 104 110 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.cpp
r60839 r60932 139 139 /* Setup connections: */ 140 140 connect(m_pNameAndSystemEditor, SIGNAL(sigNameChanged(const QString &)), this, SLOT(sltNameChanged(const QString &))); 141 connect(m_pNameAndSystemEditor, SIGNAL(sigNameChanged(const QString &)), this, SLOT(sltAdjustToolTip(const QString &))); 141 142 connect(m_pNameAndSystemEditor, SIGNAL(sigOsTypeChanged()), this, SLOT(sltOsTypeChanged())); 142 143 connect(m_pRamSlider, SIGNAL(valueChanged(int)), this, SLOT(sltRamSliderValueChanged())); … … 160 161 registerField("virtualDiskId", this, "virtualDiskId"); 161 162 registerField("virtualDiskLocation", this, "virtualDiskLocation"); 163 164 /* Initialize tool-tip: */ 165 adjustToolTip(); 162 166 } 163 167 … … 174 178 /* Broadcast complete-change: */ 175 179 emit completeChanged(); 180 } 181 182 void UIWizardNewVMPageExpert::sltAdjustToolTip(const QString &strNewName) 183 { 184 /* Call to base-class: */ 185 adjustToolTip(strNewName); 176 186 } 177 187 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.h
r60839 r60932 65 65 void sltGetWithFileOpenDialog(); 66 66 67 /** Adjusts tool-tip according to @a strNewName. */ 68 void sltAdjustToolTip(const QString &strNewName); 69 67 70 private: 68 71
Note:
See TracChangeset
for help on using the changeset viewer.