VirtualBox

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

Last change on this file since 23562 was 23562, checked in by vboxsync, 15 years ago

FE/Qt4: VBoxConsoleWnd & VBoxVMSettingsNetwork: Few coding-style fixes.

  • 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 * 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;
33
34class VBoxVMSettingsNetwork : public QIWithRetranslateUI <QWidget>,
35 public Ui::VBoxVMSettingsNetwork
36{
37 Q_OBJECT;
38
39public:
40
41 VBoxVMSettingsNetwork (VBoxVMSettingsNetworkPage *aParent, bool aDisableStaticControls = false);
42
43 void getFromAdapter (const CNetworkAdapter &aAdapter);
44 void putBackToAdapter();
45
46 void setValidator (QIWidgetValidator *aValidator);
47 bool revalidate (QString &aWarning, QString &aTitle);
48
49 QWidget* setOrderAfter (QWidget *aAfter);
50
51 QString pageTitle() const;
52 KNetworkAttachmentType attachmentType() const;
53 QString alternativeName (int aType = -1) const;
54
55protected:
56
57 void showEvent (QShowEvent *aEvent);
58
59 void retranslateUi();
60
61private slots:
62
63 void updateAttachmentAlternative();
64 void updateAlternativeName();
65 void toggleAdvanced();
66 void generateMac();
67
68private:
69
70 void populateComboboxes();
71
72 VBoxVMSettingsNetworkPage *mParent;
73 CNetworkAdapter mAdapter;
74 QIWidgetValidator *mValidator;
75
76 QString mBrgName;
77 QString mIntName;
78 QString mHoiName;
79
80 bool mPolished;
81 bool mDisableStaticControls;
82};
83
84class VBoxVMSettingsNetworkPage : public VBoxSettingsPage
85{
86 Q_OBJECT;
87
88public:
89
90 VBoxVMSettingsNetworkPage (bool aDisableStaticControls = false);
91
92 QStringList brgList (bool aRefresh = false);
93 QStringList intList (bool aRefresh = false);
94 QStringList hoiList (bool aRefresh = false);
95
96protected:
97
98 void getFrom (const CMachine &aMachine);
99 void putBackTo();
100
101 void setValidator (QIWidgetValidator *aValidator);
102 bool revalidate (QString &aWarning, QString &aTitle);
103
104 void retranslateUi();
105
106private slots:
107
108 void updatePages();
109
110private:
111
112 QIWidgetValidator *mValidator;
113 QTabWidget *mTwAdapters;
114
115 QStringList mBrgList;
116 QStringList mIntList;
117 QStringList mHoiList;
118
119 bool mDisableStaticControls;
120};
121
122#endif // __VBoxVMSettingsNetwork_h__
123
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