Diffstat (limited to 'noncore/settings/networksettings2/lancard/lancard_NN.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/networksettings2/lancard/lancard_NN.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/noncore/settings/networksettings2/lancard/lancard_NN.cpp b/noncore/settings/networksettings2/lancard/lancard_NN.cpp index ba1c1f8..a4afab1 100644 --- a/noncore/settings/networksettings2/lancard/lancard_NN.cpp +++ b/noncore/settings/networksettings2/lancard/lancard_NN.cpp @@ -2,17 +2,17 @@ #include "lancard_NNI.h" static const char * LanCardNeeds[] = { 0 }; /** * Constructor, find all of the possible interfaces */ -LanCardNetNode::LanCardNetNode() : ANetNode() { +LanCardNetNode::LanCardNetNode() : ANetNode(tr("LAN card")), NICMACAddresses() { InstanceCount = 2; } /** * Delete any interfaces that we own. */ LanCardNetNode::~LanCardNetNode(){ } @@ -64,22 +64,31 @@ bool LanCardNetNode::generateDeviceDataForCommonFile( QString LanCardNetNode::genNic( long nr ) { QString S; return S.sprintf( "eth%ld", nr ); } void LanCardNetNode::setSpecificAttribute( QString & A, QString & V ) { if( A == "interfacecount" ) { InstanceCount = V.toLong(); + } else if ( A == "macaddress" ) { + NICMACAddresses.append( V ); } } void LanCardNetNode::saveSpecificAttribute( QTextStream & TS) { TS << "interfacecount=" << InstanceCount << endl; + for( QStringList::Iterator it = NICMACAddresses.begin(); + it != NICMACAddresses.end(); + ++it ) { + TS << "macaddress=" + << (*it) + << endl; + } } extern "C" { void create_plugin( QList<ANetNode> & PNN ) { PNN.append( new LanCardNetNode() ); } } |