VBoxVMSettingsNetworkDetails.cpp revision 4dc6f02271e124b7765cb35facd736a0a140c367
/** @file
*
* VBox frontends: Qt4 GUI ("VirtualBox"):
* VBoxVMSettingsNetworkDetails class implementation
*/
/*
* Copyright (C) 2009 Sun Microsystems, Inc.
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
* Clara, CA 95054 USA or visit http://www.sun.com if you need
* additional information or have any questions.
*/
/* VBox Includes */
#include "VBoxGlobal.h"
#include "VBoxProblemReporter.h"
#include "VBoxVMSettingsNetwork.h"
#include "VBoxVMSettingsNetworkDetails.h"
/* Qt Includes */
#include <QHostAddress>
/* Empty item extra-code */
const char *emptyItemCode = "#empty#";
/* VBoxVMSettingsNetwork Stuff */
#ifdef Q_WS_MAC
#endif /* Q_WS_MAC */
)
{
/* Apply UI decorations */
/* Setup alternative widgets */
/* Setup common widgets */
(QRegExp ("[0-9A-Fa-f][02468ACEace][0-9A-Fa-f]{10}"), this));
sof.midLineWidth = 0;
#if defined (Q_WS_MAC)
/* Remove tool-button border at MAC */
#endif /* Q_WS_MAC */
}
{
/* Load alternate settings */
/* Load common settings */
}
{
/* Save alternative settings */
switch (mType)
{
break;
break;
break;
default:
break;
}
/* Save common settings */
}
const QStringList &aList)
{
/* Setup visibility for alternate widgets */
/* Repopulate alternate combo-box with items */
if (mType != KNetworkAttachmentType_Null &&
{
}
/* Load common settings */
/* Applying language settings */
}
{
switch (aType)
{
{
return false;
}
break;
{
return false;
}
break;
{
return false;
}
break;
default:
break;
}
return true;
}
{
if (aType == KNetworkAttachmentType_Null)
switch (aType)
{
break;
break;
break;
default:
break;
}
}
{
/* Translate uic generated strings */
/* Translate window title */
switch (mType)
{
break;
break;
break;
break;
}
/* Translate empty items */
}
{
/* Update full layout system of message window */
{
}
qApp->processEvents();
/* Now resize window to minimum possible size */
resize (minimumSizeHint());
qApp->processEvents();
/* Centering widget */
}
void VBoxVMSettingsNetworkDetails::accept()
{
/* Save temporary attributes as dynamic properties */
switch (mType)
{
setProperty ("BRG_Name",
break;
setProperty ("INT_Name",
break;
setProperty ("HOI_Name",
break;
default:
break;
}
}
{
}
{
{ /* Bridged adapters combo-box */
if (pos == -1)
mCbBRG->insertItem (0,
else
} /* Bridged adapters combo-box */
{ /* Internal networks combo-box */
if (pos == -1)
mCbINT->insertItem (0,
else
} /* Internal networks combo-box */
{ /* Host-only adapters combo-box */
if (pos == -1)
mCbHOI->insertItem (0,
else
} /* Host-only adapters combo-box */
}
{
switch (mType)
{
return mCbBRG;
return mCbINT;
return mCbHOI;
default:
break;
}
return 0;
}