Changeset 7318 in vbox
- Timestamp:
- Mar 6, 2008 11:14:26 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxSelectorWnd.cpp
r7308 r7318 145 145 mErrBox = new QWidget(); 146 146 147 QVBoxLayout * pVLayout = new QVBoxLayout (mErrBox);148 pVLayout->setSpacing (10);147 QVBoxLayout *vLayout = new QVBoxLayout (mErrBox); 148 vLayout->setSpacing (10); 149 149 150 150 mErrLabel = new QLabel (mErrBox); 151 151 mErrLabel->setAlignment (Qt::WordBreak); 152 152 mErrLabel->setSizePolicy (QSizePolicy::Expanding, QSizePolicy::Fixed); 153 pVLayout->add (mErrLabel);153 vLayout->add (mErrLabel); 154 154 155 155 mErrText = new QTextBrowser (mErrBox); 156 156 mErrText->setFocusPolicy (Qt::StrongFocus); 157 157 mErrText->document()->setDefaultStyleSheet ("a { text-decoration: none; }"); 158 pVLayout->add (mErrText);158 vLayout->add (mErrText); 159 159 160 160 if (mRefreshAction) … … 163 163 mRefreshButton->setFocusPolicy (Qt::StrongFocus); 164 164 165 QHBoxLayout * pHLayout = new QHBoxLayout (pVLayout);166 pHLayout->addItem (new QSpacerItem (0, 0, QSizePolicy::Expanding,167 168 pHLayout->add (mRefreshButton);165 QHBoxLayout *hLayout = new QHBoxLayout (vLayout); 166 hLayout->addItem (new QSpacerItem (0, 0, QSizePolicy::Expanding, 167 QSizePolicy::Minimum)); 168 hLayout->add (mRefreshButton); 169 169 170 170 connect (mRefreshButton, SIGNAL (clicked()), … … 172 172 } 173 173 174 pVLayout->addItem (new QSpacerItem (0, 0, QSizePolicy::Minimum,175 QSizePolicy::Expanding));174 vLayout->addItem (new QSpacerItem (0, 0, QSizePolicy::Minimum, 175 QSizePolicy::Expanding)); 176 176 177 177 addWidget (mErrBox); … … 243 243 { 244 244 /* main layout */ 245 QVBoxLayout * pVMainLayout = new QVBoxLayout (this);246 pVMainLayout->setSpacing (10);247 pVMainLayout->setContentsMargins (0, 0, 0, 0);245 QVBoxLayout *vMainLayout = new QVBoxLayout (this); 246 vMainLayout->setSpacing (10); 247 vMainLayout->setContentsMargins (0, 0, 0, 0); 248 248 249 249 /* mBrowser */ … … 252 252 mBrowser->setFocusPolicy (Qt::StrongFocus); 253 253 mBrowser->document()->setDefaultStyleSheet ("a { text-decoration: none; }"); 254 pVMainLayout->addWidget (mBrowser);254 vMainLayout->addWidget (mBrowser); 255 255 /* hidden by default */ 256 256 mBrowser->setHidden (true); … … 260 260 mLabel->setSizePolicy (QSizePolicy::Expanding, QSizePolicy::Expanding); 261 261 mLabel->setAlignment (Qt::AlignCenter | Qt::WordBreak); 262 pVMainLayout->addWidget (mLabel);262 vMainLayout->addWidget (mLabel); 263 263 /* always disabled */ 264 264 mLabel->setEnabled (false); 265 265 266 266 /* button layout */ 267 QHBoxLayout * pHBtnLayout = new QHBoxLayout (pVMainLayout);268 pHBtnLayout->setSpacing (10);269 pHBtnLayout->addItem (new QSpacerItem (0, 0,270 271 267 QHBoxLayout *hBtnLayout = new QHBoxLayout (vMainLayout); 268 hBtnLayout->setSpacing (10); 269 hBtnLayout->addItem (new QSpacerItem (0, 0, 270 QSizePolicy::Expanding, 271 QSizePolicy::Minimum)); 272 272 273 273 /* button */ … … 280 280 mBtnEdit->setUsesTextLabel (true); 281 281 connect (mBtnEdit, SIGNAL (clicked()), this, SLOT (goToSettings())); 282 pHBtnLayout->addWidget (mBtnEdit);283 284 pVMainLayout->addItem (new QSpacerItem (0, 0,285 QSizePolicy::Expanding,286 QSizePolicy::Minimum));282 hBtnLayout->addWidget (mBtnEdit); 283 284 vMainLayout->addItem (new QSpacerItem (0, 0, 285 QSizePolicy::Expanding, 286 QSizePolicy::Minimum)); 287 287 288 288 /* apply language settings */ … … 449 449 /* central widget & horizontal layout */ 450 450 setCentralWidget (new QWidget (this)); 451 QHBoxLayout * pCentralLayout =451 QHBoxLayout *centralLayout = 452 452 new QHBoxLayout (centralWidget()); 453 pCentralLayout->setSpacing (9);454 pCentralLayout->setContentsMargins (5, 5, 5, 5);453 centralLayout->setSpacing (9); 454 centralLayout->setContentsMargins (5, 5, 5, 5); 455 455 456 456 /* left vertical box */ 457 QVBoxLayout * pLeftVLayout = new QVBoxLayout ();458 pLeftVLayout->setSpacing (5);457 QVBoxLayout *leftVLayout = new QVBoxLayout (); 458 leftVLayout->setSpacing (5); 459 459 /* right vertical box */ 460 QVBoxLayout * pRightVLayout = new QVBoxLayout ();461 pRightVLayout->setSpacing (5);462 pCentralLayout->addLayout (pLeftVLayout, 3);463 pCentralLayout->addLayout (pRightVLayout, 3);460 QVBoxLayout *rightVLayout = new QVBoxLayout (); 461 rightVLayout->setSpacing (5); 462 centralLayout->addLayout (leftVLayout, 3); 463 centralLayout->addLayout (rightVLayout, 3); 464 464 465 465 /* VM list toolbar */ 466 466 VBoxToolBar *vmTools = new VBoxToolBar (this); 467 pLeftVLayout->addWidget(vmTools);467 leftVLayout->addWidget(vmTools); 468 468 469 469 /* VM list box */ 470 470 vmListBox = new VBoxVMListBox (); 471 pLeftVLayout->addWidget (vmListBox);471 leftVLayout->addWidget (vmListBox); 472 472 473 473 /* VM tab widget containing details and snapshots tabs */ 474 474 vmTabWidget = new QTabWidget (); 475 pRightVLayout->addWidget (vmTabWidget);475 rightVLayout->addWidget (vmTabWidget); 476 476 vmTabWidget->setMargin (10); 477 477 … … 519 519 /* add actions to menubar */ 520 520 521 QMenu *fileMenu = menuBar()->addMenu (tr("&File"));521 QMenu *fileMenu = menuBar()->addMenu (tr ("&File")); 522 522 fileDiskMgrAction->addTo( fileMenu ); 523 523 fileMenu->insertSeparator(); … … 528 528 menuBar()->insertItem( QString::null, fileMenu, 1); 529 529 530 QMenu *vmMenu = menuBar()->addMenu (tr("&Machine"));530 QMenu *vmMenu = menuBar()->addMenu (tr ("&Machine")); 531 531 vmNewAction->addTo (vmMenu); 532 532 vmMenu->insertSeparator(); … … 558 558 vmShowLogsAction->addTo (mVMCtxtMenu); 559 559 560 QMenu *helpMenu = menuBar()->addMenu (tr("&Help"));560 QMenu *helpMenu = menuBar()->addMenu (tr ("&Help")); 561 561 helpContentsAction->addTo (helpMenu); 562 562 helpWebAction->addTo (helpMenu);
Note:
See TracChangeset
for help on using the changeset viewer.