Diffstat (limited to 'noncore/net/networksetup/mainwindowimp.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/networksetup/mainwindowimp.cpp | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/noncore/net/networksetup/mainwindowimp.cpp b/noncore/net/networksetup/mainwindowimp.cpp index f9ca83b..b9fff56 100644 --- a/noncore/net/networksetup/mainwindowimp.cpp +++ b/noncore/net/networksetup/mainwindowimp.cpp @@ -6,13 +6,12 @@ #include "module.h"
#include "kprocess.h"
#include <qpushbutton.h>
-#include <qtabwidget.h>
#include <qlistbox.h>
#include <qlineedit.h>
#include <qlistview.h>
#include <qheader.h>
#include <qlabel.h>
@@ -92,12 +91,13 @@ MainWindowImp::~MainWindowImp(){ // Delete Modules and Libraries
QMap<Module*, QLibrary*>::Iterator it;
for( it = libraries.begin(); it != libraries.end(); ++it ){
delete it.key();
// I wonder why I can't delete the libraries
+ // What fucking shit this is.
//delete it.data();
}
}
/**
* Load all modules that are found in the path
@@ -218,14 +218,13 @@ void MainWindowImp::removeClicked(){ }
}
/**
* Pull up the configure about the currently selected interface.
* Report an error if no interface is selected.
- * If the interface has a module owner then request its configure with a empty
- * tab. If tab is !NULL then append the interfaces setup widget to it.
+ * If the interface has a module owner then request its configure.
*/
void MainWindowImp::configureClicked(){
QListViewItem *item = connectionList->currentItem();
if(!item){
QMessageBox::information(this, "Sorry","Please select an interface first.", QMessageBox::Ok);
return;
@@ -236,37 +235,30 @@ void MainWindowImp::configureClicked(){ currentProfile = "";
}
Interface *i = interfaceItems[item];
if(i->getModuleOwner()){
i->getModuleOwner()->setProfile(currentProfile);
- QTabWidget *tabWidget = NULL;
- QWidget *moduleConfigure = i->getModuleOwner()->configure(i, &tabWidget);
+ QWidget *moduleConfigure = i->getModuleOwner()->configure(i);
if(moduleConfigure != NULL){
- if(tabWidget != NULL){
- InterfaceSetupImp *configure = new InterfaceSetupImp(tabWidget, "InterfaceSetupImp", i, false, Qt::WDestructiveClose);
- configure->setProfile(currentProfile);
- tabWidget->insertTab(configure, "TCP/IP");
- }
moduleConfigure->showMaximized();
moduleConfigure->show();
return;
}
}
- InterfaceSetupImp *configure = new InterfaceSetupImp(0, "InterfaceSetupImp", i, false, Qt::WDestructiveClose);
- configure->setProfile(currentProfile);
+ InterfaceSetupImpDialog *configure = new InterfaceSetupImpDialog(0, "InterfaceSetupImp", i, true, Qt::WDestructiveClose);
+ //configure->setProfile(currentProfile);
configure->showMaximized();
configure->show();
}
/**
* Pull up the information about the currently selected interface.
* Report an error if no interface is selected.
- * If the interface has a module owner then request its configure with a empty
- * tab. If tab is !NULL then append the interfaces setup widget to it.
+ * If the interface has a module owner then request its configure.
*/
void MainWindowImp::informationClicked(){
QListViewItem *item = connectionList->currentItem();
if(!item){
QMessageBox::information(this, "Sorry","Please select an interface First.", QMessageBox::Ok);
return;
@@ -281,25 +273,19 @@ void MainWindowImp::informationClicked(){ QStringList list;
for(uint i = 0; i < profilesList->count(); i++){
list.append(profilesList->text(i));
}
if(i->getModuleOwner()){
- QTabWidget *tabWidget = NULL;
- QWidget *moduleInformation = i->getModuleOwner()->information(i, &tabWidget);
+ QWidget *moduleInformation = i->getModuleOwner()->information(i);
if(moduleInformation != NULL){
- if(tabWidget != NULL){
- InterfaceInformationImp *information = new InterfaceInformationImp(tabWidget, "InterfaceSetupImp", i, true);
- tabWidget->insertTab(information, "TCP/IP");
- }
moduleInformation->showMaximized();
moduleInformation->show();
return;
}
}
-
InterfaceInformationImp *information = new InterfaceInformationImp(0, "InterfaceSetupImp", i, true);
information->showMaximized();
information->show();
}
/**
|