summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings/mainwindowimp.cpp
Unidiff
Diffstat (limited to 'noncore/settings/networksettings/mainwindowimp.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/networksettings/mainwindowimp.cpp28
1 files changed, 7 insertions, 21 deletions
diff --git a/noncore/settings/networksettings/mainwindowimp.cpp b/noncore/settings/networksettings/mainwindowimp.cpp
index f9ca83b..b9fff56 100644
--- a/noncore/settings/networksettings/mainwindowimp.cpp
+++ b/noncore/settings/networksettings/mainwindowimp.cpp
@@ -9,7 +9,6 @@
9#include "kprocess.h" 9#include "kprocess.h"
10 10
11#include <qpushbutton.h> 11#include <qpushbutton.h>
12#include <qtabwidget.h>
13#include <qlistbox.h> 12#include <qlistbox.h>
14#include <qlineedit.h> 13#include <qlineedit.h>
15#include <qlistview.h> 14#include <qlistview.h>
@@ -95,6 +94,7 @@ MainWindowImp::~MainWindowImp(){
95 for( it = libraries.begin(); it != libraries.end(); ++it ){ 94 for( it = libraries.begin(); it != libraries.end(); ++it ){
96 delete it.key(); 95 delete it.key();
97 // I wonder why I can't delete the libraries 96 // I wonder why I can't delete the libraries
97 // What fucking shit this is.
98 //delete it.data(); 98 //delete it.data();
99 } 99 }
100} 100}
@@ -221,8 +221,7 @@ void MainWindowImp::removeClicked(){
221/** 221/**
222 * Pull up the configure about the currently selected interface. 222 * Pull up the configure about the currently selected interface.
223 * Report an error if no interface is selected. 223 * Report an error if no interface is selected.
224 * If the interface has a module owner then request its configure with a empty 224 * If the interface has a module owner then request its configure.
225 * tab. If tab is !NULL then append the interfaces setup widget to it.
226 */ 225 */
227void MainWindowImp::configureClicked(){ 226void MainWindowImp::configureClicked(){
228 QListViewItem *item = connectionList->currentItem(); 227 QListViewItem *item = connectionList->currentItem();
@@ -239,22 +238,16 @@ void MainWindowImp::configureClicked(){
239 Interface *i = interfaceItems[item]; 238 Interface *i = interfaceItems[item];
240 if(i->getModuleOwner()){ 239 if(i->getModuleOwner()){
241 i->getModuleOwner()->setProfile(currentProfile); 240 i->getModuleOwner()->setProfile(currentProfile);
242 QTabWidget *tabWidget = NULL; 241 QWidget *moduleConfigure = i->getModuleOwner()->configure(i);
243 QWidget *moduleConfigure = i->getModuleOwner()->configure(i, &tabWidget);
244 if(moduleConfigure != NULL){ 242 if(moduleConfigure != NULL){
245 if(tabWidget != NULL){
246 InterfaceSetupImp *configure = new InterfaceSetupImp(tabWidget, "InterfaceSetupImp", i, false, Qt::WDestructiveClose);
247 configure->setProfile(currentProfile);
248 tabWidget->insertTab(configure, "TCP/IP");
249 }
250 moduleConfigure->showMaximized(); 243 moduleConfigure->showMaximized();
251 moduleConfigure->show(); 244 moduleConfigure->show();
252 return; 245 return;
253 } 246 }
254 } 247 }
255 248
256 InterfaceSetupImp *configure = new InterfaceSetupImp(0, "InterfaceSetupImp", i, false, Qt::WDestructiveClose); 249 InterfaceSetupImpDialog *configure = new InterfaceSetupImpDialog(0, "InterfaceSetupImp", i, true, Qt::WDestructiveClose);
257 configure->setProfile(currentProfile); 250 //configure->setProfile(currentProfile);
258 configure->showMaximized(); 251 configure->showMaximized();
259 configure->show(); 252 configure->show();
260} 253}
@@ -262,8 +255,7 @@ void MainWindowImp::configureClicked(){
262/** 255/**
263 * Pull up the information about the currently selected interface. 256 * Pull up the information about the currently selected interface.
264 * Report an error if no interface is selected. 257 * Report an error if no interface is selected.
265 * If the interface has a module owner then request its configure with a empty 258 * If the interface has a module owner then request its configure.
266 * tab. If tab is !NULL then append the interfaces setup widget to it.
267 */ 259 */
268void MainWindowImp::informationClicked(){ 260void MainWindowImp::informationClicked(){
269 QListViewItem *item = connectionList->currentItem(); 261 QListViewItem *item = connectionList->currentItem();
@@ -284,19 +276,13 @@ void MainWindowImp::informationClicked(){
284 } 276 }
285 277
286 if(i->getModuleOwner()){ 278 if(i->getModuleOwner()){
287 QTabWidget *tabWidget = NULL; 279 QWidget *moduleInformation = i->getModuleOwner()->information(i);
288 QWidget *moduleInformation = i->getModuleOwner()->information(i, &tabWidget);
289 if(moduleInformation != NULL){ 280 if(moduleInformation != NULL){
290 if(tabWidget != NULL){
291 InterfaceInformationImp *information = new InterfaceInformationImp(tabWidget, "InterfaceSetupImp", i, true);
292 tabWidget->insertTab(information, "TCP/IP");
293 }
294 moduleInformation->showMaximized(); 281 moduleInformation->showMaximized();
295 moduleInformation->show(); 282 moduleInformation->show();
296 return; 283 return;
297 } 284 }
298 } 285 }
299
300 InterfaceInformationImp *information = new InterfaceInformationImp(0, "InterfaceSetupImp", i, true); 286 InterfaceInformationImp *information = new InterfaceInformationImp(0, "InterfaceSetupImp", i, true);
301 information->showMaximized(); 287 information->showMaximized();
302 information->show(); 288 information->show();