VirtualBox

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

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

Fe/Qt4: Fixed VMSettings selector list changes during VBoxManage language change.

  • 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 ~VBoxVMSettingsUSB();
66
67 void getFromHost();
68 void putBackToHost();
69
70 void getFromMachine (const CMachine &aMachine);
71 void putBackToMachine();
72
73 void retranslateUi();
74
75 FilterType mType;
76
77private slots:
78
79 void usbAdapterToggled (bool aOn);
80 void currentChanged (QTreeWidgetItem *aItem = 0,
81 QTreeWidgetItem *aPrev = 0);
82 void setCurrentText (const QString &aText);
83 void newClicked();
84 void addClicked();
85 void addConfirmed (QAction *aAction);
86 void delClicked();
87 void mupClicked();
88 void mdnClicked();
89 void showContextMenu (const QPoint &aPos);
90
91private:
92
93 void addUSBFilter (const CUSBDeviceFilter &aFilter, bool isNew);
94
95 static VBoxVMSettingsUSB *mSettings;
96
97 CMachine mMachine;
98 QIWidgetValidator *mValidator;
99 QAction *mNewAction;
100 QAction *mAddAction;
101 QAction *mDelAction;
102 QAction *mMupAction;
103 QAction *mMdnAction;
104 QMenu *mMenu;
105 VBoxUSBMenu *mUSBDevicesMenu;
106 bool mUSBFilterListModified;
107 QList<CUSBDeviceFilter> mFilters;
108
109 QString mUSBFilterName;
110};
111
112#endif // __VBoxVMSettingsUSB_h__
113
Note: See TracBrowser for help on using the repository browser.

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