- Timestamp:
- Apr 19, 2008 12:35:13 PM (17 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/ui
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxGlobalSettingsDlg.ui
r8155 r8183 6 6 7 7 Copyright (C) 2006-2007 Sun Microsystems, Inc. 8 8 9 9 This file is part of VirtualBox Open Source Edition (OSE), as 10 10 available from http://www.virtualbox.org. This file is free software; … … 14 14 VirtualBox OSE distribution. VirtualBox OSE is distributed in the 15 15 hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. 16 16 17 17 Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa 18 18 Clara, CA 95054 USA or visit http://www.sun.com if you need … … 657 657 </property> 658 658 <property name="whatsThis" stdset="0"> 659 <string>Lists all global USB filters. The checkbox to the left defines whether the particular filter is enabled or not.</string> 659 <string> 660 <qt>Lists all global USB 661 filters. The checkbox to the left 662 defines whether the particular 663 filter is enabled or not. Use the 664 context menu or buttons to the 665 right to add or remove USB 666 filters.</qt> 667 </string> 660 668 </property> 661 669 </widget> 662 670 <widget class="QLayoutWidget"> 663 671 <property name="name"> 664 <cstring> layout147</cstring>672 <cstring>mUSBToolBarLayout</cstring> 665 673 </property> 666 674 <vbox> … … 671 679 <number>0</number> 672 680 </property> 673 <widget class="QToolButton">674 <property name="name">675 <cstring>tbAddUSBFilter</cstring>676 </property>677 <property name="focusPolicy">678 <enum>TabFocus</enum>679 </property>680 <property name="text">681 <string></string>682 </property>683 <property name="accel">684 <string>Ins</string>685 </property>686 <property name="iconSet">687 <iconset></iconset>688 </property>689 <property name="textLabel">690 <string>Add Empty (Ins)</string>691 </property>692 <property name="autoRaise">693 <bool>true</bool>694 </property>695 <property name="whatsThis" stdset="0">696 <string>Adds a new USB filter with all fields initially set to empty strings. Note that such a filter will match any attached USB device.</string>697 </property>698 </widget>699 <widget class="QToolButton">700 <property name="name">701 <cstring>tbAddUSBFilterFrom</cstring>702 </property>703 <property name="focusPolicy">704 <enum>TabFocus</enum>705 </property>706 <property name="text">707 <string></string>708 </property>709 <property name="accel">710 <string>Alt+Ins</string>711 </property>712 <property name="iconSet">713 <iconset></iconset>714 </property>715 <property name="textLabel">716 <string>Add From (Alt+Ins)</string>717 </property>718 <property name="autoRaise">719 <bool>true</bool>720 </property>721 <property name="whatsThis" stdset="0">722 <string>Adds a new USB filter with all fields set to the values of the selected USB device attached to the host PC.</string>723 </property>724 </widget>725 <widget class="QToolButton">726 <property name="name">727 <cstring>tbRemoveUSBFilter</cstring>728 </property>729 <property name="focusPolicy">730 <enum>TabFocus</enum>731 </property>732 <property name="text">733 <string></string>734 </property>735 <property name="accel">736 <string>Del</string>737 </property>738 <property name="iconSet">739 <iconset></iconset>740 </property>741 <property name="textLabel">742 <string>Remove (Del)</string>743 </property>744 <property name="autoRaise">745 <bool>true</bool>746 </property>747 <property name="whatsThis" stdset="0">748 <string>Removes the selected USB filter.</string>749 </property>750 </widget>751 <widget class="QToolButton">752 <property name="name">753 <cstring>tbUSBFilterUp</cstring>754 </property>755 <property name="focusPolicy">756 <enum>TabFocus</enum>757 </property>758 <property name="text">759 <string></string>760 </property>761 <property name="accel">762 <string>Ctrl+Up</string>763 </property>764 <property name="iconSet">765 <iconset></iconset>766 </property>767 <property name="textLabel">768 <string>Move Up (Ctrl+Up)</string>769 </property>770 <property name="autoRaise">771 <bool>true</bool>772 </property>773 <property name="whatsThis" stdset="0">774 <string>Moves the selected USB filter up.</string>775 </property>776 </widget>777 <widget class="QToolButton">778 <property name="name">779 <cstring>tbUSBFilterDown</cstring>780 </property>781 <property name="focusPolicy">782 <enum>TabFocus</enum>783 </property>784 <property name="text">785 <string></string>786 </property>787 <property name="accel">788 <string>Ctrl+Down</string>789 </property>790 <property name="iconSet">791 <iconset></iconset>792 </property>793 <property name="textLabel">794 <string>Move Down (Ctrl+Down)</string>795 </property>796 <property name="autoRaise">797 <bool>true</bool>798 </property>799 <property name="whatsThis" stdset="0">800 <string>Moves the selected USB filter down.</string>801 </property>802 </widget>803 681 <spacer> 804 682 <property name="name"> … … 1163 1041 </grid> 1164 1042 </widget> 1043 <toolbars> 1044 </toolbars> 1045 <actions> 1046 <action> 1047 <property name="name"> 1048 <cstring>mAddUSBFilterAct</cstring> 1049 </property> 1050 <property name="text"> 1051 <string>Add Empty Filter</string> 1052 </property> 1053 <property name="menuText"> 1054 <string>&Add Empty Filter</string> 1055 </property> 1056 <property name="accel"> 1057 <string>Ins</string> 1058 </property> 1059 <property name="whatsThis" stdset="0"> 1060 <string> 1061 <qt>Adds a new USB filter with all fields initially set to 1062 empty strings. Note that such a filter will match any attached USB 1063 device.</qt> 1064 </string> 1065 </property> 1066 </action> 1067 <action> 1068 <property name="name"> 1069 <cstring>mAddUSBFilterFromAct</cstring> 1070 </property> 1071 <property name="text"> 1072 <string>Add Filter From Device</string> 1073 </property> 1074 <property name="menuText"> 1075 <string>A&dd Filter From Device</string> 1076 </property> 1077 <property name="accel"> 1078 <string>Alt+Ins</string> 1079 </property> 1080 <property name="whatsThis" stdset="0"> 1081 <string><qt>Adds a new USB filter with all fields set to the 1082 values of the selected USB device attached to the host 1083 PC.</qt> 1084 </string> 1085 </property> 1086 </action> 1087 <action> 1088 <property name="name"> 1089 <cstring>mRemoveUSBFilterAct</cstring> 1090 </property> 1091 <property name="text"> 1092 <string>Remove Filter</string> 1093 </property> 1094 <property name="menuText"> 1095 <string>&Remove Filter</string> 1096 </property> 1097 <property name="accel"> 1098 <string>Del</string> 1099 </property> 1100 <property name="whatsThis" stdset="0"> 1101 <string> 1102 <qt>Removes the highlighted USB filter.</qt> 1103 </string> 1104 </property> 1105 </action> 1106 <action> 1107 <property name="name"> 1108 <cstring>mUSBFilterUpAct</cstring> 1109 </property> 1110 <property name="text"> 1111 <string>Move Filter Up</string> 1112 </property> 1113 <property name="menuText"> 1114 <string>&Move Filter Up</string> 1115 </property> 1116 <property name="accel"> 1117 <string>Ctrl+Up</string> 1118 </property> 1119 <property name="whatsThis" stdset="0"> 1120 <string> 1121 <qt>Moves the highlighted USB filter up.</qt> 1122 </string> 1123 </property> 1124 </action> 1125 <action> 1126 <property name="name"> 1127 <cstring>mUSBFilterDownAct</cstring> 1128 </property> 1129 <property name="text"> 1130 <string>Move Filter Down</string> 1131 </property> 1132 <property name="menuText"> 1133 <string>M&ove Filter Down</string> 1134 </property> 1135 <property name="accel"> 1136 <string>Ctrl+Down</string> 1137 </property> 1138 <property name="whatsThis" stdset="0"> 1139 <string> 1140 <qt>Moves the highlighted USB filter down.</qt> 1141 </string> 1142 </property> 1143 </action> 1144 </actions> 1165 1145 <connections> 1166 1146 <connection> … … 1225 1205 </connection> 1226 1206 <connection> 1227 <sender>tbAddUSBFilter</sender> 1228 <signal>clicked()</signal> 1229 <receiver>VBoxGlobalSettingsDlg</receiver> 1230 <slot>tbAddUSBFilter_clicked()</slot> 1231 </connection> 1232 <connection> 1233 <sender>tbAddUSBFilterFrom</sender> 1234 <signal>clicked()</signal> 1235 <receiver>VBoxGlobalSettingsDlg</receiver> 1236 <slot>tbAddUSBFilterFrom_clicked()</slot> 1237 </connection> 1238 <connection> 1239 <sender>tbRemoveUSBFilter</sender> 1240 <signal>clicked()</signal> 1241 <receiver>VBoxGlobalSettingsDlg</receiver> 1242 <slot>tbRemoveUSBFilter_clicked()</slot> 1243 </connection> 1244 <connection> 1245 <sender>tbUSBFilterUp</sender> 1246 <signal>clicked()</signal> 1247 <receiver>VBoxGlobalSettingsDlg</receiver> 1248 <slot>tbUSBFilterUp_clicked()</slot> 1249 </connection> 1250 <connection> 1251 <sender>tbUSBFilterDown</sender> 1252 <signal>clicked()</signal> 1253 <receiver>VBoxGlobalSettingsDlg</receiver> 1254 <slot>tbUSBFilterDown_clicked()</slot> 1207 <sender>lvUSBFilters</sender> 1208 <signal>contextMenuRequested(QListViewItem*, const QPoint&, int)</signal> 1209 <receiver>VBoxGlobalSettingsDlg</receiver> 1210 <slot>lvUSBFilters_contextMenuRequested(QListViewItem*, const QPoint&, int)</slot> 1211 </connection> 1212 <connection> 1213 <sender>mAddUSBFilterAct</sender> 1214 <signal>activated()</signal> 1215 <receiver>VBoxGlobalSettingsDlg</receiver> 1216 <slot>addUSBFilterAct_activated()</slot> 1217 </connection> 1218 <connection> 1219 <sender>mAddUSBFilterFromAct</sender> 1220 <signal>activated()</signal> 1221 <receiver>VBoxGlobalSettingsDlg</receiver> 1222 <slot>addUSBFilterFromAct_activated()</slot> 1223 </connection> 1224 <connection> 1225 <sender>mRemoveUSBFilterAct</sender> 1226 <signal>activated()</signal> 1227 <receiver>VBoxGlobalSettingsDlg</receiver> 1228 <slot>removeUSBFilterAct_activated()</slot> 1229 </connection> 1230 <connection> 1231 <sender>mUSBFilterUpAct</sender> 1232 <signal>activated()</signal> 1233 <receiver>VBoxGlobalSettingsDlg</receiver> 1234 <slot>USBFilterUpAct_activated()</slot> 1235 </connection> 1236 <connection> 1237 <sender>mUSBFilterDownAct</sender> 1238 <signal>activated()</signal> 1239 <receiver>VBoxGlobalSettingsDlg</receiver> 1240 <slot>USBFilterDownAct_activated()</slot> 1255 1241 </connection> 1256 1242 <connection> … … 1281 1267 <tabstop>chbVTX</tabstop> 1282 1268 <tabstop>lvUSBFilters</tabstop> 1283 <tabstop>tbAddUSBFilter</tabstop>1284 <tabstop>tbAddUSBFilterFrom</tabstop>1285 <tabstop>tbRemoveUSBFilter</tabstop>1286 <tabstop>tbUSBFilterUp</tabstop>1287 <tabstop>tbUSBFilterDown</tabstop>1288 1269 <tabstop>lvLanguages</tabstop> 1289 1270 <tabstop>buttonHelp</tabstop> … … 1292 1273 </tabstops> 1293 1274 <includes> 1275 <include location="global" impldecl="in declaration">qaction.h</include> 1276 <include location="global" impldecl="in declaration">qpopupmenu.h</include> 1294 1277 <include location="global" impldecl="in implementation">qvalidator.h</include> 1295 1278 <include location="global" impldecl="in implementation">qmessagebox.h</include> … … 1305 1288 <include location="local" impldecl="in declaration">QIHotKeyEdit.h</include> 1306 1289 <include location="local" impldecl="in declaration">VBoxGlobalSettings.h</include> 1290 <include location="local" impldecl="in implementation">VBoxToolBar.h</include> 1307 1291 <include location="local" impldecl="in implementation">VBoxUtils.h</include> 1308 1292 <include location="local" impldecl="in implementation">VBoxGlobal.h</include> … … 1329 1313 <variable access="private">bool mLanguageChanged;</variable> 1330 1314 <variable access="private">QIRichLabel *whatsThisLabel;</variable> 1315 <variable access="private">QPopupMenu *mUSBContextMenu;</variable> 1331 1316 </variables> 1332 1317 <slots> … … 1340 1325 <slot>lvUSBFilters_currentChanged( QListViewItem * )</slot> 1341 1326 <slot>lvUSBFilters_setCurrentText( const QString & )</slot> 1342 <slot>tbAddUSBFilter_clicked()</slot> 1343 <slot>tbAddUSBFilterFrom_clicked()</slot> 1327 <slot>lvUSBFilters_contextMenuRequested( QListViewItem*, const QPoint&, int )</slot> 1328 <slot>addUSBFilterAct_activated()</slot> 1329 <slot>addUSBFilterFromAct_activated()</slot> 1344 1330 <slot>menuAddUSBFilterFrom_activated( int )</slot> 1345 <slot> tbRemoveUSBFilter_clicked()</slot>1346 <slot> tbUSBFilterUp_clicked()</slot>1347 <slot> tbUSBFilterDown_clicked()</slot>1331 <slot>removeUSBFilterAct_activated()</slot> 1332 <slot>USBFilterUpAct_activated()</slot> 1333 <slot>USBFilterDownAct_activated()</slot> 1348 1334 <slot>lvLanguages_currentChanged( QListViewItem* )</slot> 1349 1335 </slots> -
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxGlobalSettingsDlg.ui.h
r8155 r8183 371 371 wstUSBFilters->addWidget (settings, 0); 372 372 lvUSBFilters_currentChanged (NULL); 373 /* setup toolbutton icons */ 374 tbAddUSBFilter->setIconSet (VBoxGlobal::iconSet ("usb_new_16px.png", 375 "usb_new_disabled_16px.png")); 376 tbAddUSBFilterFrom->setIconSet (VBoxGlobal::iconSet ("usb_add_16px.png", 377 "usb_add_disabled_16px.png")); 378 tbRemoveUSBFilter->setIconSet (VBoxGlobal::iconSet ("usb_remove_16px.png", 379 "usb_remove_disabled_16px.png")); 380 tbUSBFilterUp->setIconSet (VBoxGlobal::iconSet ("usb_moveup_16px.png", 381 "usb_moveup_disabled_16px.png")); 382 tbUSBFilterDown->setIconSet (VBoxGlobal::iconSet ("usb_movedown_16px.png", 383 "usb_movedown_disabled_16px.png")); 373 374 /* toolbar */ 375 { 376 VBoxToolBar *toolBar = new VBoxToolBar (0, grbUSBFilters, "USBToolBar"); 377 378 mAddUSBFilterAct->addTo (toolBar); 379 mAddUSBFilterFromAct->addTo (toolBar); 380 mRemoveUSBFilterAct->addTo (toolBar); 381 mUSBFilterUpAct->addTo (toolBar); 382 mUSBFilterDownAct->addTo (toolBar); 383 384 toolBar->setUsesTextLabel (false); 385 toolBar->setUsesBigPixmaps (false); 386 toolBar->setSizePolicy (QSizePolicy::Fixed, QSizePolicy::Fixed); 387 toolBar->setOrientation (Qt::Vertical); 388 #ifdef Q_WS_MAC 389 toolBar->setMacStyle(); 390 #endif 391 mUSBToolBarLayout->insertWidget (0, toolBar); 392 } 393 394 /* context menu */ 395 mUSBContextMenu = new QPopupMenu (this); 396 mAddUSBFilterAct->addTo (mUSBContextMenu); 397 mAddUSBFilterFromAct->addTo (mUSBContextMenu); 398 mRemoveUSBFilterAct->addTo (mUSBContextMenu); 399 mUSBFilterUpAct->addTo (mUSBContextMenu); 400 mUSBFilterDownAct->addTo (mUSBContextMenu); 401 402 /* icons */ 403 mAddUSBFilterAct->setIconSet (VBoxGlobal::iconSet ("usb_new_16px.png", 404 "usb_new_disabled_16px.png")); 405 mAddUSBFilterFromAct->setIconSet (VBoxGlobal::iconSet ("usb_add_16px.png", 406 "usb_add_disabled_16px.png")); 407 mRemoveUSBFilterAct->setIconSet (VBoxGlobal::iconSet ("usb_remove_16px.png", 408 "usb_remove_disabled_16px.png")); 409 mUSBFilterUpAct->setIconSet (VBoxGlobal::iconSet ("usb_moveup_16px.png", 410 "usb_moveup_disabled_16px.png")); 411 mUSBFilterDownAct->setIconSet (VBoxGlobal::iconSet ("usb_movedown_16px.png", 412 "usb_movedown_disabled_16px.png")); 413 384 414 /* create menu of existing usb-devices */ 385 415 usbDevicesMenu = new VBoxUSBMenu (this); … … 903 933 lvUSBFilters->setSelected (item, true); 904 934 905 tbRemoveUSBFilter->setEnabled (!!item);906 907 tbUSBFilterUp->setEnabled (!!item && item->itemAbove());908 tbUSBFilterDown->setEnabled (!!item && item->itemBelow());935 mRemoveUSBFilterAct->setEnabled (!!item); 936 937 mUSBFilterUpAct->setEnabled (!!item && item->itemAbove()); 938 mUSBFilterDownAct->setEnabled (!!item && item->itemBelow()); 909 939 910 940 if (item) … … 920 950 } 921 951 952 void VBoxGlobalSettingsDlg::lvUSBFilters_contextMenuRequested (QListViewItem *, 953 const QPoint &aPoint, int) 954 { 955 mUSBContextMenu->exec (aPoint); 956 } 957 922 958 void VBoxGlobalSettingsDlg::lvUSBFilters_setCurrentText (const QString &aText) 923 959 { … … 928 964 } 929 965 930 void VBoxGlobalSettingsDlg:: tbAddUSBFilter_clicked()966 void VBoxGlobalSettingsDlg::addUSBFilterAct_activated() 931 967 { 932 968 /* search for the max available filter index */ … … 958 994 } 959 995 960 void VBoxGlobalSettingsDlg::tbAddUSBFilterFrom_clicked() 961 { 962 usbDevicesMenu->exec (QCursor::pos()); 996 void VBoxGlobalSettingsDlg::addUSBFilterFromAct_activated() 997 { 998 QPoint pos = QCursor::pos(); 999 QRect rect = frameGeometry(); 1000 if (!rect.contains (pos)) 1001 { 1002 pos = lvUSBFilters->parentWidget()->mapToGlobal (lvUSBFilters->pos()); 1003 pos += QPoint (5, 5); 1004 } 1005 1006 usbDevicesMenu->exec (pos); 963 1007 } 964 1008 … … 999 1043 } 1000 1044 1001 void VBoxGlobalSettingsDlg:: tbRemoveUSBFilter_clicked()1045 void VBoxGlobalSettingsDlg::removeUSBFilterAct_activated() 1002 1046 { 1003 1047 QListViewItem *item = lvUSBFilters->currentItem(); … … 1016 1060 } 1017 1061 1018 void VBoxGlobalSettingsDlg:: tbUSBFilterUp_clicked()1062 void VBoxGlobalSettingsDlg::USBFilterUpAct_activated() 1019 1063 { 1020 1064 QListViewItem *item = lvUSBFilters->currentItem(); … … 1034 1078 } 1035 1079 1036 void VBoxGlobalSettingsDlg:: tbUSBFilterDown_clicked()1080 void VBoxGlobalSettingsDlg::USBFilterDownAct_activated() 1037 1081 { 1038 1082 QListViewItem *item = lvUSBFilters->currentItem(); -
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMSettingsDlg.ui
r8169 r8183 2231 2231 </property> 2232 2232 <property name="spacing"> 2233 <number> 0</number>2233 <number>5</number> 2234 2234 </property> 2235 2235 <widget class="QListView"> … … 2249 2249 </property> 2250 2250 <property name="whatsThis" stdset="0"> 2251 <string>Lists all USB filters of this machine. The checkbox to the left defines whether the particular filter is enabled or not.</string> 2251 <string> 2252 <qt>Lists all USB filters of 2253 this machine. The checkbox to the 2254 left defines whether the 2255 particular filter is enabled or 2256 not. Use the context menu or 2257 buttons to the right to add or 2258 remove USB filters.</qt> 2259 </string> 2252 2260 </property> 2253 2261 </widget> 2254 2262 <widget class="QLayoutWidget"> 2255 2263 <property name="name"> 2256 <cstring> layout147</cstring>2264 <cstring>mUSBToolBarLayout</cstring> 2257 2265 </property> 2258 2266 <vbox> … … 2263 2271 <number>0</number> 2264 2272 </property> 2265 <widget class="QToolButton">2266 <property name="name">2267 <cstring>tbAddUSBFilter</cstring>2268 </property>2269 <property name="focusPolicy">2270 <enum>TabFocus</enum>2271 </property>2272 <property name="text">2273 <string></string>2274 </property>2275 <property name="accel">2276 <string>Ins</string>2277 </property>2278 <property name="iconSet">2279 <iconset></iconset>2280 </property>2281 <property name="textLabel">2282 <string>Add Empty (Ins)</string>2283 </property>2284 <property name="autoRaise">2285 <bool>true</bool>2286 </property>2287 <property name="whatsThis" stdset="0">2288 <string>Adds a new USB filter with all fields initially set to empty strings. Note that such a filter will match any attached USB device.</string>2289 </property>2290 </widget>2291 <widget class="QToolButton">2292 <property name="name">2293 <cstring>tbAddUSBFilterFrom</cstring>2294 </property>2295 <property name="focusPolicy">2296 <enum>TabFocus</enum>2297 </property>2298 <property name="text">2299 <string></string>2300 </property>2301 <property name="accel">2302 <string>Alt+Ins</string>2303 </property>2304 <property name="iconSet">2305 <iconset></iconset>2306 </property>2307 <property name="textLabel">2308 <string>Add From (Alt+Ins)</string>2309 </property>2310 <property name="autoRaise">2311 <bool>true</bool>2312 </property>2313 <property name="whatsThis" stdset="0">2314 <string>Adds a new USB filter with all fields set to the values of the selected USB device attached to the host PC.</string>2315 </property>2316 </widget>2317 <widget class="QToolButton">2318 <property name="name">2319 <cstring>tbRemoveUSBFilter</cstring>2320 </property>2321 <property name="focusPolicy">2322 <enum>TabFocus</enum>2323 </property>2324 <property name="text">2325 <string></string>2326 </property>2327 <property name="accel">2328 <string>Del</string>2329 </property>2330 <property name="iconSet">2331 <iconset></iconset>2332 </property>2333 <property name="textLabel">2334 <string>Remove (Del)</string>2335 </property>2336 <property name="autoRaise">2337 <bool>true</bool>2338 </property>2339 <property name="whatsThis" stdset="0">2340 <string>Removes the selected USB filter.</string>2341 </property>2342 </widget>2343 <widget class="QToolButton">2344 <property name="name">2345 <cstring>tbUSBFilterUp</cstring>2346 </property>2347 <property name="focusPolicy">2348 <enum>TabFocus</enum>2349 </property>2350 <property name="text">2351 <string></string>2352 </property>2353 <property name="accel">2354 <string>Ctrl+Up</string>2355 </property>2356 <property name="iconSet">2357 <iconset></iconset>2358 </property>2359 <property name="textLabel">2360 <string>Move Up (Ctrl+Up)</string>2361 </property>2362 <property name="autoRaise">2363 <bool>true</bool>2364 </property>2365 <property name="whatsThis" stdset="0">2366 <string>Moves the selected USB filter up.</string>2367 </property>2368 </widget>2369 <widget class="QToolButton">2370 <property name="name">2371 <cstring>tbUSBFilterDown</cstring>2372 </property>2373 <property name="focusPolicy">2374 <enum>TabFocus</enum>2375 </property>2376 <property name="text">2377 <string></string>2378 </property>2379 <property name="accel">2380 <string>Ctrl+Down</string>2381 </property>2382 <property name="iconSet">2383 <iconset></iconset>2384 </property>2385 <property name="textLabel">2386 <string>Move Down (Ctrl+Down)</string>2387 </property>2388 <property name="autoRaise">2389 <bool>true</bool>2390 </property>2391 <property name="whatsThis" stdset="0">2392 <string>Moves the selected USB filter down.</string>2393 </property>2394 </widget>2395 2273 <spacer> 2396 2274 <property name="name"> … … 2849 2727 </grid> 2850 2728 </widget> 2729 <toolbars> 2730 </toolbars> 2731 <actions> 2732 <action> 2733 <property name="name"> 2734 <cstring>mAddUSBFilterAct</cstring> 2735 </property> 2736 <property name="text"> 2737 <string>Add Empty Filter</string> 2738 </property> 2739 <property name="menuText"> 2740 <string>&Add Empty Filter</string> 2741 </property> 2742 <property name="accel"> 2743 <string>Ins</string> 2744 </property> 2745 <property name="whatsThis" stdset="0"> 2746 <string> 2747 <qt>Adds a new USB filter with all fields initially set to 2748 empty strings. Note that such a filter will match any attached USB 2749 device.</qt> 2750 </string> 2751 </property> 2752 </action> 2753 <action> 2754 <property name="name"> 2755 <cstring>mAddUSBFilterFromAct</cstring> 2756 </property> 2757 <property name="text"> 2758 <string>Add Filter From Device</string> 2759 </property> 2760 <property name="menuText"> 2761 <string>A&dd Filter From Device</string> 2762 </property> 2763 <property name="accel"> 2764 <string>Alt+Ins</string> 2765 </property> 2766 <property name="whatsThis" stdset="0"> 2767 <string><qt>Adds a new USB filter with all fields set to the 2768 values of the selected USB device attached to the host 2769 PC.</qt> 2770 </string> 2771 </property> 2772 </action> 2773 <action> 2774 <property name="name"> 2775 <cstring>mRemoveUSBFilterAct</cstring> 2776 </property> 2777 <property name="text"> 2778 <string>Remove Filter</string> 2779 </property> 2780 <property name="menuText"> 2781 <string>&Remove Filter</string> 2782 </property> 2783 <property name="accel"> 2784 <string>Del</string> 2785 </property> 2786 <property name="whatsThis" stdset="0"> 2787 <string> 2788 <qt>Removes the highlighted USB filter.</qt> 2789 </string> 2790 </property> 2791 </action> 2792 <action> 2793 <property name="name"> 2794 <cstring>mUSBFilterUpAct</cstring> 2795 </property> 2796 <property name="text"> 2797 <string>Move Filter Up</string> 2798 </property> 2799 <property name="menuText"> 2800 <string>&Move Filter Up</string> 2801 </property> 2802 <property name="accel"> 2803 <string>Ctrl+Up</string> 2804 </property> 2805 <property name="whatsThis" stdset="0"> 2806 <string> 2807 <qt>Moves the highlighted USB filter up.</qt> 2808 </string> 2809 </property> 2810 </action> 2811 <action> 2812 <property name="name"> 2813 <cstring>mUSBFilterDownAct</cstring> 2814 </property> 2815 <property name="text"> 2816 <string>Move Filter Down</string> 2817 </property> 2818 <property name="menuText"> 2819 <string>M&ove Filter Down</string> 2820 </property> 2821 <property name="accel"> 2822 <string>Ctrl+Down</string> 2823 </property> 2824 <property name="whatsThis" stdset="0"> 2825 <string> 2826 <qt>Moves the highlighted USB filter down.</qt> 2827 </string> 2828 </property> 2829 </action> 2830 </actions> 2851 2831 <connections> 2852 2832 <connection> … … 2917 2897 </connection> 2918 2898 <connection> 2919 <sender> tbAddUSBFilter</sender>2920 <signal>c licked()</signal>2899 <sender>lvUSBFilters</sender> 2900 <signal>contextMenuRequested(QListViewItem*, const QPoint&, int)</signal> 2921 2901 <receiver>VBoxVMSettingsDlg</receiver> 2922 <slot> tbAddUSBFilter_clicked()</slot>2902 <slot>lvUSBFilters_contextMenuRequested(QListViewItem*, const QPoint&, int)</slot> 2923 2903 </connection> 2924 2904 <connection> 2925 <sender> tbAddUSBFilterFrom</sender>2926 <signal> clicked()</signal>2905 <sender>mAddUSBFilterAct</sender> 2906 <signal>activated()</signal> 2927 2907 <receiver>VBoxVMSettingsDlg</receiver> 2928 <slot> tbAddUSBFilterFrom_clicked()</slot>2908 <slot>addUSBFilterAct_activated()</slot> 2929 2909 </connection> 2930 2910 <connection> 2931 <sender> tbRemoveUSBFilter</sender>2932 <signal> clicked()</signal>2911 <sender>mAddUSBFilterFromAct</sender> 2912 <signal>activated()</signal> 2933 2913 <receiver>VBoxVMSettingsDlg</receiver> 2934 <slot> tbRemoveUSBFilter_clicked()</slot>2914 <slot>addUSBFilterFromAct_activated()</slot> 2935 2915 </connection> 2936 2916 <connection> 2937 <sender> tbUSBFilterUp</sender>2938 <signal> clicked()</signal>2917 <sender>mRemoveUSBFilterAct</sender> 2918 <signal>activated()</signal> 2939 2919 <receiver>VBoxVMSettingsDlg</receiver> 2940 <slot> tbUSBFilterUp_clicked()</slot>2920 <slot>removeUSBFilterAct_activated()</slot> 2941 2921 </connection> 2942 2922 <connection> 2943 <sender> tbUSBFilterDown</sender>2944 <signal> clicked()</signal>2923 <sender>mUSBFilterUpAct</sender> 2924 <signal>activated()</signal> 2945 2925 <receiver>VBoxVMSettingsDlg</receiver> 2946 <slot>tbUSBFilterDown_clicked()</slot> 2926 <slot>USBFilterUpAct_activated()</slot> 2927 </connection> 2928 <connection> 2929 <sender>mUSBFilterDownAct</sender> 2930 <signal>activated()</signal> 2931 <receiver>VBoxVMSettingsDlg</receiver> 2932 <slot>USBFilterDownAct_activated()</slot> 2947 2933 </connection> 2948 2934 <connection> … … 3000 2986 <tabstop>cbEnableUSBEhci</tabstop> 3001 2987 <tabstop>lvUSBFilters</tabstop> 3002 <tabstop>tbAddUSBFilter</tabstop>3003 <tabstop>tbAddUSBFilterFrom</tabstop>3004 <tabstop>tbRemoveUSBFilter</tabstop>3005 <tabstop>tbUSBFilterUp</tabstop>3006 <tabstop>tbUSBFilterDown</tabstop>3007 2988 <tabstop>grbVRDP</tabstop> 3008 2989 <tabstop>leVRDPPort</tabstop> … … 3014 2995 </tabstops> 3015 2996 <includes> 2997 <include location="global" impldecl="in declaration">qaction.h</include> 2998 <include location="global" impldecl="in declaration">qpopupmenu.h</include> 3016 2999 <include location="global" impldecl="in declaration">qvaluevector.h</include> 3017 3000 <include location="global" impldecl="in implementation">qvalidator.h</include> … … 3030 3013 <include location="local" impldecl="in declaration">COMDefs.h</include> 3031 3014 <include location="local" impldecl="in declaration">QIWidgetValidator.h</include> 3015 <include location="local" impldecl="in declaration">VBoxGlobal.h</include> 3032 3016 <include location="local" impldecl="in implementation">VBoxUtils.h</include> 3033 <include location="local" impldecl="in declaration">VBoxGlobal.h</include>3017 <include location="local" impldecl="in implementation">VBoxToolBar.h</include> 3034 3018 <include location="local" impldecl="in implementation">VBoxVMNetworkSettings.h</include> 3035 3019 <include location="local" impldecl="in implementation">VBoxVMSerialPortSettings.h</include> … … 3082 3066 <variable access="private">bool mResetFirstRunFlag;</variable> 3083 3067 <variable access="private">bool mLockNetworkListUpdate;</variable> 3068 <variable access="private">QPopupMenu *mUSBContextMenu;</variable> 3084 3069 </variables> 3085 3070 <slots> … … 3106 3091 <slot>lvUSBFilters_currentChanged( QListViewItem * item )</slot> 3107 3092 <slot>lvUSBFilters_setCurrentText( const QString & aText )</slot> 3108 <slot>tbAddUSBFilter_clicked()</slot> 3109 <slot>tbAddUSBFilterFrom_clicked()</slot> 3093 <slot>lvUSBFilters_contextMenuRequested( QListViewItem*, const QPoint&, int )</slot> 3094 <slot>addUSBFilterAct_activated()</slot> 3095 <slot>addUSBFilterFromAct_activated()</slot> 3110 3096 <slot>menuAddUSBFilterFrom_activated( int )</slot> 3111 <slot> tbRemoveUSBFilter_clicked()</slot>3112 <slot> tbUSBFilterUp_clicked()</slot>3113 <slot> tbUSBFilterDown_clicked()</slot>3097 <slot>removeUSBFilterAct_activated()</slot> 3098 <slot>USBFilterUpAct_activated()</slot> 3099 <slot>USBFilterDownAct_activated()</slot> 3114 3100 <slot>cdMediaChanged()</slot> 3115 3101 <slot>fdMediaChanged()</slot> -
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMSettingsDlg.ui.h
r8155 r8183 708 708 lvUSBFilters_currentChanged (NULL); 709 709 710 /* setup iconsets -- qdesigner is not capable... */ 711 tbAddUSBFilter->setIconSet (VBoxGlobal::iconSet ("usb_new_16px.png", 712 "usb_new_disabled_16px.png")); 713 tbAddUSBFilterFrom->setIconSet (VBoxGlobal::iconSet ("usb_add_16px.png", 714 "usb_add_disabled_16px.png")); 715 tbRemoveUSBFilter->setIconSet (VBoxGlobal::iconSet ("usb_remove_16px.png", 716 "usb_remove_disabled_16px.png")); 717 tbUSBFilterUp->setIconSet (VBoxGlobal::iconSet ("usb_moveup_16px.png", 718 "usb_moveup_disabled_16px.png")); 719 tbUSBFilterDown->setIconSet (VBoxGlobal::iconSet ("usb_movedown_16px.png", 720 "usb_movedown_disabled_16px.png")); 710 /* toolbar */ 711 { 712 VBoxToolBar *toolBar = new VBoxToolBar (0, grbUSBFilters, "USBToolBar"); 713 714 mAddUSBFilterAct->addTo (toolBar); 715 mAddUSBFilterFromAct->addTo (toolBar); 716 mRemoveUSBFilterAct->addTo (toolBar); 717 mUSBFilterUpAct->addTo (toolBar); 718 mUSBFilterDownAct->addTo (toolBar); 719 720 toolBar->setUsesTextLabel (false); 721 toolBar->setUsesBigPixmaps (false); 722 toolBar->setSizePolicy (QSizePolicy::Fixed, QSizePolicy::Fixed); 723 toolBar->setOrientation (Qt::Vertical); 724 #ifdef Q_WS_MAC 725 toolBar->setMacStyle(); 726 #endif 727 mUSBToolBarLayout->insertWidget (0, toolBar); 728 } 729 730 /* context menu */ 731 mUSBContextMenu = new QPopupMenu (this); 732 mAddUSBFilterAct->addTo (mUSBContextMenu); 733 mAddUSBFilterFromAct->addTo (mUSBContextMenu); 734 mRemoveUSBFilterAct->addTo (mUSBContextMenu); 735 mUSBFilterUpAct->addTo (mUSBContextMenu); 736 mUSBFilterDownAct->addTo (mUSBContextMenu); 737 738 /* icons */ 739 mAddUSBFilterAct->setIconSet (VBoxGlobal::iconSet ("usb_new_16px.png", 740 "usb_new_disabled_16px.png")); 741 mAddUSBFilterFromAct->setIconSet (VBoxGlobal::iconSet ("usb_add_16px.png", 742 "usb_add_disabled_16px.png")); 743 mRemoveUSBFilterAct->setIconSet (VBoxGlobal::iconSet ("usb_remove_16px.png", 744 "usb_remove_disabled_16px.png")); 745 mUSBFilterUpAct->setIconSet (VBoxGlobal::iconSet ("usb_moveup_16px.png", 746 "usb_moveup_disabled_16px.png")); 747 mUSBFilterDownAct->setIconSet (VBoxGlobal::iconSet ("usb_movedown_16px.png", 748 "usb_movedown_disabled_16px.png")); 749 750 /* create menu of existing usb-devices */ 721 751 usbDevicesMenu = new VBoxUSBMenu (this); 722 752 connect (usbDevicesMenu, SIGNAL(activated(int)), this, SLOT(menuAddUSBFilterFrom_activated(int))); … … 2379 2409 lvUSBFilters->setSelected (item, true); 2380 2410 2381 tbRemoveUSBFilter->setEnabled (!!item);2382 2383 tbUSBFilterUp->setEnabled (!!item && item->itemAbove());2384 tbUSBFilterDown->setEnabled (!!item && item->itemBelow());2411 mRemoveUSBFilterAct->setEnabled (!!item); 2412 2413 mUSBFilterUpAct->setEnabled (!!item && item->itemAbove()); 2414 mUSBFilterDownAct->setEnabled (!!item && item->itemBelow()); 2385 2415 2386 2416 if (item) … … 2396 2426 } 2397 2427 2428 void VBoxVMSettingsDlg::lvUSBFilters_contextMenuRequested (QListViewItem *, 2429 const QPoint &aPoint, int) 2430 { 2431 mUSBContextMenu->exec (aPoint); 2432 } 2433 2398 2434 void VBoxVMSettingsDlg::lvUSBFilters_setCurrentText (const QString &aText) 2399 2435 { … … 2404 2440 } 2405 2441 2406 void VBoxVMSettingsDlg:: tbAddUSBFilter_clicked()2442 void VBoxVMSettingsDlg::addUSBFilterAct_activated() 2407 2443 { 2408 2444 /* search for the max available filter index */ … … 2431 2467 } 2432 2468 2433 void VBoxVMSettingsDlg::tbAddUSBFilterFrom_clicked() 2434 { 2435 usbDevicesMenu->exec (QCursor::pos()); 2469 void VBoxVMSettingsDlg::addUSBFilterFromAct_activated() 2470 { 2471 QPoint pos = QCursor::pos(); 2472 QRect rect = frameGeometry(); 2473 if (!rect.contains (pos)) 2474 { 2475 pos = lvUSBFilters->parentWidget()->mapToGlobal (lvUSBFilters->pos()); 2476 pos += QPoint (5, 5); 2477 } 2478 2479 usbDevicesMenu->exec (pos); 2436 2480 } 2437 2481 … … 2468 2512 } 2469 2513 2470 void VBoxVMSettingsDlg:: tbRemoveUSBFilter_clicked()2514 void VBoxVMSettingsDlg::removeUSBFilterAct_activated() 2471 2515 { 2472 2516 QListViewItem *item = lvUSBFilters->currentItem(); … … 2485 2529 } 2486 2530 2487 void VBoxVMSettingsDlg:: tbUSBFilterUp_clicked()2531 void VBoxVMSettingsDlg::USBFilterUpAct_activated() 2488 2532 { 2489 2533 QListViewItem *item = lvUSBFilters->currentItem(); … … 2506 2550 } 2507 2551 2508 void VBoxVMSettingsDlg:: tbUSBFilterDown_clicked()2552 void VBoxVMSettingsDlg::USBFilterDownAct_activated() 2509 2553 { 2510 2554 QListViewItem *item = lvUSBFilters->currentItem();
Note:
See TracChangeset
for help on using the changeset viewer.