VirtualBox

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

Last change on this file since 19149 was 18905, checked in by vboxsync, 16 years ago

FE/Qt4: 3808: Network settings not intuitive - VM Settings / Network page reworked to move alternate name combo to network adapter page.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Date Revision Author Id
File size: 2.8 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 KNetworkAttachmentType attachmentType() const;
54 QString alternativeName (int aType = -1) const;
55
56protected:
57
58 void retranslateUi();
59
60private slots:
61
62 void updateAttachmentAlternative();
63 void updateAlternativeName();
64 void detailsClicked();
65
66private:
67
68 void populateComboboxes();
69
70 VBoxVMSettingsNetworkPage *mParent;
71 VBoxVMSettingsNetworkDetails *mDetails;
72 CNetworkAdapter mAdapter;
73 QIWidgetValidator *mValidator;
74
75 QString mBrgName;
76 QString mIntName;
77 QString mHoiName;
78};
79
80class VBoxVMSettingsNetworkPage : public VBoxSettingsPage
81{
82 Q_OBJECT;
83
84public:
85
86 VBoxVMSettingsNetworkPage();
87
88 QStringList brgList (bool aRefresh = false);
89 QStringList intList (bool aRefresh = false);
90 QStringList hoiList (bool aRefresh = false);
91
92protected:
93
94 void getFrom (const CMachine &aMachine);
95 void putBackTo();
96
97 void setValidator (QIWidgetValidator *aValidator);
98 bool revalidate (QString &aWarning, QString &aTitle);
99
100 void retranslateUi();
101
102private slots:
103
104 void updatePages();
105
106private:
107
108 QIWidgetValidator *mValidator;
109 QTabWidget *mTwAdapters;
110
111 QStringList mBrgList;
112 QStringList mIntList;
113 QStringList mHoiList;
114};
115
116#endif // __VBoxVMSettingsNetwork_h__
117
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