Diffstat (limited to 'noncore/settings/networksettings2/networksettings2/netnode.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings2/networksettings2/netnode.cpp | 59 |
1 files changed, 34 insertions, 25 deletions
diff --git a/noncore/settings/networksettings2/networksettings2/netnode.cpp b/noncore/settings/networksettings2/networksettings2/netnode.cpp index f00e0b3..0ab0e5b 100644 --- a/noncore/settings/networksettings2/networksettings2/netnode.cpp +++ b/noncore/settings/networksettings2/networksettings2/netnode.cpp @@ -127,3 +127,3 @@ void ANetNodeInstance::saveAttributes( QTextStream & TS ) { ANetNodeInstance * ANetNodeInstance::nextNode( void ) { - return connection()->findNext( this ); + return networkSetup()->findNext( this ); } @@ -136,3 +136,3 @@ ANetNodeInstance * ANetNodeInstance::nextNode( void ) { -NodeCollection::NodeCollection( void ) : QList<ANetNodeInstance>() { +NetworkSetup::NetworkSetup( void ) : QList<ANetNodeInstance>() { IsModified = 0; @@ -147,3 +147,3 @@ NodeCollection::NodeCollection( void ) : QList<ANetNodeInstance>() { -NodeCollection::NodeCollection( QTextStream & TS, bool & Dangling ) : +NetworkSetup::NetworkSetup( QTextStream & TS, bool & Dangling ) : QList<ANetNodeInstance>() { @@ -189,3 +189,3 @@ NodeCollection::NodeCollection( QTextStream & TS, bool & Dangling ) : // could not find a node type -> collection invalid - Log(( "Node %s missing -> connection dangling\n", + Log(( "Node %s missing -> NetworkSetup dangling\n", N.latin1() )); @@ -202,6 +202,6 @@ NodeCollection::NodeCollection( QTextStream & TS, bool & Dangling ) : -NodeCollection::~NodeCollection( void ) { +NetworkSetup::~NetworkSetup( void ) { } -const QString & NodeCollection::description( void ) { +const QString & NetworkSetup::description( void ) { ANetNodeInstance * NNI = getToplevel(); @@ -210,4 +210,4 @@ const QString & NodeCollection::description( void ) { -void NodeCollection::append( ANetNodeInstance * NNI ) { - NNI->setConnection( this ); +void NetworkSetup::append( ANetNodeInstance * NNI ) { + NNI->setNetworkSetup( this ); QList<ANetNodeInstance>::append( NNI ); @@ -215,3 +215,3 @@ void NodeCollection::append( ANetNodeInstance * NNI ) { -void NodeCollection::save( QTextStream & TS ) { +void NetworkSetup::save( QTextStream & TS ) { @@ -230,3 +230,3 @@ void NodeCollection::save( QTextStream & TS ) { -ANetNodeInstance * NodeCollection::getToplevel( void ) { +ANetNodeInstance * NetworkSetup::getToplevel( void ) { ANetNodeInstance * NNI = 0; @@ -243,3 +243,3 @@ ANetNodeInstance * NodeCollection::getToplevel( void ) { -ANetNodeInstance * NodeCollection::findByName( const QString & S ) { +ANetNodeInstance * NetworkSetup::findByName( const QString & S ) { ANetNodeInstance * NNI = 0; @@ -256,3 +256,3 @@ ANetNodeInstance * NodeCollection::findByName( const QString & S ) { -ANetNodeInstance * NodeCollection::findNext( ANetNodeInstance * NNI ) { +ANetNodeInstance * NetworkSetup::findNext( ANetNodeInstance * NNI ) { ANetNodeInstance * NNNI; @@ -274,3 +274,3 @@ ANetNodeInstance * NodeCollection::findNext( ANetNodeInstance * NNI ) { -int NodeCollection::compareItems( QCollection::Item I1, +int NetworkSetup::compareItems( QCollection::Item I1, QCollection::Item I2 ) { @@ -292,3 +292,3 @@ static char * State2PixmapTbl[] = { -QPixmap NodeCollection::devicePixmap( void ) { +QPixmap NetworkSetup::devicePixmap( void ) { QPixmap pm = NSResources->getPixmap( @@ -310,3 +310,3 @@ QPixmap NodeCollection::devicePixmap( void ) { -QPixmap NodeCollection::statePixmap( State_t S) { +QPixmap NetworkSetup::statePixmap( State_t S) { return NSResources->getPixmap( State2PixmapTbl[S] ); @@ -314,3 +314,3 @@ QPixmap NodeCollection::statePixmap( State_t S) { -QString NodeCollection::stateName( State_t S) { +QString NetworkSetup::stateName( State_t S) { switch( S ) { @@ -335,3 +335,3 @@ QString NodeCollection::stateName( State_t S) { -void NodeCollection::reassign( void ) { +void NetworkSetup::reassign( void ) { for( QListIterator<ANetNodeInstance> it(*this); @@ -339,3 +339,3 @@ void NodeCollection::reassign( void ) { ++it ) { - it.current()->setConnection( this ); + it.current()->setNetworkSetup( this ); } @@ -343,3 +343,3 @@ void NodeCollection::reassign( void ) { -const QStringList & NodeCollection::triggers() { +const QStringList & NetworkSetup::triggers() { return getToplevel()->runtime()->triggers(); @@ -347,3 +347,3 @@ const QStringList & NodeCollection::triggers() { -bool NodeCollection::hasDataForFile( SystemFile & S ) { +bool NetworkSetup::hasDataForFile( SystemFile & S ) { return ( firstWithDataForFile( S ) != 0 ); @@ -351,3 +351,3 @@ bool NodeCollection::hasDataForFile( SystemFile & S ) { -ANetNodeInstance * NodeCollection::firstWithDataForFile( SystemFile & S ) { +ANetNodeInstance * NetworkSetup::firstWithDataForFile( SystemFile & S ) { for( QListIterator<ANetNodeInstance> it(*this); @@ -362,3 +362,3 @@ ANetNodeInstance * NodeCollection::firstWithDataForFile( SystemFile & S ) { -State_t NodeCollection::state( bool Update ) { +State_t NetworkSetup::state( bool Update ) { State_t NodeState; @@ -369,3 +369,3 @@ State_t NodeCollection::state( bool Update ) { - Log(( "Connection %s state %s\n", + Log(( "NetworkSetup %s state %s\n", Name.latin1(), StateName[CurrentState] )); @@ -397,3 +397,3 @@ State_t NodeCollection::state( bool Update ) { -QString NodeCollection::setState( Action_t A, bool Force ) { +QString NetworkSetup::setState( Action_t A, bool Force ) { @@ -494,2 +494,11 @@ QString NodeCollection::setState( Action_t A, bool Force ) { +void NetworkSetup::copyFrom( const NetworkSetup & N ) { + Number = N.Number; + CurrentState = N.CurrentState; + Name = N.Name; + IsNew = N.IsNew; + Index = N.Index; + AssignedInterface = N.AssignedInterface; +} + // @@ -500,3 +509,3 @@ QString NodeCollection::setState( Action_t A, bool Force ) { -QString RuntimeInfo::setState( NodeCollection * NC, +QString RuntimeInfo::setState( NetworkSetup * NC, Action_t A, |