Diffstat (limited to 'noncore/settings/networksettings2/editconnection.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings2/editconnection.cpp | 54 |
1 files changed, 28 insertions, 26 deletions
diff --git a/noncore/settings/networksettings2/editconnection.cpp b/noncore/settings/networksettings2/editconnection.cpp index 717d9e9..6ab2dd6 100644 --- a/noncore/settings/networksettings2/editconnection.cpp +++ b/noncore/settings/networksettings2/editconnection.cpp @@ -86,8 +86,8 @@ void MyQListViewItem::paintCell( QPainter *p, const QColorGroup &cg, // -bool EditConnection::AutoCollapse = 1; +bool EditNetworkSetup::AutoCollapse = 1; -EditConnection::EditConnection( QWidget* parent ) : - EditConnectionGUI( parent, 0, TRUE ), TmpCollection() { +EditNetworkSetup::EditNetworkSetup( QWidget* parent ) : + EditNetworkSetupGUI( parent, 0, TRUE ), TmpCollection() { Tab_TB->setTabEnabled( Setup_FRM, FALSE ); @@ -106,5 +106,5 @@ EditConnection::EditConnection( QWidget* parent ) : } -NodeCollection * EditConnection::getTmpCollection( void ) { +NetworkSetup * EditNetworkSetup::getTmpCollection( void ) { if( TmpIsValid ) @@ -120,5 +120,7 @@ NodeCollection * EditConnection::getTmpCollection( void ) { } } + TmpCollection.clear(); + TmpCollection.copyFrom( *SelectedNodes ); // update content @@ -194,6 +196,6 @@ NodeCollection * EditConnection::getTmpCollection( void ) { } -// pass a connection NodeCollection to be edited -void EditConnection::setConnection( NodeCollection * NC ) { +// pass a NetworkSetup NetworkSetup to be edited +void EditNetworkSetup::setNetworkSetup( NetworkSetup * NC ) { ANetNodeInstance * NNI; ANetNode * NN; @@ -244,6 +246,6 @@ void EditConnection::setConnection( NodeCollection * NC ) { QMessageBox::warning( 0, - tr( "Error presentig Connection" ), - tr( "<p>Old connection or missing plugin \"<i>%1</i>\"</p>" ). + tr( "Error presentig NetworkSetup" ), + tr( "<p>Old NetworkSetup or missing plugin \"<i>%1</i>\"</p>" ). arg(NNI->nodeClass()->name()) ); return; @@ -259,12 +261,12 @@ void EditConnection::setConnection( NodeCollection * NC ) { QMessageBox::warning( 0, - tr( "Error presentig Connection" ), - tr( "<p>Old connection or missing plugin \"<i>%1</i>\"</p>" ). + tr( "Error presentig NetworkSetup" ), + tr( "<p>Old NetworkSetup or missing plugin \"<i>%1</i>\"</p>" ). arg(NNI->nodeClass()->name()) ); } else { QMessageBox::warning( 0, - tr( "Error presentig Connection" ), - tr( "<p>Missing connection\"<i>%1</i>\"</p>" ). + tr( "Error presentig NetworkSetup" ), + tr( "<p>Missing NetworkSetup\"<i>%1</i>\"</p>" ). arg(it->text(0)) ); } @@ -277,9 +279,9 @@ void EditConnection::setConnection( NodeCollection * NC ) { // get result of editing (either new OR updated collection -NodeCollection * EditConnection::connection( void ) { +NetworkSetup * EditNetworkSetup::networkSetup( void ) { if( SelectedNodes == 0 ) { // new collection - SelectedNodes = new NodeCollection; + SelectedNodes = new NetworkSetup; } @@ -306,5 +308,5 @@ NodeCollection * EditConnection::connection( void ) { // Build device tree -> start -void EditConnection::buildFullTree( void ) { +void EditNetworkSetup::buildFullTree( void ) { ANetNode * NN; @@ -320,5 +322,5 @@ void EditConnection::buildFullTree( void ) { // find all Nodes that are toplevel nodes -> ie provide - // TCP/IP Connection + // TCP/IP NetworkSetup for( QDictIterator<ANetNode> Iter(NSResources->netNodes()); Iter.current(); @@ -343,5 +345,5 @@ void EditConnection::buildFullTree( void ) { // Build device tree -> help function -void EditConnection::buildSubTree( QListViewItem * it, ANetNode *NN ) { +void EditNetworkSetup::buildSubTree( QListViewItem * it, ANetNode *NN ) { ANetNode::NetNodeList & NNL = NN->alternatives(); @@ -379,9 +381,9 @@ void EditConnection::buildSubTree( QListViewItem * it, ANetNode *NN ) { // Clicked ok OK button -void EditConnection::accept( void ) { +void EditNetworkSetup::accept( void ) { if( ! haveCompleteConfig( 0 ) || Name_LE->text().isEmpty() ) { QMessageBox::warning( 0, - tr( "Closing Connection Setup" ), + tr( "Closing NetworkSetup Setup" ), tr( "Definition not complete or no name" ) ); return; @@ -419,10 +421,10 @@ void EditConnection::accept( void ) { // triggered by CB -void EditConnection::SLOT_AutoCollapse( bool b ) { +void EditNetworkSetup::SLOT_AutoCollapse( bool b ) { AutoCollapse = b; } // clicked on node in tree -> update GUI -void EditConnection::SLOT_SelectNode( QListViewItem * it ) { +void EditNetworkSetup::SLOT_SelectNode( QListViewItem * it ) { ANetNode * NN; if( it == 0 || it->depth() == 0 ) { @@ -466,5 +468,5 @@ void EditConnection::SLOT_SelectNode( QListViewItem * it ) { // cliecked on TAB to go to setup -void EditConnection::SLOT_AlterTab( const QString & S ) { +void EditNetworkSetup::SLOT_AlterTab( const QString & S ) { if( S == tr( "Setup" ) && Setup_FRM->isEnabled() ) { // switched to setup -> update CB and populate ws with @@ -515,5 +517,5 @@ void EditConnection::SLOT_AlterTab( const QString & S ) { // update visual feedback of selection state -void EditConnection::updateGUI( QListViewItem * it, ANetNode * NN ) { +void EditNetworkSetup::updateGUI( QListViewItem * it, ANetNode * NN ) { bool HCC = haveCompleteConfig( it ); @@ -541,5 +543,5 @@ void EditConnection::updateGUI( QListViewItem * it, ANetNode * NN ) { } -void EditConnection::disableTree( QListViewItem * it, bool Mode ) { +void EditNetworkSetup::disableTree( QListViewItem * it, bool Mode ) { while( it ) { // disable sbl's chidren @@ -553,5 +555,5 @@ void EditConnection::disableTree( QListViewItem * it, bool Mode ) { // pah : ParentHasAlternatives -void EditConnection::enablePath( QListViewItem * it, bool pha ) { +void EditNetworkSetup::enablePath( QListViewItem * it, bool pha ) { while( it ) { ANetNode * NN; @@ -590,5 +592,5 @@ void EditConnection::enablePath( QListViewItem * it, bool pha ) { // do we have a complete configuration (all needs are provided for ?) -bool EditConnection::haveCompleteConfig( QListViewItem * it ) { +bool EditNetworkSetup::haveCompleteConfig( QListViewItem * it ) { // check if all below this level is selected |