summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/lancard/lancard_NN.cpp
Unidiff
Diffstat (limited to 'noncore/settings/networksettings2/lancard/lancard_NN.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings2/lancard/lancard_NN.cpp11
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
@@ -6,9 +6,9 @@ static const char * LanCardNeeds[] =
6 6
7/** 7/**
8 * Constructor, find all of the possible interfaces 8 * Constructor, find all of the possible interfaces
9 */ 9 */
10LanCardNetNode::LanCardNetNode() : ANetNode() { 10LanCardNetNode::LanCardNetNode() : ANetNode(tr("LAN card")), NICMACAddresses() {
11 InstanceCount = 2; 11 InstanceCount = 2;
12} 12}
13 13
14/** 14/**
@@ -68,15 +68,24 @@ QString LanCardNetNode::genNic( long nr ) {
68 68
69void LanCardNetNode::setSpecificAttribute( QString & A, QString & V ) { 69void LanCardNetNode::setSpecificAttribute( QString & A, QString & V ) {
70 if( A == "interfacecount" ) { 70 if( A == "interfacecount" ) {
71 InstanceCount = V.toLong(); 71 InstanceCount = V.toLong();
72 } else if ( A == "macaddress" ) {
73 NICMACAddresses.append( V );
72 } 74 }
73} 75}
74 76
75void LanCardNetNode::saveSpecificAttribute( QTextStream & TS) { 77void LanCardNetNode::saveSpecificAttribute( QTextStream & TS) {
76 TS << "interfacecount=" 78 TS << "interfacecount="
77 << InstanceCount 79 << InstanceCount
78 << endl; 80 << endl;
81 for( QStringList::Iterator it = NICMACAddresses.begin();
82 it != NICMACAddresses.end();
83 ++it ) {
84 TS << "macaddress="
85 << (*it)
86 << endl;
87 }
79} 88}
80 89
81extern "C" { 90extern "C" {
82void create_plugin( QList<ANetNode> & PNN ) { 91void create_plugin( QList<ANetNode> & PNN ) {