author | benmeyer <benmeyer> | 2002-09-30 19:41:41 (UTC) |
---|---|---|
committer | benmeyer <benmeyer> | 2002-09-30 19:41:41 (UTC) |
commit | a0f88d7d0fb0ffaf8d1aa7b753b0d48ee344e34f (patch) (unidiff) | |
tree | 10e1141777f657881af01cab036962c128109ec2 /noncore/net/networksetup/mainwindowimp.cpp | |
parent | d49bd63f3b15795a1ee2497960f00eb3fb075e69 (diff) | |
download | opie-a0f88d7d0fb0ffaf8d1aa7b753b0d48ee344e34f.zip opie-a0f88d7d0fb0ffaf8d1aa7b753b0d48ee344e34f.tar.gz opie-a0f88d7d0fb0ffaf8d1aa7b753b0d48ee344e34f.tar.bz2 |
ui cleanup with groupboxes
Diffstat (limited to 'noncore/net/networksetup/mainwindowimp.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/networksetup/mainwindowimp.cpp | 74 |
1 files changed, 36 insertions, 38 deletions
diff --git a/noncore/net/networksetup/mainwindowimp.cpp b/noncore/net/networksetup/mainwindowimp.cpp index 2f821a9..0f48a4b 100644 --- a/noncore/net/networksetup/mainwindowimp.cpp +++ b/noncore/net/networksetup/mainwindowimp.cpp | |||
@@ -4,3 +4,2 @@ | |||
4 | #include "interfacesetupimp.h" | 4 | #include "interfacesetupimp.h" |
5 | #include "interface.h" | ||
6 | #include "kprocess.h" | 5 | #include "kprocess.h" |
@@ -8,2 +7,3 @@ | |||
8 | 7 | ||
8 | |||
9 | #include <qpushbutton.h> | 9 | #include <qpushbutton.h> |
@@ -33,7 +33,2 @@ | |||
33 | 33 | ||
34 | #define NO_SELECT_ERROR_AND_RETURN { \ | ||
35 | QMessageBox::information(this, "Error","Please select an interface.", "Ok"); \ | ||
36 | return; \ | ||
37 | } | ||
38 | |||
39 | MainWindowImp::MainWindowImp(QWidget *parent, const char *name) : MainWindow(parent, name, true) { | 34 | MainWindowImp::MainWindowImp(QWidget *parent, const char *name) : MainWindow(parent, name, true) { |
@@ -83,2 +78,20 @@ MainWindowImp::~MainWindowImp(){ | |||
83 | void MainWindowImp::loadModules(QString path){ | 78 | void MainWindowImp::loadModules(QString path){ |
79 | qDebug(path.latin1()); | ||
80 | QDir d; | ||
81 | d.setPath(path); | ||
82 | if(!d.exists()){ | ||
83 | qDebug("MainWindowImp:: Path doesn't exists"); | ||
84 | return; | ||
85 | } | ||
86 | d.setFilter( QDir::Files | QDir::NoSymLinks ); | ||
87 | const QFileInfoList *list = d.entryInfoList(); | ||
88 | QFileInfoListIterator it( *list ); | ||
89 | QFileInfo *fi; | ||
90 | while ( (fi=it.current()) ) { | ||
91 | if(fi->fileName().contains(".so")){ | ||
92 | qDebug("Found"); | ||
93 | Module *foo = loadPlugin(path + "/" + fi->fileName()); | ||
94 | } | ||
95 | ++it; | ||
96 | } | ||
84 | } | 97 | } |
@@ -92,3 +105,3 @@ void MainWindowImp::loadModules(QString path){ | |||
92 | Module* MainWindowImp::loadPlugin(QString pluginFileName, QString resolveString){ | 105 | Module* MainWindowImp::loadPlugin(QString pluginFileName, QString resolveString){ |
93 | //qDebug(pluginFileName.latin1()); | 106 | qDebug(pluginFileName.latin1()); |
94 | QLibrary *lib = new QLibrary(pluginFileName); | 107 | QLibrary *lib = new QLibrary(pluginFileName); |
@@ -114,30 +127,2 @@ Module* MainWindowImp::loadPlugin(QString pluginFileName, QString resolveString) | |||
114 | 127 | ||
115 | /* | ||
116 | QList<QString> MainWindowImp::retrieveUnloadedPluginList(){ | ||
117 | QString DirStr = QDir::homeDirPath() + "/.networksetup/" ; | ||
118 | QString path = DirStr + "plugins"; | ||
119 | QDir d(path); | ||
120 | d.setFilter( QDir::Files | QDir::Hidden ); | ||
121 | |||
122 | QMap<QObject*, QLibrary*>::Iterator libraryIt; | ||
123 | QList<QString> rlist; | ||
124 | rlist.setAutoDelete(false); | ||
125 | |||
126 | const QFileInfoList *list = d.entryInfoList(); | ||
127 | QFileInfoListIterator it( *list ); | ||
128 | QFileInfo *fi; | ||
129 | while ( (fi=it.current()) ) { | ||
130 | if(fi->fileName().contains(".so")){ | ||
131 | for( libraryIt = libraries.begin(); libraryIt != libraries.end(); ++libraryIt ) | ||
132 | if((path + "/" + fi->fileName()) != (libraryIt.data())->library()){ | ||
133 | QString *s = new QString(path + "/" + fi->fileName()); | ||
134 | rlist.append(s); | ||
135 | } | ||
136 | } | ||
137 | ++it; | ||
138 | } | ||
139 | return rlist; | ||
140 | } | ||
141 | */ | ||
142 | |||
143 | /** | 128 | /** |
@@ -163,3 +148,6 @@ void MainWindowImp::removeClicked(){ | |||
163 | QListViewItem *item = serviceList->currentItem(); | 148 | QListViewItem *item = serviceList->currentItem(); |
164 | if(item == NULL) NO_SELECT_ERROR_AND_RETURN | 149 | if(item == NULL) { |
150 | QMessageBox::information(this, "Error","Please select an interface.", "Ok"); | ||
151 | return; | ||
152 | } | ||
165 | 153 | ||
@@ -180,3 +168,6 @@ void MainWindowImp::configureClicked(){ | |||
180 | QListViewItem *item = serviceList->currentItem(); | 168 | QListViewItem *item = serviceList->currentItem(); |
181 | if(item == NULL) NO_SELECT_ERROR_AND_RETURN | 169 | if(item == NULL){ |
170 | QMessageBox::information(this, "Error","Please select an interface.", "Ok"); | ||
171 | return; | ||
172 | } | ||
182 | 173 | ||
@@ -199,3 +190,6 @@ void MainWindowImp::informationClicked(){ | |||
199 | QListViewItem *item = serviceList->currentItem(); | 190 | QListViewItem *item = serviceList->currentItem(); |
200 | if(item == NULL)NO_SELECT_ERROR_AND_RETURN | 191 | if(item == NULL){ |
192 | QMessageBox::information(this, "Error","Please select an interface.", "Ok"); | ||
193 | return; | ||
194 | } | ||
201 | 195 | ||
@@ -313,2 +307,6 @@ void MainWindowImp::updateInterface(Interface *i){ | |||
313 | typeName = "lo"; | 307 | typeName = "lo"; |
308 | if(i->getInterfaceName().contains("irda")) | ||
309 | typeName = "irda"; | ||
310 | if(i->getInterfaceName().contains("wlan")) | ||
311 | typeName = "wlan"; | ||
314 | QPixmap type = (Resource::loadPixmap(typeName)); | 312 | QPixmap type = (Resource::loadPixmap(typeName)); |