VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/include/VBoxVMSettingsNetwork.h@ 18378

Last change on this file since 18378 was 17901, checked in by vboxsync, 16 years ago

FE/Qt4: 2869: Rework network adapter UI - UI reworked to show "Network Details" overview in VM Settings / Network page. Also "Cable connected" check-box moved to "Network Details" sub-dialog.

  • 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 * VBoxVMSettingsNetwork class declaration
5 */
6
7/*
8 * Copyright (C) 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/* VBox Includes */
27#include "COMDefs.h"
28#include "VBoxSettingsPage.h"
29#include "VBoxVMSettingsNetwork.gen.h"
30
31/* VBox Forwardes */
32class VBoxVMSettingsNetworkPage;
33class VBoxVMSettingsNetworkDetails;
34
35class VBoxVMSettingsNetwork : public QIWithRetranslateUI <QWidget>,
36 public Ui::VBoxVMSettingsNetwork
37{
38 Q_OBJECT;
39
40public:
41
42 VBoxVMSettingsNetwork (VBoxVMSettingsNetworkPage *aParent);
43
44 void getFromAdapter (const CNetworkAdapter &aAdapter);
45 void putBackToAdapter();
46
47 void setValidator (QIWidgetValidator *aValidator);
48 bool revalidate (QString &aWarning, QString &aTitle);
49
50 QWidget* setOrderAfter (QWidget *aAfter);
51
52 QString pageTitle() const;
53 QString currentName (KNetworkAttachmentType aType = KNetworkAttachmentType_Null) const;
54
55protected:
56
57 void retranslateUi();
58
59private slots:
60
61 void updateAttachmentInfo();
62 void detailsClicked();
63
64private:
65
66 void populateComboboxes();
67 KNetworkAttachmentType attachmentType() const;
68
69 VBoxVMSettingsNetworkPage *mParent;
70 VBoxVMSettingsNetworkDetails *mDetails;
71 CNetworkAdapter mAdapter;
72 QIWidgetValidator *mValidator;
73};
74
75class VBoxVMSettingsNetworkPage : public VBoxSettingsPage
76{
77 Q_OBJECT;
78
79public:
80
81 VBoxVMSettingsNetworkPage();
82
83 QStringList netList() const;
84 QStringList intList (KHostNetworkInterfaceType aType) const;
85
86protected:
87
88 void getFrom (const CMachine &aMachine);
89 void putBackTo();
90
91 void setValidator (QIWidgetValidator *aValidator);
92 bool revalidate (QString &aWarning, QString &aTitle);
93
94 void retranslateUi();
95
96private:
97
98 QIWidgetValidator *mValidator;
99 QTabWidget *mTwAdapters;
100};
101
102#endif // __VBoxVMSettingsNetwork_h__
103
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