Changeset 7560 in vbox
- Timestamp:
- Mar 25, 2008 6:49:14 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 29045
- Location:
- trunk/src/VBox/Frontends/VirtualBox4
- Files:
-
- 1 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox4/Makefile.kmk
r7487 r7560 275 275 VirtualBox_QT_UISRCS4 += ui/VBoxRegistrationDlg.ui 276 276 277 VirtualBox_QT_UISRCS3 := $(filter-out ui/VBoxSharedFoldersSettings.ui,$(VirtualBox_QT_UISRCS3)) 278 VirtualBox_QT_UISRCS4 += ui/VBoxSharedFoldersSettings.ui 279 277 280 278 281 # … … 412 415 include/VBoxNewHDWzd.h \ 413 416 include/VBoxVMFirstRunWzd.h \ 414 include/VBoxRegistrationDlg.h 417 include/VBoxRegistrationDlg.h \ 418 include/VBoxSharedFoldersSettings.h 415 419 416 420 # Sources containing local definitions of classes that use the Q_OBJECT macro … … 426 430 VirtualBox_QT_MOCUIHDRS = \ 427 431 ui/VBoxVMSettingsDlg.ui.h \ 428 ui/VBoxVMLogViewer.ui.h \ 429 ui/VBoxSharedFoldersSettings.ui.h 432 ui/VBoxVMLogViewer.ui.h 430 433 431 434 … … 485 488 src/VBoxNewHDWzd.cpp \ 486 489 src/VBoxVMFirstRunWzd.cpp \ 487 src/VBoxRegistrationDlg.cpp 490 src/VBoxRegistrationDlg.cpp \ 491 src/VBoxSharedFoldersSettings.cpp 488 492 489 493 ifeq ($(filter-out freebsd linux netbsd openbsd solaris,$(BUILD_TARGET)),) # X11 -
trunk/src/VBox/Frontends/VirtualBox4/include/VBoxUtils.h
r7447 r7560 168 168 return QObject::eventFilter (aObject, aEvent); 169 169 } 170 }; 171 172 /** 173 * Simple class which simulates focus-proxy rule redirecting widget 174 * assigned shortcur to desired widget. 175 */ 176 class QIFocusProxy : protected QObject 177 { 178 public: 179 180 QIFocusProxy (QWidget *aFrom, QWidget *aTo) 181 : QObject (aFrom), mFrom (aFrom), mTo (aTo) 182 { 183 mFrom->installEventFilter (this); 184 } 185 186 protected: 187 188 bool eventFilter (QObject *aObject, QEvent *aEvent) 189 { 190 if (aObject == mFrom && aEvent->type() == QEvent::Shortcut) 191 { 192 mTo->setFocus(); 193 return true; 194 } 195 return QObject::eventFilter (aObject, aEvent); 196 } 197 198 QWidget *mFrom; 199 QWidget *mTo; 170 200 }; 171 201 -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxConsoleWnd.cpp
r7447 r7560 3438 3438 3439 3439 /* Setup settings layout */ 3440 mSettings = new VBoxSharedFoldersSettings (this, "mSettings"); 3441 mSettings->setDialogType (VBoxSharedFoldersSettings::MachineType | 3442 VBoxSharedFoldersSettings::ConsoleType); 3440 mSettings = new VBoxSharedFoldersSettings (this, MachineType | ConsoleType); 3443 3441 mSettings->getFromConsole (aSession.GetConsole()); 3444 3442 mSettings->getFromMachine (aSession.GetMachine()); -
trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxSharedFoldersSettings.ui
r6865 r7560 1 < !DOCTYPE UI><UI version="3.3" stdsetdef="1">2 <class>VBoxSharedFoldersSettings</class>3 <comment>4 :mode=html:tabSize=4:indentSize=4:noTabs=true: 5 :folding=explicit:collapseFolds=1: 6 7 Copyright (C) 2006-2007 innotek GmbH8 9 This file is part of VirtualBox Open Source Edition (OSE), as10 available from http://www.virtualbox.org. This file is free software;11 you can redistribute it and/or modify it under the terms of the GNU12 General Public License (GPL) as published by the Free Software13 Foundation, in version 2 as it comes in the "COPYING" file of the14 VirtualBox OSE distribution. VirtualBox OSE is distributed in the15 hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.16 </comment>17 <widget class="QWidget">18 <property name="name">19 <cstring>VBoxSharedFoldersSettings</cstring>20 21 <property name="geometry">22 <rect>23 <x>0</x>24 <y>0</y>25 <width>286</width>26 <height>247</height>27 </rect>28 </property>29 < property name="sizePolicy">30 <sizepolicy>31 <hsizetype>7</hsizetype>32 <vsizetype>7</vsizetype>33 <horstretch>0</horstretch>34 <verstretch>0</verstretch>35 </sizepolicy>36 </property>37 <property name="caption">38 <string>VBoxSharedFoldersSettings</string>39 <comment>don't translate</comment>40 </property>41 <vbox>42 <property name=" name">43 <cstring>unnamed</cstring>1 <ui version="4.0" > 2 <class>VBoxSharedFoldersSettings</class> 3 <widget class="QWidget" name="VBoxSharedFoldersSettings" > 4 <property name="geometry" > 5 <rect> 6 <x>0</x> 7 <y>0</y> 8 <width>351</width> 9 <height>253</height> 10 </rect> 11 </property> 12 <property name="sizePolicy" > 13 <sizepolicy vsizetype="Expanding" hsizetype="Expanding" > 14 <horstretch>0</horstretch> 15 <verstretch>0</verstretch> 16 </sizepolicy> 17 </property> 18 <property name="windowTitle" > 19 <string comment="don't translate" >VBoxSharedFoldersSettings</string> 20 </property> 21 <layout class="QVBoxLayout" > 22 <property name="leftMargin" > 23 <number>0</number> 24 </property> 25 <property name="topMargin" > 26 <number>0</number> 27 </property> 28 <property name="rightMargin" > 29 <number>0</number> 30 </property> 31 <property name="bottomMargin" > 32 <number>0</number> 33 </property> 34 <item> 35 <widget class="QGroupBox" name="mGbSharedFolders" > 36 <property name="title" > 37 <string>Shared &Folders</string> 38 </property> 39 <layout class="QHBoxLayout" > 40 <item> 41 <widget class="QTreeWidget" name="mTreeView" > 42 <property name="whatsThis" > 43 <string><qt>Lists all shared folders accessible to this machine. Use <tt>net use x: \\vboxsvr\share</tt> to access a shared folder named <i>share</i> from a DOS-like OS, or <tt>mount -t vboxsf share mount_point</tt> to access it from a Linux OS. This feature requires Guest Additions.</qt></string> 44 44 </property> 45 <property name=" margin">46 <number>0</number>45 <property name="uniformRowHeights" > 46 <bool>true</bool> 47 47 </property> 48 <property name=" spacing">49 <number>10</number>48 <property name="allColumnsShowFocus" > 49 <bool>true</bool> 50 50 </property> 51 <widget class="QGroupBox"> 52 <property name="name"> 53 <cstring>gbSharedFolders</cstring> 54 </property> 55 <property name="title"> 56 <string>Shared &Folders</string> 57 </property> 58 <hbox> 59 <property name="name"> 60 <cstring>unnamed</cstring> 61 </property> 62 <widget class="QListView"> 63 <column> 64 <property name="text"> 65 <string>Name</string> 66 </property> 67 <property name="clickable"> 68 <bool>true</bool> 69 </property> 70 <property name="resizable"> 71 <bool>true</bool> 72 </property> 73 </column> 74 <column> 75 <property name="text"> 76 <string>Path</string> 77 </property> 78 <property name="clickable"> 79 <bool>true</bool> 80 </property> 81 <property name="resizable"> 82 <bool>true</bool> 83 </property> 84 </column> 85 <column> 86 <property name="text"> 87 <string>Access</string> 88 </property> 89 <property name="clickable"> 90 <bool>true</bool> 91 </property> 92 <property name="resizable"> 93 <bool>true</bool> 94 </property> 95 </column> 96 <property name="name"> 97 <cstring>listView</cstring> 98 </property> 99 <property name="allColumnsShowFocus"> 100 <bool>true</bool> 101 </property> 102 <property name="resizeMode"> 103 <enum>AllColumns</enum> 104 </property> 105 <property name="whatsThis" stdset="0"> 106 <string><qt>Lists all shared folders accessible to this machine. 107 Use 108 <tt>net use x: \\vboxsvr\share</tt> 109 to access a shared folder named <i>share</i> from a DOS-like OS, or 110 <tt>mount -t vboxsf share mount_point</tt> 111 to access it from a Linux OS. This feature requires Guest Additions.</qt></string> 112 </property> 113 </widget> 114 <widget class="QLayoutWidget"> 115 <property name="name"> 116 <cstring>layout101</cstring> 117 </property> 118 <vbox> 119 <property name="name"> 120 <cstring>unnamed</cstring> 121 </property> 122 <property name="spacing"> 123 <number>0</number> 124 </property> 125 <widget class="QToolButton"> 126 <property name="name"> 127 <cstring>tbAdd</cstring> 128 </property> 129 <property name="focusPolicy"> 130 <enum>TabFocus</enum> 131 </property> 132 <property name="text"> 133 <string></string> 134 </property> 135 <property name="accel"> 136 <string>Ins</string> 137 </property> 138 <property name="textLabel"> 139 <string>Add a new shared folder (Ins)</string> 140 </property> 141 <property name="autoRaise"> 142 <bool>true</bool> 143 </property> 144 <property name="whatsThis" stdset="0"> 145 <string>Adds a new shared folder definition.</string> 146 </property> 147 </widget> 148 <widget class="QToolButton"> 149 <property name="name"> 150 <cstring>tbEdit</cstring> 151 </property> 152 <property name="focusPolicy"> 153 <enum>TabFocus</enum> 154 </property> 155 <property name="text"> 156 <string></string> 157 </property> 158 <property name="accel"> 159 <string>Ctrl+Space</string> 160 </property> 161 <property name="textLabel"> 162 <string>Edit the selected shared folder (Ctrl+Space)</string> 163 </property> 164 <property name="autoRaise"> 165 <bool>true</bool> 166 </property> 167 <property name="whatsThis" stdset="0"> 168 <string>Edits the selected shared folder definition.</string> 169 </property> 170 </widget> 171 <widget class="QToolButton"> 172 <property name="name"> 173 <cstring>tbRemove</cstring> 174 </property> 175 <property name="focusPolicy"> 176 <enum>TabFocus</enum> 177 </property> 178 <property name="text"> 179 <string></string> 180 </property> 181 <property name="accel"> 182 <string>Del</string> 183 </property> 184 <property name="textLabel"> 185 <string>Remove the selected shared folder (Del)</string> 186 </property> 187 <property name="autoRaise"> 188 <bool>true</bool> 189 </property> 190 <property name="whatsThis" stdset="0"> 191 <string>Removes the selected shared folder definition.</string> 192 </property> 193 </widget> 194 <spacer> 195 <property name="name"> 196 <cstring>spacer76</cstring> 197 </property> 198 <property name="orientation"> 199 <enum>Vertical</enum> 200 </property> 201 <property name="sizeType"> 202 <enum>Expanding</enum> 203 </property> 204 <property name="sizeHint"> 205 <size> 206 <width>21</width> 207 <height>101</height> 208 </size> 209 </property> 210 </spacer> 211 </vbox> 212 </widget> 213 </hbox> 214 </widget> 215 </vbox> 216 </widget> 217 <connections> 218 <connection> 219 <sender>listView</sender> 220 <signal>doubleClicked(QListViewItem*)</signal> 221 <receiver>VBoxSharedFoldersSettings</receiver> 222 <slot>processDoubleClick(QListViewItem*)</slot> 223 </connection> 224 </connections> 225 <includes> 226 <include location="local" impldecl="in declaration">VBoxGlobal.h</include> 227 <include location="local" impldecl="in implementation">VBoxUtils.h</include> 228 <include location="local" impldecl="in implementation">VBoxProblemReporter.h</include> 229 <include location="global" impldecl="in implementation">qfiledialog.h</include> 230 <include location="global" impldecl="in implementation">qlabel.h</include> 231 <include location="global" impldecl="in implementation">qlineedit.h</include> 232 <include location="global" impldecl="in implementation">qregexp.h</include> 233 <include location="global" impldecl="in implementation">qtimer.h</include> 234 <include location="global" impldecl="in implementation">qpainter.h</include> 235 </includes> 236 <variables> 237 <variable access="public">enum SFDialogType { WrongType, GlobalType = 0x01, MachineType = 0x02, ConsoleType = 0x04 };</variable> 238 <variable access="private">bool mIsListViewChanged;</variable> 239 <variable access="private">int mDialogType;</variable> 240 <variable access="private">CMachine mMachine;</variable> 241 <variable access="private">CConsole mConsole;</variable> 242 <variable access="private">QString mTrFull;</variable> 243 <variable access="private">QString mTrReadOnly;</variable> 244 </variables> 245 <slots> 246 <slot>tbAddPressed()</slot> 247 <slot>tbEditPressed()</slot> 248 <slot>tbRemovePressed()</slot> 249 <slot>processCurrentChanged( QListViewItem* )</slot> 250 <slot>processDoubleClick( QListViewItem* )</slot> 251 <slot>adjustList()</slot> 252 <slot>updateList()</slot> 253 </slots> 254 <functions> 255 <function access="private">init()</function> 256 <function access="private">showEvent( QShowEvent* )</function> 257 <function returnType="bool" access="private">eventFilter( QObject*, QEvent* )</function> 258 <function>setDialogType( int )</function> 259 <function returnType="int">dialogType() {return mDialogType;}</function> 260 <function access="private">removeSharedFolder( const QString &, const QString &, VBoxSharedFoldersSettings::SFDialogType )</function> 261 <function access="private">createSharedFolder( const QString &, const QString &, bool, VBoxSharedFoldersSettings::SFDialogType )</function> 262 <function>getFromGlobal()</function> 263 <function>getFromMachine( const CMachine & )</function> 264 <function>getFromConsole( const CConsole & )</function> 265 <function access="private">getFrom( const CSharedFolderEnumerator &, QListViewItem* )</function> 266 <function>putBackToGlobal()</function> 267 <function>putBackToMachine()</function> 268 <function>putBackToConsole()</function> 269 <function access="private">putBackTo( CSharedFolderEnumerator &, QListViewItem* )</function> 270 <function access="private" returnType="QListViewItem*">searchRoot( bool )</function> 271 <function access="private" returnType="bool">isEditable( const QString & )</function> 272 </functions> 273 <pixmapinproject/> 274 <layoutdefaults spacing="6" margin="11"/> 275 </UI> 51 <column> 52 <property name="text" > 53 <string>Name</string> 54 </property> 55 </column> 56 <column> 57 <property name="text" > 58 <string>Path</string> 59 </property> 60 </column> 61 <column> 62 <property name="text" > 63 <string>Access</string> 64 </property> 65 </column> 66 </widget> 67 </item> 68 <item> 69 <layout class="QVBoxLayout" > 70 <property name="spacing" > 71 <number>0</number> 72 </property> 73 <item> 74 <widget class="QToolButton" name="mTbAdd" > 75 <property name="focusPolicy" > 76 <enum>Qt::TabFocus</enum> 77 </property> 78 <property name="toolTip" > 79 <string>Add a new shared folder (Ins)</string> 80 </property> 81 <property name="whatsThis" > 82 <string>Adds a new shared folder definition.</string> 83 </property> 84 <property name="text" > 85 <string/> 86 </property> 87 <property name="shortcut" > 88 <string>Ins</string> 89 </property> 90 <property name="autoRaise" > 91 <bool>true</bool> 92 </property> 93 </widget> 94 </item> 95 <item> 96 <widget class="QToolButton" name="mTbEdit" > 97 <property name="focusPolicy" > 98 <enum>Qt::TabFocus</enum> 99 </property> 100 <property name="toolTip" > 101 <string>Edit the selected shared folder (Ctrl+Space)</string> 102 </property> 103 <property name="whatsThis" > 104 <string>Edits the selected shared folder definition.</string> 105 </property> 106 <property name="text" > 107 <string/> 108 </property> 109 <property name="shortcut" > 110 <string>Ctrl+Space</string> 111 </property> 112 <property name="autoRaise" > 113 <bool>true</bool> 114 </property> 115 </widget> 116 </item> 117 <item> 118 <widget class="QToolButton" name="mTbRemove" > 119 <property name="focusPolicy" > 120 <enum>Qt::TabFocus</enum> 121 </property> 122 <property name="toolTip" > 123 <string>Remove the selected shared folder (Del)</string> 124 </property> 125 <property name="whatsThis" > 126 <string>Removes the selected shared folder definition.</string> 127 </property> 128 <property name="text" > 129 <string/> 130 </property> 131 <property name="shortcut" > 132 <string>Del</string> 133 </property> 134 <property name="autoRaise" > 135 <bool>true</bool> 136 </property> 137 </widget> 138 </item> 139 <item> 140 <spacer> 141 <property name="orientation" > 142 <enum>Qt::Vertical</enum> 143 </property> 144 <property name="sizeType" > 145 <enum>QSizePolicy::Expanding</enum> 146 </property> 147 <property name="sizeHint" > 148 <size> 149 <width>21</width> 150 <height>101</height> 151 </size> 152 </property> 153 </spacer> 154 </item> 155 </layout> 156 </item> 157 </layout> 158 </widget> 159 </item> 160 </layout> 161 </widget> 162 <layoutdefault spacing="6" margin="11" /> 163 <pixmapfunction>qPixmapFromMimeSource</pixmapfunction> 164 <includes> 165 <include location="local" >VBoxGlobal.h</include> 166 </includes> 167 <resources> 168 <include location="../VirtualBox.qrc" /> 169 </resources> 170 <connections/> 171 </ui> -
trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxVMSettingsDlg.ui.h
r7467 r7560 802 802 803 803 Q3VBoxLayout* pageFoldersLayout = new Q3VBoxLayout (pageFolders, 0, 10, "pageFoldersLayout"); 804 mSharedFolders = new VBoxSharedFoldersSettings (pageFolders, "sharedFolders"); 805 mSharedFolders->setDialogType (VBoxSharedFoldersSettings::MachineType); 804 mSharedFolders = new VBoxSharedFoldersSettings (pageFolders, MachineType); 806 805 pageFoldersLayout->addWidget (mSharedFolders); 807 806
Note:
See TracChangeset
for help on using the changeset viewer.