summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/networksettings.cpp
Unidiff
Diffstat (limited to 'noncore/settings/networksettings2/networksettings.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings2/networksettings.cpp28
1 files changed, 27 insertions, 1 deletions
diff --git a/noncore/settings/networksettings2/networksettings.cpp b/noncore/settings/networksettings2/networksettings.cpp
index 3ddcbde..b36c7a0 100644
--- a/noncore/settings/networksettings2/networksettings.cpp
+++ b/noncore/settings/networksettings2/networksettings.cpp
@@ -23,6 +23,7 @@ NetworkSettings::NetworkSettings( QWidget *parent,
23 NSD() { 23 NSD() {
24 24
25 UpdateTimer = new QTimer( this ); 25 UpdateTimer = new QTimer( this );
26
26 // set pixmaps 27 // set pixmaps
27 Add_TB->setPixmap( NSResources->getPixmap( "add" ) ); 28 Add_TB->setPixmap( NSResources->getPixmap( "add" ) );
28 Delete_TB->setPixmap( NSResources->getPixmap( "remove" ) ); 29 Delete_TB->setPixmap( NSResources->getPixmap( "remove" ) );
@@ -31,9 +32,12 @@ NetworkSettings::NetworkSettings( QWidget *parent,
31 GenConfig_TB->setPixmap( NSResources->getPixmap( "configure" ) ); 32 GenConfig_TB->setPixmap( NSResources->getPixmap( "configure" ) );
32 33
33 Connect_TB->setPixmap( NSResources->getPixmap( "connected" ) ); 34 Connect_TB->setPixmap( NSResources->getPixmap( "connected" ) );
35 Disconnect_TB->setPixmap( NSResources->getPixmap( "disconnected" ) );
34 36
35 On_TB->setPixmap( NSResources->getPixmap( "off" ) ); 37 On_TB->setPixmap( NSResources->getPixmap( "off" ) );
36 38
39 SLOT_ToProfile();
40
37 // populate main Listbox 41 // populate main Listbox
38 Profiles_LB->clear(); 42 Profiles_LB->clear();
39 { Name2Connection_t & M = NSResources->connections(); 43 { Name2Connection_t & M = NSResources->connections();
@@ -276,7 +280,7 @@ void NetworkSettings::SLOT_ShowNode( QListBoxItem * LBI ) {
276 Description_LBL->setText( NC->description() ); 280 Description_LBL->setText( NC->description() );
277 } 281 }
278 282
279 CurProfile_GB->setTitle( LBI->text() ); 283 Profile_GB->setTitle( LBI->text() );
280 State_LBL->setText( NC->stateName() ); 284 State_LBL->setText( NC->stateName() );
281} 285}
282 286
@@ -409,6 +413,28 @@ void NetworkSettings::SLOT_Connect( void ) {
409 // we do not update the GUI but wait for the REAL upping of the device 413 // we do not update the GUI but wait for the REAL upping of the device
410} 414}
411 415
416void NetworkSettings::SLOT_Disconnect( void ) {
417 QListBoxItem * LBI = Profiles_LB->item( Profiles_LB->currentItem() );
418
419 if ( ! LBI )
420 return;
421
422 NodeCollection * NC =
423 NSResources->findConnection( LBI->text() );
424
425 NC->setState( Down, 1 );
426}
427
428void NetworkSettings::SLOT_ToMessages( void ) {
429 Profile_GB->hide();
430 Messages_GB->show();
431}
432
433void NetworkSettings::SLOT_ToProfile( void ) {
434 Profile_GB->show();
435 Messages_GB->hide();
436}
437
412void NetworkSettings::SLOT_QCopMessage(const QCString &msg, const QByteArray &data) { 438void NetworkSettings::SLOT_QCopMessage(const QCString &msg, const QByteArray &data) {
413 QDataStream stream( data, IO_ReadOnly ); 439 QDataStream stream( data, IO_ReadOnly );
414 440