author | wimpie <wimpie> | 2004-04-04 15:23:16 (UTC) |
---|---|---|
committer | wimpie <wimpie> | 2004-04-04 15:23:16 (UTC) |
commit | fd9146de7698a796659b68606429da490f817138 (patch) (side-by-side diff) | |
tree | f026bf2a7adcaaa3a0dd0429e7474f536787253d /noncore/settings/networksettings2/editconnection.cpp | |
parent | 5b52572e2ec9f0f6f39706aceb9ec1e98440fd3d (diff) | |
download | opie-fd9146de7698a796659b68606429da490f817138.zip opie-fd9146de7698a796659b68606429da490f817138.tar.gz opie-fd9146de7698a796659b68606429da490f817138.tar.bz2 |
Many changes
Diffstat (limited to 'noncore/settings/networksettings2/editconnection.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings2/editconnection.cpp | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/noncore/settings/networksettings2/editconnection.cpp b/noncore/settings/networksettings2/editconnection.cpp index ce13573..4bbe502 100644 --- a/noncore/settings/networksettings2/editconnection.cpp +++ b/noncore/settings/networksettings2/editconnection.cpp @@ -101,22 +101,20 @@ NodeCollection * EditConnection::getTmpCollection( void ) { if( TmpIsValid ) // content is stil OK return &(TmpCollection); // reset collection -> delete all NEW NetNodes - { ANetNodeInstance * NNI; - for( QListIterator<ANetNodeInstance> it(TmpCollection); - it.current(); - ++it ) { - if( it.current()->isNew() ) { - delete it.current(); - } + for( QListIterator<ANetNodeInstance> it(TmpCollection); + it.current(); + ++it ) { + if( it.current()->isNew() ) { + delete it.current(); } - TmpCollection.clear(); } + TmpCollection.clear(); // update content QListViewItem * it = Nodes_LV->firstChild(); ANetNode * NN; // start iter ANetNodeInstance * NNI = @@ -132,13 +130,13 @@ NodeCollection * EditConnection::getTmpCollection( void ) { it = it->firstChild(); while( it ) { if( ((QCheckListItem *)it)->isOn() ) { // this radio is selected -> go deeper if( SelectedNodes == 0 || NNI == 0 || - NNI->netNode()->nodeName() != it->text(0) ) { + NNI->nodeClass()->nodeName() != it->text(0) ) { // new item not in previous collection ANetNodeInstance * NNI = (*Mapping)[it]->createInstance(); NNI->initialize(); // this node type not in collection TmpCollection.append( NNI ); // master collection changed because new item in it @@ -195,16 +193,16 @@ void EditConnection::setConnection( NodeCollection * NC ) { // child is controller -> has sub radio QString Ctr = it->text(0); // check if one radio is selected it = it->firstChild(); Found = 0; while( it ) { - if( NNI && NNI->netNode()->nodeName() == it->text(0) ) { + if( NNI && NNI->nodeClass()->nodeName() == it->text(0) ) { // this radio is part of the collection ((QCheckListItem *)it)->setOn( 1 ); - updateGUI( it, NNI->netNode() ); + updateGUI( it, NNI->nodeClass() ); // check its children Found = 1; it = it->firstChild(); NNI = SelectedNodes->next(); // do not bother to check other items break; @@ -237,19 +235,16 @@ NodeCollection * EditConnection::connection( void ) { } // clean out old entries SelectedNodes->clear(); // transfer - { ANetNodeInstance * NNI; - - for( QListIterator<ANetNodeInstance> it(TmpCollection); - it.current(); - ++it ) { - SelectedNodes->append( it.current() ); - } + for( QListIterator<ANetNodeInstance> it(TmpCollection); + it.current(); + ++it ) { + SelectedNodes->append( it.current() ); } if( TmpCollection.isModified() ) SelectedNodes->setModified( 1 ); if( SelectedNodes->name() != Name_LE->text() ) { @@ -445,14 +440,14 @@ void EditConnection::SLOT_AlterTab( const QString & S ) { int i = 0; QWidget * W; for ( ; it.current(); ++it ) { NNI = it.current(); Devices_CB->insertItem( - NSResources->getPixmap( NNI->netNode()->pixmapName() ), - NNI->netNode()->nodeName() + NSResources->getPixmap( NNI->nodeClass()->pixmapName() ), + NNI->nodeClass()->nodeName() ); // add edit widget W = NNI->edit( Setup_WS ); if( ! W) { W = new QLabel( Setup_WS, |