- Timestamp:
- Jun 27, 2013 12:03:39 PM (12 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/VBoxLicenseViewer.cpp
r45358 r46831 23 23 #include "VBoxLicenseViewer.h" 24 24 #include "QIDialogButtonBox.h" 25 #include "VBoxGlobal.h"26 25 #include "UIMessageCenter.h" 27 26 … … 59 58 QVBoxLayout *mainLayout = new QVBoxLayout (this); 60 59 mainLayout->setSpacing (10); 61 VBoxGlobal::setLayoutMargin (mainLayout, 10);60 mainLayout->setContentsMargins(10, 10, 10, 10); 62 61 mainLayout->addWidget (mLicenseText); 63 62 mainLayout->addWidget (dbb); -
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIAdvancedSlider.cpp
r46496 r46831 19 19 20 20 #include "QIAdvancedSlider.h" 21 #include "VBoxGlobal.h"22 21 23 22 /* Qt includes */ … … 263 262 264 263 QVBoxLayout *pMainLayout = new QVBoxLayout(this); 265 VBoxGlobal::setLayoutMargin(pMainLayout, 0);264 pMainLayout->setContentsMargins(0, 0, 0, 0); 266 265 m_pSlider = new CPrivateSlider(fOrientation, this); 267 266 pMainLayout->addWidget(m_pSlider); -
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIArrowSplitter.cpp
r45307 r46831 19 19 20 20 /* VBox includes */ 21 #include "VBoxGlobal.h"22 21 #include "QIArrowSplitter.h" 23 22 24 23 /* Qt includes */ 24 #include <QApplication> 25 25 #include <QHBoxLayout> 26 26 #include <QKeyEvent> … … 35 35 { 36 36 /* Setup main-layout */ 37 VBoxGlobal::setLayoutMargin (mMainLayout, 0);37 mMainLayout->setContentsMargins(0, 0, 0, 0); 38 38 mMainLayout->setSpacing(3); 39 39 … … 49 49 /* Setup button layout */ 50 50 QHBoxLayout *buttonLayout = new QHBoxLayout(); 51 VBoxGlobal::setLayoutMargin (buttonLayout, 0);51 buttonLayout->setContentsMargins(0, 0, 0, 0); 52 52 buttonLayout->setSpacing (0); 53 53 buttonLayout->addWidget (mSwitchButton); -
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QILabelSeparator.cpp
r44528 r46831 24 24 /* Local includes */ 25 25 #include "QILabelSeparator.h" 26 #include "VBoxGlobal.h"27 26 28 27 QILabelSeparator::QILabelSeparator (QWidget *aParent /* = NULL */, Qt::WindowFlags aFlags /* = 0 */) … … 73 72 74 73 QHBoxLayout *pLayout = new QHBoxLayout (this); 75 VBoxGlobal::setLayoutMargin (pLayout, 0);74 pLayout->setContentsMargins(0, 0, 0, 0); 76 75 pLayout->addWidget (mLabel); 77 76 pLayout->addWidget (separator, Qt::AlignBottom); -
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIMessageBox.cpp
r45362 r46831 33 33 #include "QIArrowSplitter.h" 34 34 #include "QIDialogButtonBox.h" 35 #include "VBoxGlobal.h" 35 36 /* Other VBox includes: */ 37 #include <VBox/sup.h> 36 38 37 39 QIMessageBox::QIMessageBox(const QString &strCaption, const QString &strMessage, AlertIconType iconType, … … 202 204 pMainLayout->setSpacing(15); 203 205 #else /* !Q_WS_MAC */ 204 VBoxGlobal::setLayoutMargin(pMainLayout, 11);206 pMainLayout->setContentsMargins(11, 11, 11, 11); 205 207 pMainLayout->setSpacing(10); 206 208 #endif /* !Q_WS_MAC */ … … 211 213 pMainLayout->addLayout(pTopLayout); 212 214 /* Configure layout: */ 213 VBoxGlobal::setLayoutMargin(pTopLayout, 0);215 pTopLayout->setContentsMargins(0, 0, 0, 0); 214 216 pTopLayout->setSpacing(10); 215 217 /* Create icon-label: */ -
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIRichToolButton.cpp
r44528 r46831 19 19 20 20 /* VBox includes */ 21 #include "VBoxGlobal.h"22 21 #include "QIRichToolButton.h" 23 22 24 23 /* Qt includes */ 24 #include <QApplication> 25 25 #include <QLabel> 26 26 #include <QHBoxLayout> … … 64 64 /* Setup main-layout */ 65 65 QHBoxLayout *mainLayout = new QHBoxLayout (this); 66 VBoxGlobal::setLayoutMargin (mainLayout, 0);66 mainLayout->setContentsMargins(0, 0, 0, 0); 67 67 mainLayout->setSpacing (0); 68 68 mainLayout->addWidget (mButton); -
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.h
r46797 r46831 343 343 static QList <QPair <QString, QString> > DVDBackends(); 344 344 static QList <QPair <QString, QString> > FloppyBackends(); 345 346 /* Qt 4.2.0 support function */347 static inline void setLayoutMargin (QLayout *aLayout, int aMargin)348 {349 #if QT_VERSION < 0x040300350 /* Deprecated since > 4.2 */351 aLayout->setMargin (aMargin);352 #else353 /* New since > 4.2 */354 aLayout->setContentsMargins (aMargin, aMargin, aMargin, aMargin);355 #endif356 }357 345 358 346 static QString documentsPath(); -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumManager.cpp
r46756 r46831 190 190 191 191 QHBoxLayout *layout = new QHBoxLayout (this); 192 VBoxGlobal::setLayoutMargin (layout, 0);192 layout->setContentsMargins(0, 0, 0, 0); 193 193 layout->addWidget (mText); 194 194 layout->addWidget (mProgressBar); … … 367 367 mToolBar->setMacToolbar(); 368 368 /* No spacing/margin on the mac */ 369 VBoxGlobal::setLayoutMargin (mainLayout, 0);369 mainLayout->setContentsMargins(0, 0, 0, 0); 370 370 mainLayout->insertSpacing (0, 10); 371 371 #else /* MAC_LEOPARD_STYLE */ … … 374 374 /* Set spacing/margin like in the selector window */ 375 375 mainLayout->setSpacing (5); 376 VBoxGlobal::setLayoutMargin (mainLayout, 5);376 mainLayout->setContentsMargins(5, 5, 5, 5); 377 377 #endif /* MAC_LEOPARD_STYLE */ 378 378 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp
r46797 r46831 240 240 QWidget *pIndicatorBox = new QWidget; 241 241 QHBoxLayout *pIndicatorBoxHLayout = new QHBoxLayout(pIndicatorBox); 242 VBoxGlobal::setLayoutMargin(pIndicatorBoxHLayout, 0);242 pIndicatorBoxHLayout->setContentsMargins(0, 0, 0, 0); 243 243 pIndicatorBoxHLayout->setSpacing(5); 244 244 bool fAtLeastOneAddedToLeftSection = false; … … 335 335 if (QHBoxLayout *pContainerLayoutHostkey = new QHBoxLayout(pContainerWidgetHostkey)) 336 336 { 337 VBoxGlobal::setLayoutMargin(pContainerLayoutHostkey, 0);337 pContainerLayoutHostkey->setContentsMargins(0, 0, 0, 0); 338 338 pContainerLayoutHostkey->setSpacing(3); 339 339 m_pNameHostkey = new QLabel(UIHostCombo::toReadableString(vboxGlobal().settings().hostCombo())); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/VBoxSettingsSelector.cpp
r42261 r46831 21 21 #include <QHeaderView> 22 22 #include <QTabWidget> 23 #include <QLayout> 24 #include <QAction> 23 25 24 26 /* Local includes */ 25 27 #include "VBoxSettingsSelector.h" 26 28 #include "UISettingsPage.h" 27 #include "VBoxGlobal.h"28 29 #include "UIToolBar.h" 29 30 #include "QITreeWidget.h" … … 231 232 twitem->setIcon (treeWidget_Category, item->icon()); 232 233 aPage->setContentsMargins (0, 0, 0, 0); 233 VBoxGlobal::setLayoutMargin (aPage->layout(), 0);234 aPage->layout()->setContentsMargins(0, 0, 0, 0); 234 235 result = aPage; 235 236 } … … 424 425 mTbSelector->addAction (item->action()); 425 426 aPage->setContentsMargins (0, 0, 0, 0); 426 VBoxGlobal::setLayoutMargin (aPage->layout(), 0);427 aPage->layout()->setContentsMargins(0, 0, 0, 0); 427 428 result = aPage; 428 429 } … … 446 447 QTabWidget *tabWidget = parent->tabWidget(); 447 448 aPage->setContentsMargins (9, 5, 9, 9); 448 VBoxGlobal::setLayoutMargin (aPage->layout(), 0);449 aPage->layout()->setContentsMargins(0, 0, 0, 0); 449 450 QIcon icon1 (aSmallIcon); 450 451 if (!aSmallIconDisabled.isEmpty()) -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/VBoxWarningPane.cpp
r37106 r46831 23 23 /* Local includes */ 24 24 #include "VBoxWarningPane.h" 25 #include "VBoxGlobal.h"26 25 27 26 VBoxWarningPane::VBoxWarningPane(QWidget *pParent) … … 29 28 { 30 29 QHBoxLayout *pLayout = new QHBoxLayout(this); 31 VBoxGlobal::setLayoutMargin(pLayout, 0);30 pLayout->setContentsMargins(0, 0, 0, 0); 32 31 pLayout->addWidget(&m_icon); 33 32 pLayout->addWidget(&m_label);
Note:
See TracChangeset
for help on using the changeset viewer.