Diffstat (limited to 'noncore/settings/networksettings2/networksettings.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings2/networksettings.cpp | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/noncore/settings/networksettings2/networksettings.cpp b/noncore/settings/networksettings2/networksettings.cpp index 78b6cce..80dcb3d 100644 --- a/noncore/settings/networksettings2/networksettings.cpp +++ b/noncore/settings/networksettings2/networksettings.cpp @@ -65,8 +65,8 @@ NetworkSettings::NetworkSettings( QWidget *parent, this, SLOT(SLOT_EditNode(QListBoxItem*)) ); - { Name2Connection_t & M = NSResources->connections(); - NodeCollection * NC; - // for all connections - for( QDictIterator<NodeCollection> it(M); + { Name2NetworkSetup_t & M = NSResources->networkSetups(); + NetworkSetup * NC; + // for all NetworkSetups + for( QDictIterator<NetworkSetup> it(M); it.current(); ++it ) { @@ -82,5 +82,5 @@ NetworkSettings::NetworkSettings( QWidget *parent, // if no profiles -> auto popup editing - if( NSResources->connections().count() == 0 ) { + if( NSResources->networkSetups().count() == 0 ) { QTimer::singleShot( 100, this, SLOT(SLOT_AddNode() ) ); } @@ -137,8 +137,8 @@ void NetworkSettings::SLOT_RefreshStates( void ) { if( LBI ) { - NodeCollection * NC; + NetworkSetup * NC; NSResources->system().probeInterfaces(); // update current selection only - NC = NSResources->findConnection( LBI->text() ); + NC = NSResources->findNetworkSetup( LBI->text() ); if( NC ) { State_t OldS = NC->state(); @@ -153,8 +153,8 @@ void NetworkSettings::SLOT_RefreshStates( void ) { /* -> LATER !! bool is; - NodeCollection * NC; + NetworkSetup * NC; for( unsigned int i = 0; i < Profiles_LB->count() ; i ++ ) { - NC = NSResources->findConnection( Profiles_LB->text(i) ); + NC = NSResources->findNetworkSetup( Profiles_LB->text(i) ); if( NC ) { State_t OldS = NC->state(); @@ -191,5 +191,5 @@ void NetworkSettings::SLOT_DeleteNode( void ) { tr( "Remove selected profile ?" ), 1, 0 ) == 1 ) { - NSResources->removeConnection( LBI->text() ); + NSResources->removeNetworkSetup( LBI->text() ); delete LBI; NSD.setModified( 1 ); @@ -200,13 +200,13 @@ void NetworkSettings::SLOT_EditNode( QListBoxItem * LBI ) { QString OldName = ""; - EditConnection EC( this ); + EditNetworkSetup EC( this ); if( LBI ) { - NodeCollection * NC = NSResources->findConnection( LBI->text() ); + NetworkSetup * NC = NSResources->findNetworkSetup( LBI->text() ); if( ! NC ) { return; } OldName = NC->name(); - EC.setConnection( NC ); + EC.setNetworkSetup( NC ); } @@ -219,10 +219,10 @@ void NetworkSettings::SLOT_EditNode( QListBoxItem * LBI ) { if( EC.exec() == QDialog::Accepted ) { // toplevel item -> store - NodeCollection * NC = EC.connection(); + NetworkSetup * NC = EC.networkSetup(); if( NC->isModified() ) { if( LBI ) { if( NC->name() != OldName ) { // find if new name is free - NodeCollection * LCN = NSResources->findConnection( + NetworkSetup * LCN = NSResources->findNetworkSetup( NC->name() ); if( LCN ) { @@ -235,6 +235,6 @@ void NetworkSettings::SLOT_EditNode( QListBoxItem * LBI ) { } // else new name // new name -> remove item - NSResources->removeConnection( OldName ); - NSResources->addConnection( NC, 0 ); + NSResources->removeNetworkSetup( OldName ); + NSResources->addNetworkSetup( NC, 0 ); } // else not changed @@ -247,6 +247,6 @@ void NetworkSettings::SLOT_EditNode( QListBoxItem * LBI ) { // new item int ci = Profiles_LB->count(); - NSResources->addConnection( NC, 0 ); - NC->setNumber( NSResources->assignConnectionNumber() ); + NSResources->addNetworkSetup( NC, 0 ); + NC->setNumber( NSResources->assignNetworkSetupNumber() ); Profiles_LB->insertItem( NC->devicePixmap(), NC->name() ); Profiles_LB->setSelected( ci, TRUE ); @@ -255,7 +255,7 @@ void NetworkSettings::SLOT_EditNode( QListBoxItem * LBI ) { } } else { - // cancelled : reset connection + // cancelled : reset NetworkSetup if( LBI ) { - NodeCollection * NC = NSResources->findConnection( LBI->text() ); + NetworkSetup * NC = NSResources->findNetworkSetup( LBI->text() ); NC->reassign(); } @@ -271,5 +271,5 @@ void NetworkSettings::SLOT_ShowNode( QListBoxItem * LBI ) { return; - NodeCollection * NC = NSResources->findConnection( LBI->text() ); + NetworkSetup * NC = NSResources->findNetworkSetup( LBI->text() ); if( NC->description().isEmpty() ) { @@ -354,5 +354,5 @@ void NetworkSettings::SLOT_Disable( bool T ) { return; - NodeCollection * NC = NSResources->findConnection( LBI->text() ); + NetworkSetup * NC = NSResources->findNetworkSetup( LBI->text() ); Log(( "Prepare to %sable\n", (T) ? "en" : "dis" )); @@ -383,6 +383,6 @@ void NetworkSettings::SLOT_Up( void ) { return; - NodeCollection * NC = - NSResources->findConnection( LBI->text() ); + NetworkSetup * NC = + NSResources->findNetworkSetup( LBI->text() ); switch( NC->state() ) { @@ -439,6 +439,6 @@ void NetworkSettings::SLOT_Down( void ) { return; - NodeCollection * NC = - NSResources->findConnection( LBI->text() ); + NetworkSetup * NC = + NSResources->findNetworkSetup( LBI->text() ); switch( NC->state() ) { |