summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings/mainwindowimp.cpp7
-rw-r--r--noncore/settings/networksettings/mainwindowimp.h4
2 files changed, 3 insertions, 8 deletions
diff --git a/noncore/settings/networksettings/mainwindowimp.cpp b/noncore/settings/networksettings/mainwindowimp.cpp
index 581b7e3..da21c05 100644
--- a/noncore/settings/networksettings/mainwindowimp.cpp
+++ b/noncore/settings/networksettings/mainwindowimp.cpp
@@ -10,25 +10,24 @@
10#include <qlineedit.h> 10#include <qlineedit.h>
11#include <qlistview.h> 11#include <qlistview.h>
12#include <qheader.h> 12#include <qheader.h>
13#include <qlabel.h> 13#include <qlabel.h>
14 14
15#include <qmessagebox.h> 15#include <qmessagebox.h>
16 16
17#ifdef QWS 17#ifdef QWS
18 #include <qpe/config.h> 18 #include <qpe/config.h>
19 #include <qpe/qlibrary.h> 19 #include <qpe/qlibrary.h>
20 #include <qpe/resource.h> 20 #include <qpe/resource.h>
21 #include <qpe/qpeapplication.h> 21 #include <qpe/qpeapplication.h>
22// #define QLibrary Library
23#else 22#else
24 #include <klibloader.h> 23 #include <klibloader.h>
25 #define QLibrary KLibrary 24 #define QLibrary KLibrary
26 #include <kconfig.h> 25 #include <kconfig.h>
27 #define Config KConfig 26 #define Config KConfig
28 #include <kapplication.h> 27 #include <kapplication.h>
29 #include <kstandarddirs.h> 28 #include <kstandarddirs.h>
30 #include <kiconloader.h> 29 #include <kiconloader.h>
31 #define showMaximized show 30 #define showMaximized show
32#endif 31#endif
33 32
34#if QT_VERSION < 300 33#if QT_VERSION < 300
@@ -373,25 +372,25 @@ void MainWindowImp::configureClicked(){
373 return; 372 return;
374 } 373 }
375 374
376 Interface *i = interfaceItems[item]; 375 Interface *i = interfaceItems[item];
377 if(i->getModuleOwner()){ 376 if(i->getModuleOwner()){
378 QWidget *moduleConfigure = i->getModuleOwner()->configure(i); 377 QWidget *moduleConfigure = i->getModuleOwner()->configure(i);
379 if(moduleConfigure != NULL){ 378 if(moduleConfigure != NULL){
380 moduleConfigure->showMaximized(); 379 moduleConfigure->showMaximized();
381 return; 380 return;
382 } 381 }
383 } 382 }
384 383
385 InterfaceSetupImpDialog *configure = new InterfaceSetupImpDialog(this, "InterfaceSetupImp", i, true, Qt::WType_Modal | Qt::WDestructiveClose | Qt::WStyle_Dialog); 384 InterfaceSetupImpDialog *configure = new InterfaceSetupImpDialog(this, "InterfaceSetupImp", i, true, Qt::WDestructiveClose );
386 QString currentProfileText = currentProfileLabel->text(); 385 QString currentProfileText = currentProfileLabel->text();
387 if(currentProfileText.upper() == "ALL"); 386 if(currentProfileText.upper() == "ALL");
388 currentProfileText = ""; 387 currentProfileText = "";
389 configure->setProfile(currentProfileText); 388 configure->setProfile(currentProfileText);
390 configure->showMaximized(); 389 configure->showMaximized();
391} 390}
392 391
393/** 392/**
394 * Pull up the information about the currently selected interface. 393 * Pull up the information about the currently selected interface.
395 * Report an error if no interface is selected. 394 * Report an error if no interface is selected.
396 * If the interface has a module owner then request its configure. 395 * If the interface has a module owner then request its configure.
397 */ 396 */
@@ -409,25 +408,25 @@ void MainWindowImp::informationClicked(){
409 } 408 }
410 409
411 if(i->getModuleOwner()){ 410 if(i->getModuleOwner()){
412 QWidget *moduleInformation = i->getModuleOwner()->information(i); 411 QWidget *moduleInformation = i->getModuleOwner()->information(i);
413 if(moduleInformation != NULL){ 412 if(moduleInformation != NULL){
414 moduleInformation->showMaximized(); 413 moduleInformation->showMaximized();
415#ifdef DEBUG 414#ifdef DEBUG
416 qDebug("MainWindowImp::informationClicked:: Module owner has created, we showed."); 415 qDebug("MainWindowImp::informationClicked:: Module owner has created, we showed.");
417#endif 416#endif
418 return; 417 return;
419 } 418 }
420 } 419 }
421 InterfaceInformationImp *information = new InterfaceInformationImp(this, "InterfaceSetupImp", i, Qt::WType_Modal | Qt::WDestructiveClose | Qt::WStyle_Dialog); 420 InterfaceInformationImp *information = new InterfaceInformationImp(this, "InterfaceSetupImp", i, Qt::WType_Modal | Qt::WDestructiveClose | Qt::WType_Dialog);
422 information->showMaximized(); 421 information->showMaximized();
423} 422}
424 423
425/** 424/**
426 * Update this interface. If no QListViewItem exists create one. 425 * Update this interface. If no QListViewItem exists create one.
427 * @param Interface* pointer to the interface that needs to be updated. 426 * @param Interface* pointer to the interface that needs to be updated.
428 */ 427 */
429void MainWindowImp::updateInterface(Interface *i){ 428void MainWindowImp::updateInterface(Interface *i){
430 if(!advancedUserMode){ 429 if(!advancedUserMode){
431 if(i->getInterfaceName() == "lo") 430 if(i->getInterfaceName() == "lo")
432 return; 431 return;
433 } 432 }
@@ -577,14 +576,12 @@ void MainWindowImp::changeProfile(){
577 if(QMessageBox::information(this, "Question","Restart all running interfaces?", QMessageBox::Ok, QMessageBox::No) == QMessageBox::Ok){ 576 if(QMessageBox::information(this, "Question","Restart all running interfaces?", QMessageBox::Ok, QMessageBox::No) == QMessageBox::Ok){
578 // Go through them one by one 577 // Go through them one by one
579 QMap<Interface*, QListViewItem*>::Iterator it; 578 QMap<Interface*, QListViewItem*>::Iterator it;
580 for( it = items.begin(); it != items.end(); ++it ){ 579 for( it = items.begin(); it != items.end(); ++it ){
581 if(it.key()->getStatus() == true) 580 if(it.key()->getStatus() == true)
582 it.key()->restart(); 581 it.key()->restart();
583 } 582 }
584 } 583 }
585 } 584 }
586 // TODO change the profile in the modules 585 // TODO change the profile in the modules
587} 586}
588 587
589// mainwindowimp.cpp
590
diff --git a/noncore/settings/networksettings/mainwindowimp.h b/noncore/settings/networksettings/mainwindowimp.h
index 49f3eea..c045fe6 100644
--- a/noncore/settings/networksettings/mainwindowimp.h
+++ b/noncore/settings/networksettings/mainwindowimp.h
@@ -54,16 +54,14 @@ private:
54 QMap<QListViewItem*, Interface*> interfaceItems; 54 QMap<QListViewItem*, Interface*> interfaceItems;
55 55
56 QMap<KProcess*, QString> threads; 56 QMap<KProcess*, QString> threads;
57 QStringList profiles; 57 QStringList profiles;
58 58
59 bool advancedUserMode; 59 bool advancedUserMode;
60 QString scheme; 60 QString scheme;
61#ifndef QWS 61#ifndef QWS
62 KLibLoader *loader; 62 KLibLoader *loader;
63#endif 63#endif
64}; 64};
65 65
66#endif 66#endif // MAINWINOWIMP_H
67
68// mainwindowimp.h
69 67