VirtualBox

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

Last change on this file since 9654 was 9654, checked in by vboxsync, 17 years ago

FE/Qt4: Exported to OSE. Some code style updates.

  • 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 "VBoxVMSettingsUSB.gen.h"
27#include "COMDefs.h"
28
29class VBoxVMSettingsDlg;
30class QIWidgetValidator;
31class VBoxUSBMenu;
32
33class VBoxVMSettingsUSB : public QWidget,
34 public Ui::VBoxVMSettingsUSB
35{
36 Q_OBJECT;
37
38public:
39
40 enum FilterType
41 {
42 WrongType = 0,
43 HostType = 1,
44 MachineType = 2
45 };
46
47 VBoxVMSettingsUSB (QWidget *aParent,
48 FilterType aType,
49 VBoxVMSettingsDlg *aDlg,
50 const QString &aPath);
51
52 static void getFromMachine (const CMachine &aMachine,
53 QWidget *aPage,
54 VBoxVMSettingsDlg *aDlg,
55 const QString &aPath);
56 static void putBackToMachine();
57
58 void getFrom (const CMachine &aMachine);
59 void putBackTo();
60
61private slots:
62
63 void usbAdapterToggled (bool aOn);
64 void currentChanged (QTreeWidgetItem *aItem = 0,
65 QTreeWidgetItem *aPrev = 0);
66 void setCurrentText (const QString &aText);
67 void newClicked();
68 void addClicked();
69 void addConfirmed (QAction *aAction);
70 void delClicked();
71 void mupClicked();
72 void mdnClicked();
73 void showContextMenu (const QPoint &aPos);
74
75private:
76
77 void addUSBFilter (const CUSBDeviceFilter &aFilter, bool isNew);
78
79 static VBoxVMSettingsUSB *mSettings;
80
81 CMachine mMachine;
82 FilterType mType;
83 QIWidgetValidator *mValidator;
84 QAction *mNewAction;
85 QAction *mAddAction;
86 QAction *mDelAction;
87 QAction *mMupAction;
88 QAction *mMdnAction;
89 QMenu *mMenu;
90 VBoxUSBMenu *mUSBDevicesMenu;
91 bool mUSBFilterListModified;
92 QList<CUSBDeviceFilter> mFilters;
93};
94
95#endif // __VBoxVMSettingsUSB_h__
96
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