1 | /** @file
|
---|
2 | *
|
---|
3 | * VBox frontends: Qt4 GUI ("VirtualBox"):
|
---|
4 | * VBoxVMSettingsNetwork 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 __VBoxVMSettingsNetwork_h__
|
---|
24 | #define __VBoxVMSettingsNetwork_h__
|
---|
25 |
|
---|
26 | #include "VBoxVMSettingsNetwork.gen.h"
|
---|
27 | #include "COMDefs.h"
|
---|
28 |
|
---|
29 | class VBoxVMSettingsDlg;
|
---|
30 | class QIWidgetValidator;
|
---|
31 |
|
---|
32 | class VBoxVMSettingsNetwork : public QWidget,
|
---|
33 | public Ui::VBoxVMSettingsNetwork
|
---|
34 | {
|
---|
35 | Q_OBJECT
|
---|
36 |
|
---|
37 | public:
|
---|
38 |
|
---|
39 | VBoxVMSettingsNetwork();
|
---|
40 |
|
---|
41 | static void getFromMachine (const CMachine &aMachine,
|
---|
42 | QWidget *aPage,
|
---|
43 | VBoxVMSettingsDlg *aDlg,
|
---|
44 | const QString &aPath);
|
---|
45 | static void putBackToMachine();
|
---|
46 | static bool revalidate (QString &aWarning, QString &aTitle);
|
---|
47 |
|
---|
48 | void loadListNetworks (const QStringList &aList);
|
---|
49 |
|
---|
50 | void getFromAdapter (const CNetworkAdapter &aAdapter);
|
---|
51 | void putBackToAdapter();
|
---|
52 |
|
---|
53 | void setValidator (QIWidgetValidator *aValidator);
|
---|
54 |
|
---|
55 | private slots:
|
---|
56 |
|
---|
57 | static void updateListNetworks();
|
---|
58 | // #ifdef Q_WS_WIN
|
---|
59 | // static void addHostInterface();
|
---|
60 | // static void delHostInterface();
|
---|
61 | // #endif
|
---|
62 |
|
---|
63 | void adapterToggled (bool aOn);
|
---|
64 | void naTypeChanged (const QString &aString);
|
---|
65 | void genMACClicked();
|
---|
66 | #ifdef Q_WS_X11
|
---|
67 | void tapSetupClicked();
|
---|
68 | void tapTerminateClicked();
|
---|
69 | #endif
|
---|
70 |
|
---|
71 | private:
|
---|
72 |
|
---|
73 | static void prepareListNetworks();
|
---|
74 | // #ifdef Q_WS_WIN
|
---|
75 | // static void prepareListInterfaces();
|
---|
76 | // #endif
|
---|
77 |
|
---|
78 | /* Widgets */
|
---|
79 | static QTabWidget *mTwAdapters;
|
---|
80 | // #ifdef Q_WS_WIN
|
---|
81 | // static QGroupBox *mGbInterfaces;
|
---|
82 | // static QListWidget *mLwInterfaces;
|
---|
83 | // #endif
|
---|
84 |
|
---|
85 | /* Actions */
|
---|
86 | // #ifdef Q_WS_WIN
|
---|
87 | // static QAction *mAddAction;
|
---|
88 | // static QAction *mDelAction;
|
---|
89 | // #endif
|
---|
90 |
|
---|
91 | /* Flags */
|
---|
92 | static bool mLockNetworkListUpdate;
|
---|
93 |
|
---|
94 | /* Lists */
|
---|
95 | static QStringList mListNetworks;
|
---|
96 | // #ifdef Q_WS_WIN
|
---|
97 | // static QStringList mListInterface;
|
---|
98 | // static QString mNoInterfaces;
|
---|
99 | // #endif
|
---|
100 |
|
---|
101 | QIWidgetValidator *mValidator;
|
---|
102 | CNetworkAdapter mAdapter;
|
---|
103 | // #ifdef Q_WS_WIN
|
---|
104 | // QString mInterface_win;
|
---|
105 | // #endif
|
---|
106 | };
|
---|
107 |
|
---|
108 | #endif // __VBoxVMSettingsNetwork_h__
|
---|
109 |
|
---|