儲存庫 vbox 的更動 51937
- 時間撮記:
- 2014-7-8 下午04:01:15 (10 年 以前)
- 位置:
- trunk/src/VBox/Frontends/VirtualBox
- 檔案:
-
- 修改 13 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
r51901 r51937 387 387 src/widgets/UISpacerWidgets.h \ 388 388 src/widgets/UISpecialControls.h \ 389 src/widgets/UIToolBar.h \ 389 390 src/widgets/VBoxFilePathSelectorWidget.h \ 390 391 src/widgets/VBoxMediaComboBox.h \ -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp
r51933 r51937 1214 1214 } 1215 1215 /* Initial focus: */ 1216 m_pViewOfChooser->setFocus(); 1216 if (m_pViewOfChooser) 1217 m_pViewOfChooser->setFocus(); 1217 1218 } 1218 1219 } … … 1237 1238 /* Enable unified tool-bars on Mac OS X. Available on Qt >= 4.3: */ 1238 1239 addToolBar(m_pToolBar); 1239 m_pToolBar-> setMacToolbar();1240 m_pToolBar->enableMacToolbar(); 1240 1241 #else /* !MAC_LEOPARD_STYLE */ 1241 1242 /* Add tool-bar into main-layout: */ -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumManager.cpp
r51267 r51937 1152 1152 /* Enable unified tool-bars on Mac OS X. Available on Qt >= 4.3: */ 1153 1153 addToolBar(m_pToolBar); 1154 m_pToolBar-> setMacToolbar();1154 m_pToolBar->enableMacToolbar(); 1155 1155 /* No spacing/margin on the Mac: */ 1156 1156 pMainLayout->setContentsMargins(0, 0, 0, 0); -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.cpp
r51931 r51937 121 121 * We do this after setting the window pos/size, cause Qt sometimes 122 122 * includes the toolbar height in the content height. */ 123 mVMToolBar-> setMacToolbar();123 mVMToolBar->enableMacToolbar(); 124 124 # endif /* MAC_LEOPARD_STYLE */ 125 125 -
trunk/src/VBox/Frontends/VirtualBox/src/selector/VBoxSnapshotsWgt.cpp
r51679 r51937 375 375 /* ToolBar creation */ 376 376 UIToolBar *toolBar = new UIToolBar (this); 377 toolBar->setUsesTextLabel (false);378 377 toolBar->setIconSize (QSize (22, 22)); 379 378 toolBar->setSizePolicy (QSizePolicy::Fixed, QSizePolicy::Fixed); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialog.cpp
r51287 r51937 85 85 /* Create modern tool-bar selector: */ 86 86 m_pSelector = new VBoxSettingsToolBarSelector(this); 87 static_cast<UIToolBar*>(m_pSelector->widget())-> setMacToolbar();87 static_cast<UIToolBar*>(m_pSelector->widget())->enableMacToolbar(); 88 88 addToolBar(qobject_cast<QToolBar*>(m_pSelector->widget())); 89 89 /* No title in this mode, we change the title of the window: */ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/VBoxSettingsSelector.cpp
r51287 r51937 379 379 /* Init the toolbar */ 380 380 mTbSelector = new UIToolBar (aParent); 381 mTbSelector->setUse sTextLabel(true);381 mTbSelector->setUseTextLabels (true); 382 382 mTbSelector->setIconSize (QSize (32, 32)); 383 383 #ifdef Q_WS_MAC -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsExtension.cpp
r47193 r51937 102 102 103 103 /* Setup tool-bar: */ 104 m_pPackagesToolbar->setUsesTextLabel(false);105 104 m_pPackagesToolbar->setIconSize(QSize(16, 16)); 106 105 m_pPackagesToolbar->setOrientation(Qt::Vertical); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsNetwork.cpp
r50879 r51937 451 451 /* Prepare NAT network toolbar: */ 452 452 { 453 m_pToolbarNetworkNAT->setUsesTextLabel(false);454 453 m_pToolbarNetworkNAT->setIconSize(QSize(16, 16)); 455 454 m_pToolbarNetworkNAT->setOrientation(Qt::Vertical); … … 460 459 /* Prepare Host network toolbar: */ 461 460 { 462 m_pToolbarNetworkHost->setUsesTextLabel(false);463 461 m_pToolbarNetworkHost->setIconSize(QSize(16, 16)); 464 462 m_pToolbarNetworkHost->setOrientation(Qt::Vertical); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSF.cpp
r47149 r51937 188 188 189 189 /* Prepare tool-bar: */ 190 m_pFoldersToolBar->setUsesTextLabel(false);191 190 m_pFoldersToolBar->setIconSize(QSize(16, 16)); 192 191 m_pFoldersToolBar->setOrientation(Qt::Vertical); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsUSB.cpp
r51355 r51937 176 176 177 177 /* Prepare tool-bar: */ 178 m_pFiltersToolBar->setUsesTextLabel(false);179 178 m_pFiltersToolBar->setIconSize(QSize(16, 16)); 180 179 m_pFiltersToolBar->setOrientation(Qt::Vertical); -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIToolBar.cpp
r48534 r51937 1 1 /* $Id$ */ 2 2 /** @file 3 * 4 * VBox frontends: Qt GUI ("VirtualBox"): 5 * UIToolBar class implementation 3 * VBox Qt GUI - UIToolBar class implementation. 6 4 */ 7 5 8 6 /* 9 * Copyright (C) 2006-201 3Oracle Corporation7 * Copyright (C) 2006-2014 Oracle Corporation 10 8 * 11 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 18 16 */ 19 17 20 /* Local includes */ 18 /* Qt includes: */ 19 #include <QLayout> 20 #include <QMainWindow> 21 #include <QWindowsStyle> 22 #include <QCleanlooksStyle> 23 24 /* GUI includes: */ 21 25 #include "UIToolBar.h" 22 26 #ifdef Q_WS_MAC … … 24 28 #endif /* Q_WS_MAC */ 25 29 26 /* Qt includes: */ 27 #include <QLayout> 28 #include <QMainWindow> 29 /* Note: These styles are available on _all_ platforms: */ 30 #include <QCleanlooksStyle> 31 #include <QWindowsStyle> 32 33 UIToolBar::UIToolBar(QWidget *pParent /* = 0*/) 30 UIToolBar::UIToolBar(QWidget *pParent /* = 0 */) 34 31 : QToolBar(pParent) 35 32 , m_pMainWindow(qobject_cast<QMainWindow*>(pParent)) 36 33 { 37 /* Configure tool-bar: */ 38 setFloatable(false); 39 setMovable(false); 40 41 /* Remove that ugly frame panel around the toolbar. 42 * Doing that currently for Cleanlooks & Windows styles. */ 43 if (qobject_cast <QCleanlooksStyle*>(QToolBar::style()) || 44 qobject_cast <QWindowsStyle*>(QToolBar::style())) 45 setStyleSheet("QToolBar { border: 0px none black; }"); 46 47 /* Configure layout: */ 48 if (layout()) 49 layout()->setContentsMargins(0, 0, 0, 0);; 50 51 /* Configure context-menu policy: */ 52 setContextMenuPolicy(Qt::NoContextMenu); 34 /* Prepare: */ 35 prepare(); 53 36 } 54 37 55 void UIToolBar::setUse sTextLabel(bool fEnable)38 void UIToolBar::setUseTextLabels(bool fEnable) 56 39 { 57 Qt::ToolButtonStyle tbs = Qt::ToolButtonTextUnderIcon; 58 if (!fEnable) 59 tbs = Qt::ToolButtonIconOnly; 40 /* Determine tool-button style on the basis of passed flag: */ 41 Qt::ToolButtonStyle tbs = fEnable ? Qt::ToolButtonTextUnderIcon : Qt::ToolButtonIconOnly; 60 42 43 /* Depending on parent, assign this style: */ 61 44 if (m_pMainWindow) 62 45 m_pMainWindow->setToolButtonStyle(tbs); … … 66 49 67 50 #ifdef Q_WS_MAC 68 void UIToolBar:: setMacToolbar()51 void UIToolBar::enableMacToolbar() 69 52 { 53 /* Depending on parent, enable unified title/tool-bar: */ 70 54 if (m_pMainWindow) 71 55 m_pMainWindow->setUnifiedTitleAndToolBarOnMac(true); … … 92 76 #endif /* Q_WS_MAC */ 93 77 78 void UIToolBar::prepare() 79 { 80 /* Configure tool-bar: */ 81 setFloatable(false); 82 setMovable(false); 83 84 /* Remove that ugly frame panel around the toolbar. 85 * Doing that currently for Cleanlooks & Windows styles. */ 86 if (qobject_cast <QCleanlooksStyle*>(QToolBar::style()) || 87 qobject_cast <QWindowsStyle*>(QToolBar::style())) 88 setStyleSheet("QToolBar { border: 0px none black; }"); 89 90 /* Configure tool-bar' layout: */ 91 if (layout()) 92 layout()->setContentsMargins(0, 0, 0, 0); 93 94 /* Configure tool-bar' context-menu policy: */ 95 setContextMenuPolicy(Qt::NoContextMenu); 96 } 97 -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIToolBar.h
r46193 r51937 1 1 /** @file 2 * 3 * VBox frontends: Qt GUI ("VirtualBox"): 4 * UIToolBar class declaration 2 * VBox Qt GUI - UIToolBar class declaration. 5 3 */ 6 4 7 5 /* 8 * Copyright (C) 2006-201 3Oracle Corporation6 * Copyright (C) 2006-2014 Oracle Corporation 9 7 * 10 8 * This file is part of VirtualBox Open Source Edition (OSE), as … … 26 24 class QMainWindow; 27 25 28 /* UI tool-bar prototype class: */ 26 /** QToolBar extension 27 * with few settings presets. */ 29 28 class UIToolBar : public QToolBar 30 29 { 30 Q_OBJECT; 31 31 32 public: 32 33 33 /* Constructor:*/34 /** Constructor, passes @a pParent to the QToolBar constructor. */ 34 35 UIToolBar(QWidget *pParent = 0); 35 36 36 /* API: Text-label stuff: */ 37 void setUsesTextLabel(bool fEnable); 37 /** Defines whether tool-bar should use text-labels. 38 * Default value if @a false. */ 39 void setUseTextLabels(bool fEnable); 38 40 39 41 #ifdef Q_WS_MAC 40 /* API: Mac toolbar stuff: */ 41 void setMacToolbar(); 42 /** Mac OS X: Defines whether native tool-bar should be used. */ 43 void enableMacToolbar(); 44 /** Mac OS X: Defines whether native tool-bar button should be shown. */ 42 45 void setShowToolBarButton(bool fShow); 46 /** Mac OS X: Updates native tool-bar layout. */ 43 47 void updateLayout(); 44 48 #endif /* Q_WS_MAC */ … … 46 50 private: 47 51 48 /* Variables: */ 52 /** Prepare routine. */ 53 void prepare(); 54 55 /** Holds the parent main-window isntance. */ 49 56 QMainWindow *m_pMainWindow; 50 57 };
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器