VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/include/VBoxVMSettingsUSB.h@ 25045

Last change on this file since 25045 was 24600, checked in by vboxsync, 15 years ago

FE/Qt4: 4426: USB filters cannot be disabled - state change handler added.

  • 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 void markSettingsChanged();
86
87private:
88
89 void addUSBFilter (const CUSBDeviceFilter &aFilter, bool isNew);
90
91 CMachine mMachine;
92 QIWidgetValidator *mValidator;
93 FilterType mType;
94 QAction *mNewAction;
95 QAction *mAddAction;
96 QAction *mEdtAction;
97 QAction *mDelAction;
98 QAction *mMupAction;
99 QAction *mMdnAction;
100 QMenu *mMenu;
101 VBoxUSBMenu *mUSBDevicesMenu;
102 bool mUSBFilterListModified;
103 QList<CUSBDeviceFilter> mFilters;
104
105 QString mUSBFilterName;
106};
107
108#endif // __VBoxVMSettingsUSB_h__
109
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