Changeset 54528 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Feb 26, 2015 1:17:25 PM (10 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMenuBarEditorWindow.cpp
r54527 r54528 24 24 # include <QPaintEvent> 25 25 # include <QMetaEnum> 26 # include <QCheckBox>27 26 # include <QMenuBar> 28 27 # include <QPainter> 29 28 # include <QMenu> 29 # ifndef Q_WS_MAC 30 # include <QCheckBox> 31 # endif /* !Q_WS_MAC */ 30 32 31 33 /* GUI includes: */ … … 55 57 , m_pToolBar(0) 56 58 , m_pButtonClose(0) 59 #ifndef Q_WS_MAC 57 60 , m_pCheckBoxEnable(0) 61 #endif /* !Q_WS_MAC */ 58 62 { 59 63 /* Prepare: */ … … 83 87 return; 84 88 89 #ifndef Q_WS_MAC 85 90 /* Update enable-checkbox: */ 86 91 updateEnableCheckbox(); 92 #endif /* !Q_WS_MAC */ 87 93 88 94 /* Update menus: */ … … 90 96 } 91 97 98 #ifndef RT_OS_DARWIN 92 99 void UIMenuBarEditorWidget::sltHandleMenuBarEnableToggle(bool fEnabled) 93 100 { … … 104 111 } 105 112 } 113 #endif /* !RT_OS_DARWIN */ 106 114 107 115 void UIMenuBarEditorWidget::sltHandleMenuBarMenuClick() … … 266 274 if (iTop >= 5) 267 275 iTop -= 5; 276 #ifndef Q_WS_MAC 268 277 /* Right margin should be bigger for the settings case: */ 269 278 if (m_fStartedFromVMSettings) 270 279 iRight += 5; 280 #endif /* !Q_WS_MAC */ 271 281 /* Apply margins/spacing finally: */ 272 282 m_pMainLayout->setContentsMargins(iLeft, iTop, iRight, iBottom); … … 298 308 } 299 309 } 310 #ifndef Q_WS_MAC 300 311 /* Create enable-checkbox if necessary: */ 301 312 else … … 313 324 } 314 325 } 326 #endif /* !Q_WS_MAC */ 315 327 } 316 328 … … 638 650 } 639 651 652 #ifndef Q_WS_MAC 640 653 void UIMenuBarEditorWidget::updateEnableCheckbox() 641 654 { … … 648 661 } 649 662 } 663 #endif /* !Q_WS_MAC */ 650 664 651 665 void UIMenuBarEditorWidget::updateMenus() … … 937 951 if (!m_fStartedFromVMSettings && m_pButtonClose) 938 952 m_pButtonClose->setToolTip(tr("Close")); 953 #ifndef Q_WS_MAC 939 954 /* Translate enable-checkbox if necessary: */ 940 955 if (m_fStartedFromVMSettings && m_pCheckBoxEnable) 941 956 m_pCheckBoxEnable->setToolTip(tr("Enable Menu Bar")); 957 #endif /* !Q_WS_MAC */ 942 958 } 943 959 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMenuBarEditorWindow.h
r54527 r54528 31 31 class UIAction; 32 32 class QIToolButton; 33 #ifndef Q_WS_MAC 33 34 class QCheckBox; 35 #endif /* !Q_WS_MAC */ 34 36 class QHBoxLayout; 35 37 class QAction; … … 87 89 void sltHandleConfigurationChange(const QString &strMachineID); 88 90 89 /** Handles menu-bar enable toggle. */ 91 #ifndef RT_OS_DARWIN 92 /** Non Mac OS X: Handles menu-bar enable toggle. */ 90 93 void sltHandleMenuBarEnableToggle(bool fEnabled); 94 #endif /* !RT_OS_DARWIN */ 91 95 /** Handles menu-bar menu click. */ 92 96 void sltHandleMenuBarMenuClick(); … … 138 142 void prepareMenuHelp(); 139 143 140 /** Update enable-checkbox routine. */ 144 #ifndef Q_WS_MAC 145 /** Non Mac OS X: Update enable-checkbox routine. */ 141 146 void updateEnableCheckbox(); 147 #endif /* !Q_WS_MAC */ 142 148 /** Update menus routine. */ 143 149 void updateMenus(); … … 191 197 /** Holds the close-button instance. */ 192 198 QIToolButton *m_pButtonClose; 193 /** Holds the enable-checkbox instance. */ 199 #ifndef Q_WS_MAC 200 /** Non Mac OS X: Holds the enable-checkbox instance. */ 194 201 QCheckBox *m_pCheckBoxEnable; 202 #endif /* !Q_WS_MAC */ 195 203 /** Holds tool-bar action references. */ 196 204 QMap<QString, QAction*> m_actions;
Note:
See TracChangeset
for help on using the changeset viewer.