VirtualBox

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

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

FE/Qt4: Shifted the advanced network settings from the dialog box to caret expansion on same 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 "QIArrowButtonSwitch.h"
30#include "VBoxVMSettingsNetwork.gen.h"
31
32/* VBox Forwardes */
33class VBoxVMSettingsNetworkPage;
34class QIArrowButtonSwitch;
35
36class VBoxVMSettingsNetwork : public QIWithRetranslateUI <QWidget>,
37 public Ui::VBoxVMSettingsNetwork
38{
39 Q_OBJECT;
40
41public:
42
43 VBoxVMSettingsNetwork (VBoxVMSettingsNetworkPage *aParent);
44
45 void getFromAdapter (const CNetworkAdapter &aAdapter);
46 void putBackToAdapter();
47
48 void setValidator (QIWidgetValidator *aValidator);
49 bool revalidate (QString &aWarning, QString &aTitle);
50
51 QWidget* setOrderAfter (QWidget *aAfter);
52
53 QString pageTitle() const;
54 KNetworkAttachmentType attachmentType() const;
55 QString alternativeName (int aType = -1) const;
56
57protected:
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 QIArrowButtonSwitch *mAbsAdvanced;
76
77 QString mBrgName;
78 QString mIntName;
79 QString mHoiName;
80};
81
82class VBoxVMSettingsNetworkPage : public VBoxSettingsPage
83{
84 Q_OBJECT;
85
86public:
87
88 VBoxVMSettingsNetworkPage();
89
90 QStringList brgList (bool aRefresh = false);
91 QStringList intList (bool aRefresh = false);
92 QStringList hoiList (bool aRefresh = false);
93
94protected:
95
96 void getFrom (const CMachine &aMachine);
97 void putBackTo();
98
99 void setValidator (QIWidgetValidator *aValidator);
100 bool revalidate (QString &aWarning, QString &aTitle);
101
102 void retranslateUi();
103
104private slots:
105
106 void updatePages();
107
108private:
109
110 QIWidgetValidator *mValidator;
111 QTabWidget *mTwAdapters;
112
113 QStringList mBrgList;
114 QStringList mIntList;
115 QStringList mHoiList;
116};
117
118#endif // __VBoxVMSettingsNetwork_h__
119
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