Changeset 27690 in vbox
- Timestamp:
- Mar 25, 2010 10:14:17 AM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 59285
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/darwin/VBoxCocoaSpecialControls.h
r27401 r27690 43 43 { 44 44 HelpButton, 45 CancelButton 45 CancelButton, 46 ResetButton 46 47 }; 47 48 -
trunk/src/VBox/Frontends/VirtualBox/src/darwin/VBoxCocoaSpecialControls.mm
r27401 r27690 232 232 break; 233 233 } 234 case ResetButton: 235 { 236 mNativeRef = [[NSButton alloc] initWithFrame: NSMakeRect(0, 0, 13, 13)]; 237 [mNativeRef setTitle: @""]; 238 [mNativeRef setBezelStyle:NSShadowlessSquareBezelStyle]; 239 [mNativeRef setButtonType:NSMomentaryChangeButton]; 240 [mNativeRef setImage: [NSImage imageNamed: NSImageNameRefreshFreestandingTemplate]]; 241 [mNativeRef setBordered: NO]; 242 [[mNativeRef cell] setImageScaling: NSImageScaleProportionallyDown]; 243 break; 244 } 234 245 } 235 246 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/VBoxGLSettingsInput.ui
r27632 r27690 1 <ui version="4.0" > 1 <?xml version="1.0" encoding="UTF-8"?> 2 <ui version="4.0"> 2 3 <comment> 3 VBox frontends: Qt4 GUI ( "VirtualBox"):4 VBox frontends: Qt4 GUI ("VirtualBox"): 4 5 5 6 Copyright (C) 2008 Sun Microsystems, Inc. … … 9 10 you can redistribute it and/or modify it under the terms of the GNU 10 11 General Public License (GPL) as published by the Free Software 11 Foundation, in version 2 as it comes in the "COPYING"file of the12 Foundation, in version 2 as it comes in the "COPYING" file of the 12 13 VirtualBox OSE distribution. VirtualBox OSE is distributed in the 13 14 hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. … … 18 19 </comment> 19 20 <class>VBoxGLSettingsInput</class> 20 <widget class="QWidget" name="VBoxGLSettingsInput" 21 <property name="geometry" 21 <widget class="QWidget" name="VBoxGLSettingsInput"> 22 <property name="geometry"> 22 23 <rect> 23 24 <x>0</x> … … 27 28 </rect> 28 29 </property> 29 <layout class="QGridLayout" 30 <property name=" leftMargin">30 <layout class="QGridLayout"> 31 <property name="margin"> 31 32 <number>0</number> 32 33 </property> 33 <property name="topMargin" > 34 <number>0</number> 35 </property> 36 <property name="rightMargin" > 37 <number>0</number> 38 </property> 39 <property name="bottomMargin" > 40 <number>0</number> 41 </property> 42 <item rowspan="2" row="0" column="0" > 34 <item row="0" column="0" rowspan="2"> 43 35 <spacer> 44 <property name="orientation" 36 <property name="orientation"> 45 37 <enum>Qt::Horizontal</enum> 46 38 </property> 47 <property name="sizeType" 39 <property name="sizeType"> 48 40 <enum>QSizePolicy::Fixed</enum> 49 41 </property> 50 <property name="sizeHint" >42 <property name="sizeHint" stdset="0"> 51 43 <size> 52 44 <width>40</width> … … 56 48 </spacer> 57 49 </item> 58 <item row="0" column="1" 59 <widget class="QLabel" name="mLbHostKey" 60 <property name="text" 50 <item row="0" column="1"> 51 <widget class="QLabel" name="mLbHostKey"> 52 <property name="text"> 61 53 <string>Host &Key:</string> 62 54 </property> 63 <property name="buddy" 55 <property name="buddy"> 64 56 <cstring>mHeHostKey</cstring> 65 57 </property> 66 58 </widget> 67 59 </item> 68 <item row="0" column="2" 69 <widget class="QIHotKeyEdit" name="mHeHostKey" 70 <property name="whatsThis" 60 <item row="0" column="2"> 61 <widget class="QIHotKeyEdit" name="mHeHostKey"> 62 <property name="whatsThis"> 71 63 <string>Displays the key used as a Host Key in the VM window. Activate the entry field and press a new Host Key. Note that alphanumeric, cursor movement and editing keys cannot be used.</string> 72 64 </property> 73 65 </widget> 74 66 </item> 75 <item row="0" column="3" 76 <widget class=" QIToolButton" name="mTbResetHostKey">67 <item row="0" column="3"> 68 <widget class="UIResetButton" name="mTbResetHostKey"> 77 69 <property name="focusPolicy"> 78 70 <enum>Qt::StrongFocus</enum> … … 81 73 <string>Reset Host Key</string> 82 74 </property> 83 <property name="whatsThis" 75 <property name="whatsThis"> 84 76 <string>Resets the key used as a Host Key in the VM window.</string> 85 77 </property> 86 78 <property name="icon"> 87 <iconset resource="../VirtualBox1.qrc" >:/delete_16px.png</iconset> 88 </property> 89 <property name="autoRaise"> 90 <bool>true</bool> 79 <iconset><normaloff>:/delete_16px.png</normaloff>:/delete_16px.png</iconset> 91 80 </property> 92 81 </widget> 93 82 </item> 94 <item row="0" column="4" 83 <item row="0" column="4"> 95 84 <spacer> 96 <property name="orientation" 85 <property name="orientation"> 97 86 <enum>Qt::Horizontal</enum> 98 87 </property> 99 <property name="sizeHint" >88 <property name="sizeHint" stdset="0"> 100 89 <size> 101 90 <width>0</width> … … 105 94 </spacer> 106 95 </item> 107 <item row="1" column="2" colspan="3" 108 <widget class="QCheckBox" name="mCbAutoGrab" 109 <property name="whatsThis" 96 <item row="1" column="2" colspan="3"> 97 <widget class="QCheckBox" name="mCbAutoGrab"> 98 <property name="whatsThis"> 110 99 <string>When checked, the keyboard is automatically captured every time the VM window is activated. When the keyboard is captured, all keystrokes (including system ones like Alt-Tab) are directed to the VM.</string> 111 100 </property> 112 <property name="text" 101 <property name="text"> 113 102 <string>&Auto Capture Keyboard</string> 114 103 </property> 115 104 </widget> 116 105 </item> 117 <item row="2" column="3" 106 <item row="2" column="3"> 118 107 <spacer> 119 <property name="orientation" 108 <property name="orientation"> 120 109 <enum>Qt::Vertical</enum> 121 110 </property> 122 <property name="sizeHint" >111 <property name="sizeHint" stdset="0"> 123 112 <size> 124 113 <width>121</width> … … 137 126 </customwidget> 138 127 <customwidget> 139 <class> QIToolButton</class>140 <extends>Q ToolButton</extends>141 <header> QIToolButton.h</header>128 <class>UIResetButton</class> 129 <extends>QAbstractButton</extends> 130 <header>VBoxSpecialControls.h</header> 142 131 </customwidget> 143 132 </customwidgets> 144 <resources/> 133 <resources> 134 <include location="../VirtualBox1.qrc"/> 135 </resources> 145 136 <connections> 146 137 <connection> … … 150 141 <slot>clear()</slot> 151 142 <hints> 152 <hint type="sourcelabel" 143 <hint type="sourcelabel"> 153 144 <x>111</x> 154 145 <y>19</y> 155 146 </hint> 156 <hint type="destinationlabel" 147 <hint type="destinationlabel"> 157 148 <x>124</x> 158 149 <y>61</y> -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/VBoxSpecialControls.cpp
r27401 r27690 48 48 { 49 49 mButton->resize(size()); 50 } 51 52 /******************************************************************************** 53 * 54 * A rest button in the native Cocoa version. 55 * 56 ********************************************************************************/ 57 UIResetButton::UIResetButton(QWidget *pParent /* = 0 */) 58 : QAbstractButton(pParent) 59 { 60 m_pButton = new VBoxCocoaButton(VBoxCocoaButton::ResetButton, this); 61 connect(m_pButton, SIGNAL(clicked()), 62 this, SIGNAL(clicked())); 63 setFixedSize(m_pButton->size()); 64 } 65 66 void UIResetButton::resizeEvent(QResizeEvent * /* pEvent */) 67 { 68 m_pButton->resize(size()); 50 69 } 51 70 -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/VBoxSpecialControls.h
r27401 r27690 61 61 /******************************************************************************** 62 62 * 63 * A reset button in the native Cocoa version. 64 * 65 ********************************************************************************/ 66 class UIResetButton: public QAbstractButton 67 { 68 Q_OBJECT; 69 70 public: 71 UIResetButton(QWidget *pParent = 0); 72 73 void setText(const QString &strText) { m_pButton->setText(strText); } 74 void setToolTip(const QString &strTip) { m_pButton->setToolTip(strTip); } 75 void removeBorder() {} 76 77 protected: 78 void paintEvent(QPaintEvent * /* pEvent */) {} 79 void resizeEvent(QResizeEvent *pEvent); 80 81 private: 82 VBoxCocoaButton *m_pButton; 83 }; 84 85 /******************************************************************************** 86 * 63 87 * A help button in the native Cocoa version. 64 88 * … … 136 160 protected: 137 161 void retranslateUi() {}; 162 }; 163 164 /******************************************************************************** 165 * 166 * A reset button for the other OS's (same as the cancel button for now) 167 * 168 ********************************************************************************/ 169 class UIResetButton: public VBoxMiniCancelButton 170 { 171 Q_OBJECT; 172 173 public: 174 UIResetButton(QWidget *pParent = 0) 175 : VBoxMiniCancelButton(pParent) {} 138 176 }; 139 177
Note:
See TracChangeset
for help on using the changeset viewer.