- Timestamp:
- Mar 5, 2007 2:23:04 PM (18 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/VBoxSelectorWnd.cpp
r1177 r1215 224 224 QToolButton *mBtnEdit; 225 225 QTextBrowser *mBrowser; 226 QBrush mBrowserPaper; 226 227 }; 227 228 … … 232 233 { 233 234 /* main layout creation */ 234 QVBoxLayout *mainLayout = new QVBoxLayout (this, 10, 10, "mainLayout"); 235 QVBoxLayout *mainLayout = new QVBoxLayout (this, 0, 10, "mainLayout"); 236 235 237 /* mBrowser creation */ 236 238 mBrowser = new QTextBrowser (this, "mBrowser"); 239 mBrowserPaper = mBrowser->paper(); 237 240 mBrowser->setSizePolicy (QSizePolicy::Expanding, QSizePolicy::Expanding); 238 241 mBrowser->setFocusPolicy (QWidget::StrongFocus); 239 242 mBrowser->setLinkUnderline (false); 240 mBrowser->setFrameShape (QFrame::NoFrame);241 mBrowser->setPaper (backgroundBrush());242 243 mainLayout->addWidget (mBrowser); 244 243 245 /* button layout creation */ 244 246 QHBoxLayout *btnLayout = new QHBoxLayout (mainLayout, 10, "btnLayout"); 245 QSpacerItem *spacer =new QSpacerItem (0, 0,246 247 QSizePolicy::Minimum);248 btnLayout->addItem (spacer); 247 btnLayout->addItem (new QSpacerItem (0, 0, 248 QSizePolicy::Expanding, 249 QSizePolicy::Minimum)); 250 249 251 /* button creation */ 250 252 mBtnEdit = new QToolButton (this, "mBtnEdit"); 253 mBtnEdit->setSizePolicy (QSizePolicy::Preferred, QSizePolicy::Fixed); 251 254 mBtnEdit->setFocusPolicy (QWidget::StrongFocus); 252 255 mBtnEdit->setIconSet (VBoxGlobal::iconSet ("edit_shared_folder_16px.png", … … 257 260 btnLayout->addWidget (mBtnEdit); 258 261 262 mainLayout->addItem (new QSpacerItem (0, 0, 263 QSizePolicy::Expanding, 264 QSizePolicy::Minimum)); 265 259 266 /* apply language settings */ 260 267 languageChange(); … … 263 270 void VBoxVMDescriptionPage::setMachine (const CMachine &aMachine) 264 271 { 265 mBrowser->setText (aMachine.GetDescription()); 272 QString text = aMachine.GetDescription(); 273 if (text.isEmpty()) 274 text = QString::null; 275 276 if (!text.isNull()) 277 { 278 mBrowser->setText (text); 279 mBrowser->setPaper (mBrowserPaper); 280 mBrowser->setEnabled (true); 281 } 282 else 283 { 284 mBrowser->setText (tr ("No description. Press the Edit button below to add it.")); 285 mBrowser->setEnabled (false); 286 mBrowser->setPaper (backgroundBrush()); 287 } 266 288 } 267 289 … … 270 292 mBtnEdit->setTextLabel (tr ("Edit")); 271 293 mBtnEdit->setAccel (QString ("Ctrl+E")); 294 QToolTip::add (mBtnEdit, tr ("Edit (Ctrl+E)")); 272 295 } 273 296 … … 910 933 vmTabWidget->changeTab (vmDetailsView, tr ("&Details")); 911 934 vmTabWidget->changeTab (vmSnapshotsWgt, tr ("&Snapshots")); 912 vmTabWidget->changeTab (vmDescriptionPage, tr ("D es&cription"));935 vmTabWidget->changeTab (vmDescriptionPage, tr ("D&escription")); 913 936 914 937 /* ensure the details and screenshot view are updated */ -
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMSettingsDlg.ui
r1177 r1215 1199 1199 <number>10</number> 1200 1200 </property> 1201 <widget class="Q GroupBox">1201 <widget class="QTextEdit"> 1202 1202 <property name="name"> 1203 <cstring>gbDescription</cstring> 1204 </property> 1205 <property name="title"> 1206 <string>Virtual Machine &Description</string> 1207 </property> 1208 <vbox> 1209 <property name="name"> 1210 <cstring>unnamed</cstring> 1211 </property> 1212 <widget class="QTextEdit"> 1213 <property name="name"> 1214 <cstring>teDescription</cstring> 1215 </property> 1216 </widget> 1217 </vbox> 1203 <cstring>teDescription</cstring> 1204 </property> 1205 <property name="whatsThis" stdset="0"> 1206 <string>Displays the description of 1207 the virtual machine. The description 1208 field is useful for commenting 1209 configuration details of the installed 1210 guest OS.</string> 1211 </property> 1218 1212 </widget> 1219 1213 </vbox>
Note:
See TracChangeset
for help on using the changeset viewer.