VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox4/include/VBoxVMSettingsUSB.h@ 10971

Last change on this file since 10971 was 10728, checked in by vboxsync, 16 years ago

FE/Qt4: VM USB settings face lift.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Revision Author Id
File size: 2.6 KB
Line 
1/** @file
2 *
3 * VBox frontends: Qt4 GUI ("VirtualBox"):
4 * VBoxVMSettingsUSB class declaration
5 */
6
7/*
8 * Copyright (C) 2006-2008 Sun Microsystems, Inc.
9 *
10 * This file is part of VirtualBox Open Source Edition (OSE), as
11 * available from http://www.virtualbox.org. This file is free software;
12 * you can redistribute it and/or modify it under the terms of the GNU
13 * General Public License (GPL) as published by the Free Software
14 * Foundation, in version 2 as it comes in the "COPYING" file of the
15 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
16 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
17 *
18 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
19 * Clara, CA 95054 USA or visit http://www.sun.com if you need
20 * additional information or have any questions.
21 */
22
23#ifndef __VBoxVMSettingsUSB_h__
24#define __VBoxVMSettingsUSB_h__
25
26#include "VBoxSettingsPage.h"
27#include "VBoxVMSettingsUSB.gen.h"
28#include "COMDefs.h"
29
30class VBoxUSBMenu;
31
32class VBoxVMSettingsUSB : public VBoxSettingsPage,
33 public Ui::VBoxVMSettingsUSB
34{
35 Q_OBJECT;
36
37public:
38
39 enum FilterType
40 {
41 WrongType = 0,
42 HostType = 1,
43 MachineType = 2
44 };
45
46 enum RemoteMode
47 {
48 ModeAny = 0,
49 ModeOn,
50 ModeOff
51 };
52
53 VBoxVMSettingsUSB (FilterType aType);
54
55protected:
56
57 void getFrom (const CSystemProperties &aProps,
58 const VBoxGlobalSettings &aGs);
59 void putBackTo (CSystemProperties &aProps,
60 VBoxGlobalSettings &aGs);
61
62 void getFrom (const CMachine &aMachine);
63 void putBackTo();
64
65 void setValidator (QIWidgetValidator *aVal);
66
67 void setOrderAfter (QWidget *aWidget);
68
69 void retranslateUi();
70
71private slots:
72
73 void usbAdapterToggled (bool aOn);
74 void currentChanged (QTreeWidgetItem *aItem = 0,
75 QTreeWidgetItem *aPrev = 0);
76
77 void newClicked();
78 void addClicked();
79 void edtClicked();
80 void addConfirmed (QAction *aAction);
81 void delClicked();
82 void mupClicked();
83 void mdnClicked();
84 void showContextMenu (const QPoint &aPos);
85
86private:
87
88 void addUSBFilter (const CUSBDeviceFilter &aFilter, bool isNew);
89
90 CMachine mMachine;
91 QIWidgetValidator *mValidator;
92 FilterType mType;
93 QAction *mNewAction;
94 QAction *mAddAction;
95 QAction *mEdtAction;
96 QAction *mDelAction;
97 QAction *mMupAction;
98 QAction *mMdnAction;
99 QMenu *mMenu;
100 VBoxUSBMenu *mUSBDevicesMenu;
101 bool mUSBFilterListModified;
102 QList<CUSBDeviceFilter> mFilters;
103
104 QString mUSBFilterName;
105};
106
107#endif // __VBoxVMSettingsUSB_h__
108
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette