VirtualBox

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

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

Fe/Qt4: GlobalUSBSettings ported to qt4. Hidden for now by #ifdef ENABLE_GLOBAL_USB (in VBoxVMSettingsUSB.cpp file).

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