Changeset 10780 in vbox for trunk/src/VBox/Frontends/VirtualBox4
- Timestamp:
- Jul 21, 2008 2:29:49 PM (16 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox4
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox4/include/VBoxFilePathSelectorWidget.h
r10741 r10780 34 34 35 35 class QLabel; 36 class QLineEdit;37 36 class QToolButton; 38 37 class QFileIconProvider; 39 38 class QComboBox; 39 class QILabel; 40 40 41 41 class VBoxFilePathSelectorWidget: public QIWithRetranslateUI<QWidget> … … 60 60 bool isResetEnabled () const; 61 61 62 void set LineEditWhatsThis (const QString &aText);62 void setPathWhatsThis (const QString &aText); 63 63 void setSelectorWhatsThis (const QString &aText); 64 64 void setResetWhatsThis (const QString &aText); … … 99 99 #else /* VBOX_USE_COMBOBOX_PATH_SELECTOR */ 100 100 QLabel *mLbIcon; 101 Q LineEdit *mLePath;101 QILabel *mLbPath; 102 102 QToolButton *mTbSelect; 103 103 QToolButton *mTbReset; -
trunk/src/VBox/Frontends/VirtualBox4/src/QILabel.cpp
r9968 r10780 268 268 /* Some constant predefines */ 269 269 const QRegExp QILabelPrivate::mCopyRegExp = QRegExp ("<[^>]*>"); 270 QRegExp QILabelPrivate::mElideRegExp = QRegExp ("(<compact\\s+elipsis=\"(start|middle|end)\"?>([^<] +)</compact>)");270 QRegExp QILabelPrivate::mElideRegExp = QRegExp ("(<compact\\s+elipsis=\"(start|middle|end)\"?>([^<]*)</compact>)"); 271 271 272 272 #define HOR_PADDING 1 … … 425 425 /* Only set the tooltip if the text is shortened in any way. */ 426 426 if (removeHtmlTags (comp) != removeHtmlTags (mText)) 427 setToolTip ( mText);427 setToolTip (removeHtmlTags (mText)); 428 428 else 429 429 setToolTip (""); -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxFilePathSelectorWidget.cpp
r10741 r10780 23 23 #include "VBoxFilePathSelectorWidget.h" 24 24 #include "VBoxGlobal.h" 25 #include "QILabel.h" 25 26 26 27 /* Qt includes */ … … 32 33 #else /* VBOX_USE_COMBOBOX_PATH_SELECTOR */ 33 34 # include <QLabel> 34 # include <QLineEdit>35 35 # include <QToolButton> 36 36 #endif /* !VBOX_USE_COMBOBOX_PATH_SELECTOR */ … … 90 90 } 91 91 92 void VBoxFilePathSelectorWidget::set LineEditWhatsThis (const QString &aText)92 void VBoxFilePathSelectorWidget::setPathWhatsThis (const QString &aText) 93 93 { 94 94 #ifdef VBOX_USE_COMBOBOX_PATH_SELECTOR 95 95 NOREF (aText); 96 96 #else /* VBOX_USE_COMBOBOX_PATH_SELECTOR */ 97 mL ePath->setWhatsThis (aText);97 mLbPath->setWhatsThis (aText); 98 98 #endif /* !VBOX_USE_COMBOBOX_PATH_SELECTOR */ 99 99 } … … 119 119 bool VBoxFilePathSelectorWidget::isModified() const 120 120 { 121 #ifdef VBOX_USE_COMBOBOX_PATH_SELECTOR122 121 return true; 123 #else /* VBOX_USE_COMBOBOX_PATH_SELECTOR */124 return mLePath->isModified();125 #endif /* !VBOX_USE_COMBOBOX_PATH_SELECTOR */126 122 } 127 123 … … 142 138 mCbPath->setItemIcon (PathId, icon); 143 139 #else /* VBOX_USE_COMBOBOX_PATH_SELECTOR */ 144 /* Do this instead of le->setText (folder) to cause 145 * isModified() return true */ 146 mLePath->selectAll(); 147 mLePath->insert (filePath (tmpPath, false)); 140 mLbPath->setText (QString ("<compact elipsis=\"start\">%1</compact>").arg (tmpPath)); 148 141 mLbIcon->setPixmap (icon.pixmap (16, 16)); 149 142 #endif /* !VBOX_USE_COMBOBOX_PATH_SELECTOR */ … … 203 196 #else /* VBOX_USE_COMBOBOX_PATH_SELECTOR */ 204 197 mLbIcon = new QLabel(); 205 mLePath = new QLineEdit(); 206 mLePath->setMinimumWidth (180); 207 mLePath->setReadOnly (true); 198 mLbPath = new QILabel(); 199 mLbPath->setSizePolicy (QSizePolicy (QSizePolicy::Expanding, QSizePolicy::Fixed)); 200 mLbPath->setMinimumWidth (180); 201 mLbPath->setFullSizeSelection (true); 208 202 mTbSelect = new QToolButton(); 209 203 mTbSelect->setIcon (QIcon (":/select_file_16px.png")); … … 218 212 219 213 layout->addWidget (mLbIcon); 220 layout->addWidget (mL ePath);214 layout->addWidget (mLbPath); 221 215 layout->addWidget (mTbSelect); 222 216 layout->addWidget (mTbReset); -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxGLSettingsGeneral.cpp
r10658 r10780 76 76 Ui::VBoxGLSettingsGeneral::retranslateUi (this); 77 77 78 mPsVdi->set LineEditWhatsThis (tr ("Displays the path to the default VDI folder. This folder is used, if not explicitly specified otherwise, when adding existing or creating new virtual hard disks."));78 mPsVdi->setPathWhatsThis (tr ("Displays the path to the default VDI folder. This folder is used, if not explicitly specified otherwise, when adding existing or creating new virtual hard disks.")); 79 79 mPsVdi->setSelectorWhatsThis (tr ("Opens a dialog to select the default VDI folder.")); 80 80 mPsVdi->setResetWhatsThis (tr ("Resets the VDI folder path to the default value. The actual default path will be displayed after accepting the changes and opening this dialog again.")); 81 81 82 mPsMach->set LineEditWhatsThis (tr ("Displays the path to the default virtual machine folder. This folder is used, if not explicitly specified otherwise, when creating new virtual machines."));82 mPsMach->setPathWhatsThis (tr ("Displays the path to the default virtual machine folder. This folder is used, if not explicitly specified otherwise, when creating new virtual machines.")); 83 83 mPsMach->setSelectorWhatsThis (tr ("Opens a dialog to select the default virtual machine folder.")); 84 84 mPsMach->setResetWhatsThis (tr ("Resets the virtual machine folder path to the default value. The actual default path will be displayed after accepting the changes and opening this dialog again.")); 85 85 86 mPsVRDP->set LineEditWhatsThis (tr ("Displays the path to the library that provides authentication for Remote Display (VRDP) clients."));86 mPsVRDP->setPathWhatsThis (tr ("Displays the path to the library that provides authentication for Remote Display (VRDP) clients.")); 87 87 mPsVRDP->setSelectorWhatsThis (tr ("Opens a dialog to select the VRDP authentication library file.")); 88 88 mPsVRDP->setResetWhatsThis (tr ("Resets the authentication library file to the default value. The actual default library file will be displayed after accepting the changes and opening this dialog again.")); -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxVMSettingsGeneral.cpp
r10670 r10780 377 377 378 378 /* Path selector */ 379 mPsSnapshot->set LineEditWhatsThis (tr ("Displays the path where snapshots of this virtual machine will be stored. Note that snapshots can take quite a lot of disk space."));379 mPsSnapshot->setPathWhatsThis (tr ("Displays the path where snapshots of this virtual machine will be stored. Note that snapshots can take quite a lot of disk space.")); 380 380 mPsSnapshot->setSelectorWhatsThis (tr ("Selects the snapshot folder path.")); 381 381 mPsSnapshot->setResetWhatsThis (tr ("Resets the snapshot folder path to the default value. The actual default path will be displayed after accepting the changes and opening this dialog again."));
Note:
See TracChangeset
for help on using the changeset viewer.