summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings/mainwindowimp.cpp
Unidiff
Diffstat (limited to 'noncore/settings/networksettings/mainwindowimp.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings/mainwindowimp.cpp73
1 files changed, 46 insertions, 27 deletions
diff --git a/noncore/settings/networksettings/mainwindowimp.cpp b/noncore/settings/networksettings/mainwindowimp.cpp
index 66ec8b5..e9429e3 100644
--- a/noncore/settings/networksettings/mainwindowimp.cpp
+++ b/noncore/settings/networksettings/mainwindowimp.cpp
@@ -1,55 +1,56 @@
1#include "mainwindowimp.h" 1#include "mainwindowimp.h"
2#include "addconnectionimp.h" 2#include "addconnectionimp.h"
3#include "interfaceinformationimp.h" 3#include "interfaceinformationimp.h"
4#include "interfacesetupimp.h" 4#include "interfacesetupimp.h"
5#include "module.h" 5#include "module.h"
6 6
7#include "kprocess.h" 7#include "kprocess.h"
8#include "namedialog.h"
8 9
9#include <qpushbutton.h> 10#include <qpushbutton.h>
10#include <qtabwidget.h> 11#include <qtabwidget.h>
11#include <qlistbox.h> 12#include <qlistbox.h>
12#include <qlistview.h> 13#include <qlistview.h>
13#include <qheader.h> 14#include <qheader.h>
14#include <qlabel.h> 15#include <qlabel.h>
15 16
16#include <qmainwindow.h> 17#include <qmainwindow.h>
17#include <qmessagebox.h> 18#include <qmessagebox.h>
18 19
19#include <qpe/config.h> 20#include <qpe/config.h>
20#include <qpe/qlibrary.h> 21#include <qpe/qlibrary.h>
21#include <qpe/resource.h> 22#include <qpe/resource.h>
22 23
23#include <qlist.h> 24#include <qlist.h>
24#include <qdir.h> 25#include <qdir.h>
25#include <qfile.h> 26#include <qfile.h>
26#include <qtextstream.h> 27#include <qtextstream.h>
27 28
28#define TEMP_ALL "/tmp/ifconfig-a" 29#define TEMP_ALL "/tmp/ifconfig-a"
29#define TEMP_UP "/tmp/ifconfig" 30#define TEMP_UP "/tmp/ifconfig"
30 31
31MainWindowImp::MainWindowImp(QWidget *parent, const char *name) : MainWindow(parent, name, true), advancedUserMode(false){ 32MainWindowImp::MainWindowImp(QWidget *parent, const char *name) : MainWindow(parent, name, true), advancedUserMode(false){
32 connect(addConnectionButton, SIGNAL(clicked()), this, SLOT(addClicked())); 33 connect(addConnectionButton, SIGNAL(clicked()), this, SLOT(addClicked()));
33 connect(removeConnectionButton, SIGNAL(clicked()), this, SLOT(removeClicked())); 34 connect(removeConnectionButton, SIGNAL(clicked()), this, SLOT(removeClicked()));
34 connect(informationConnectionButton, SIGNAL(clicked()), this, SLOT(informationClicked())); 35 connect(informationConnectionButton, SIGNAL(clicked()), this, SLOT(informationClicked()));
35 connect(configureConnectionButton, SIGNAL(clicked()), this, SLOT(configureClicked())); 36 connect(configureConnectionButton, SIGNAL(clicked()), this, SLOT(configureClicked()));
36 37
37 connect(newProfileButton, SIGNAL(clicked()), this, SLOT(addProfile())); 38 connect(newProfileButton, SIGNAL(clicked()), this, SLOT(addProfile()));
38 connect(removeProfileButton, SIGNAL(clicked()), this, SLOT(removeProfile())); 39 connect(removeProfileButton, SIGNAL(clicked()), this, SLOT(removeProfile()));
39 connect(profilesList, SIGNAL(highlighted(const QString&)), this, SLOT(changeProfile(const QString&))); 40 connect(profilesList, SIGNAL(highlighted(const QString&)), this, SLOT(changeProfile(const QString&)));
40 41
41 // Load connections. 42 // Load connections.
42 loadModules(QDir::homeDirPath() + "/.networksetup/plugins"); 43 loadModules(QDir::homeDirPath() + "/.networksetup/plugins");
43 getInterfaceList(); 44 getInterfaceList();
44 connectionList->header()->hide(); 45 connectionList->header()->hide();
45 46
46 47
47 Config cfg("NetworkSetup"); 48 Config cfg("NetworkSetup");
48 profiles = QStringList::split(" ", cfg.readEntry("Profiles", "All")); 49 profiles = QStringList::split(" ", cfg.readEntry("Profiles", "All"));
49 for ( QStringList::Iterator it = profiles.begin(); it != profiles.end(); ++it) 50 for ( QStringList::Iterator it = profiles.begin(); it != profiles.end(); ++it)
50 profilesList->insertItem((*it)); 51 profilesList->insertItem((*it));
51 advancedUserMode = cfg.readBoolEntry("AdvancedUserMode", false); 52 advancedUserMode = cfg.readBoolEntry("AdvancedUserMode", false);
52} 53}
53 54
54/** 55/**
55 * Deconstructor. Save profiles. Delete loaded libraries. 56 * Deconstructor. Save profiles. Delete loaded libraries.
@@ -83,133 +84,153 @@ void MainWindowImp::loadModules(QString path){
83 d.setFilter( QDir::Files | QDir::NoSymLinks ); 84 d.setFilter( QDir::Files | QDir::NoSymLinks );
84 const QFileInfoList *list = d.entryInfoList(); 85 const QFileInfoList *list = d.entryInfoList();
85 QFileInfoListIterator it( *list ); 86 QFileInfoListIterator it( *list );
86 QFileInfo *fi; 87 QFileInfo *fi;
87 while ( (fi=it.current()) ) { 88 while ( (fi=it.current()) ) {
88 if(fi->fileName().contains(".so")){ 89 if(fi->fileName().contains(".so")){
89 loadPlugin(path + "/" + fi->fileName()); 90 loadPlugin(path + "/" + fi->fileName());
90 } 91 }
91 ++it; 92 ++it;
92 } 93 }
93} 94}
94 95
95/** 96/**
96 * Attempt to load a function and resolve a function. 97 * Attempt to load a function and resolve a function.
97 * @param pluginFileName - the name of the file in which to attempt to load 98 * @param pluginFileName - the name of the file in which to attempt to load
98 * @param resolveString - function pointer to resolve 99 * @param resolveString - function pointer to resolve
99 * @return pointer to the function with name resolveString or NULL 100 * @return pointer to the function with name resolveString or NULL
100 */ 101 */
101Module* MainWindowImp::loadPlugin(QString pluginFileName, QString resolveString){ 102Module* MainWindowImp::loadPlugin(QString pluginFileName, QString resolveString){
102 qDebug(QString("MainWindowImp::loadPlugin: %1").arg(pluginFileName).latin1()); 103 qDebug(QString("MainWindowImp::loadPlugin: %1").arg(pluginFileName).latin1());
103 QLibrary *lib = new QLibrary(pluginFileName); 104 QLibrary *lib = new QLibrary(pluginFileName);
104 void *functionPointer = lib->resolve(resolveString); 105 void *functionPointer = lib->resolve(resolveString);
105 if( !functionPointer ){ 106 if( !functionPointer ){
106 qDebug(QString("MainWindowImp: File: %1 is not a plugin, but though was.").arg(pluginFileName).latin1()); 107 qDebug(QString("MainWindowImp: File: %1 is not a plugin, but though was.").arg(pluginFileName).latin1());
107 delete lib; 108 delete lib;
108 return NULL; 109 return NULL;
109 } 110 }
110 111
111 // Try to get an object. 112 // Try to get an object.
112 Module *object = ((Module* (*)()) functionPointer)(); 113 Module *object = ((Module* (*)()) functionPointer)();
113 if(object == NULL){ 114 if(object == NULL){
114 qDebug("MainWindowImp: Couldn't create object, but did load library!"); 115 qDebug("MainWindowImp: Couldn't create object, but did load library!");
115 delete lib; 116 delete lib;
116 return NULL; 117 return NULL;
117 } 118 }
118 119
119 // Store for deletion later 120 // Store for deletion later
120 libraries.insert(object, lib); 121 libraries.insert(object, lib);
121 return object; 122 return object;
122} 123}
123 124
124/** 125/**
125 * The Add button was clicked. Bring up the add dialog and if OK is hit 126 * The Add button was clicked. Bring up the add dialog and if OK is hit
126 * load the plugin and append it to the list 127 * load the plugin and append it to the list
127 */ 128 */
128void MainWindowImp::addClicked(){ 129void MainWindowImp::addClicked(){
129 QMap<Module*, QLibrary*>::Iterator it; 130 QMap<Module*, QLibrary*>::Iterator it;
130 QMap<QString, QString> list; 131 QMap<QString, QString> list;
132 QMap<QString, Module*> newInterfaceOwners;
131 list.insert("USB (PPP) / (ADD_TEST)", "A dialup connection over the USB port"); 133 list.insert("USB (PPP) / (ADD_TEST)", "A dialup connection over the USB port");
132 list.insert("IrDa (PPP) / (ADD_TEST)", "A dialup connection over the IdDa port"); 134 list.insert("IrDa (PPP) / (ADD_TEST)", "A dialup connection over the IdDa port");
133 for( it = libraries.begin(); it != libraries.end(); ++it ){ 135 for( it = libraries.begin(); it != libraries.end(); ++it ){
134 if(it.key()) 136 if(it.key()){
135 (it.key())->possibleNewInterfaces(list); 137 (it.key())->possibleNewInterfaces(list);
138 }
136 } 139 }
137 // See if the list has anything that we can add. 140 // See if the list has anything that we can add.
138 if(list.count() == 0){ 141 if(list.count() == 0){
139 QMessageBox::information(this, "Sorry", "Nothing to add.", "Ok"); 142 QMessageBox::information(this, "Sorry", "Nothing to add.", "Ok");
140 return; 143 return;
141 } 144 }
142 AddConnectionImp addNewConnection(this, "AddConnectionImp", true); 145 AddConnectionImp addNewConnection(this, "AddConnectionImp", true);
143 addNewConnection.addConnections(list); 146 addNewConnection.addConnections(list);
144 addNewConnection.showMaximized(); 147 addNewConnection.showMaximized();
145 if(QDialog::Accepted == addNewConnection.exec()){ 148 if(QDialog::Accepted == addNewConnection.exec()){
146 149 QListViewItem *item = addNewConnection.registeredServicesList->currentItem();
150 if(!item)
151 return;
152
153 for( it = libraries.begin(); it != libraries.end(); ++it ){
154 if(it.key()){
155 Interface *i = (it.key())->addNewInterface(item->text(0));
156 if(i){
157 interfaceNames.insert(i->getInterfaceName(), i);
158 updateInterface(i);
159 }
160 }
161 }
147 } 162 }
148} 163}
149 164
150/** 165/**
151 * Prompt the user to see if they really want to do this. 166 * Prompt the user to see if they really want to do this.
152 * If they do then remove from the list and unload. 167 * If they do then remove from the list and unload.
153 */ 168 */
154void MainWindowImp::removeClicked(){ 169void MainWindowImp::removeClicked(){
155 QListViewItem *item = connectionList->currentItem(); 170 QListViewItem *item = connectionList->currentItem();
156 if(item == NULL) { 171 if(!item) {
157 QMessageBox::information(this, "Error","Please select an interface.", "Ok"); 172 QMessageBox::information(this, "Error","Please select an interface.", "Ok");
158 return; 173 return;
159 } 174 }
160 175
161 if((interfaceItems[item])->getModuleOwner() == NULL){ 176 Interface *i = interfaceItems[item];
177 if(i->getModuleOwner() == NULL){
162 QMessageBox::information(this, "Can't remove interface.", "Interface is built in.", "Ok"); 178 QMessageBox::information(this, "Can't remove interface.", "Interface is built in.", "Ok");
163 } 179 }
164 else{ 180 else{
165 // Try to remove. 181 if(!i->getModuleOwner()->remove(i))
182 QMessageBox::information(this, "Error", "Unable to remove.", "Ok");
183 else{
184 QMessageBox::information(this, "Success", "Interface was removed.", "Ok");
185 // TODO memory managment....
186 // who deletes the interface?
187 }
166 } 188 }
167
168} 189}
169 190
170/** 191/**
171 * Pull up the configure about the currently selected interface. 192 * Pull up the configure about the currently selected interface.
172 * Report an error if no interface is selected. 193 * Report an error if no interface is selected.
173 * If the interface has a module owner then request its configure with a empty 194 * If the interface has a module owner then request its configure with a empty
174 * tab. If tab is !NULL then append the interfaces setup widget to it. 195 * tab. If tab is !NULL then append the interfaces setup widget to it.
175 */ 196 */
176void MainWindowImp::configureClicked(){ 197void MainWindowImp::configureClicked(){
177 QListViewItem *item = connectionList->currentItem(); 198 QListViewItem *item = connectionList->currentItem();
178 if(!item){ 199 if(!item){
179 QMessageBox::information(this, "Error","Please select an interface.", QMessageBox::Ok); 200 QMessageBox::information(this, "Error","Please select an interface.", QMessageBox::Ok);
180 return; 201 return;
181 } 202 }
182 203
183 Interface *i = interfaceItems[item]; 204 Interface *i = interfaceItems[item];
184 if(i->getModuleOwner()){ 205 if(i->getModuleOwner()){
185 QTabWidget *tabWidget = NULL; 206 QTabWidget *tabWidget = NULL;
186 QWidget *moduleConfigure = i->getModuleOwner()->configure(&tabWidget); 207 QWidget *moduleConfigure = i->getModuleOwner()->configure(&tabWidget);
187 if(moduleConfigure != NULL){ 208 if(moduleConfigure != NULL){
188 if(tabWidget != NULL){ 209 if(tabWidget != NULL){
189 InterfaceSetupImp *configure = new InterfaceSetupImp(tabWidget, "InterfaceSetupImp", i, true); 210 InterfaceSetupImp *configure = new InterfaceSetupImp(tabWidget, "InterfaceSetupImp", i, true);
190 tabWidget->insertTab(configure, "TCP/IP"); 211 tabWidget->insertTab(configure, "TCP/IP");
191 } 212 }
192 moduleConfigure->showMaximized(); 213 moduleConfigure->showMaximized();
193 moduleConfigure->show(); 214 moduleConfigure->show();
194 return; 215 return;
195 } 216 }
196 } 217 }
197 218
198 InterfaceSetupImp *configure = new InterfaceSetupImp(0, "InterfaceSetupImp", i, true); 219 InterfaceSetupImp *configure = new InterfaceSetupImp(0, "InterfaceSetupImp", i, true);
199 configure->showMaximized(); 220 configure->showMaximized();
200 configure->show(); 221 configure->show();
201} 222}
202 223
203/** 224/**
204 * Pull up the information about the currently selected interface. 225 * Pull up the information about the currently selected interface.
205 * Report an error if no interface is selected. 226 * Report an error if no interface is selected.
206 * If the interface has a module owner then request its configure with a empty 227 * If the interface has a module owner then request its configure with a empty
207 * tab. If tab is !NULL then append the interfaces setup widget to it. 228 * tab. If tab is !NULL then append the interfaces setup widget to it.
208 */ 229 */
209void MainWindowImp::informationClicked(){ 230void MainWindowImp::informationClicked(){
210 QListViewItem *item = connectionList->currentItem(); 231 QListViewItem *item = connectionList->currentItem();
211 if(!item){ 232 if(!item){
212 QMessageBox::information(this, "Error","Please select an interface.", QMessageBox::Ok); 233 QMessageBox::information(this, "Error","Please select an interface.", QMessageBox::Ok);
213 return; 234 return;
214 } 235 }
215 236
@@ -266,138 +287,136 @@ void MainWindowImp::jobDone(KProcess *process){
266 287
267 QTextStream stream( &file ); 288 QTextStream stream( &file );
268 QString line; 289 QString line;
269 while ( !stream.eof() ) { 290 while ( !stream.eof() ) {
270 line = stream.readLine(); 291 line = stream.readLine();
271 int space = line.find(" "); 292 int space = line.find(" ");
272 if(space > 1){ 293 if(space > 1){
273 // We have found an interface 294 // We have found an interface
274 QString interfaceName = line.mid(0, space); 295 QString interfaceName = line.mid(0, space);
275 if(!advancedUserMode){ 296 if(!advancedUserMode){
276 if(interfaceName == "lo") 297 if(interfaceName == "lo")
277 break; 298 break;
278 } 299 }
279 Interface *i; 300 Interface *i;
280 // See if we already have it 301 // See if we already have it
281 if(interfaceNames.find(interfaceName) == interfaceNames.end()){ 302 if(interfaceNames.find(interfaceName) == interfaceNames.end()){
282 if(fileName == TEMP_ALL) 303 if(fileName == TEMP_ALL)
283 i = new Interface(interfaceName, false); 304 i = new Interface(interfaceName, false);
284 else 305 else
285 i = new Interface(interfaceName, true); 306 i = new Interface(interfaceName, true);
286 } 307 }
287 else{ 308 else{
288 i = interfaceNames[interfaceName]; 309 i = interfaceNames[interfaceName];
289 if(fileName != TEMP_ALL) 310 if(fileName != TEMP_ALL)
290 i->setStatus(true); 311 i->setStatus(true);
291 } 312 }
292 313
293 i->setAttached(true); 314 i->setAttached(true);
294 i->setInterfaceName(interfaceName); 315 i->setInterfaceName(interfaceName);
295 316
296 QString hardName = "Ethernet"; 317 QString hardName = "Ethernet";
297 int hardwareName = line.find("Link encap:"); 318 int hardwareName = line.find("Link encap:");
298 int macAddress = line.find("HWaddr"); 319 int macAddress = line.find("HWaddr");
299 if(macAddress == -1) 320 if(macAddress == -1)
300 macAddress = line.length(); 321 macAddress = line.length();
301 if(hardwareName != -1) 322 if(hardwareName != -1)
302 i->setHardwareName(line.mid(hardwareName+11, macAddress-(hardwareName+11)) + QString(" (%1)").arg(i->getInterfaceName())); 323 i->setHardwareName(line.mid(hardwareName+11, macAddress-(hardwareName+11)) + QString(" (%1)").arg(i->getInterfaceName()));
303 // We have found an interface 324 // We have found an interface
304 //qDebug(QString("MainWindowImp: Found Interface: %1").arg(line).latin1()); 325 //qDebug(QString("MainWindowImp: Found Interface: %1").arg(line).latin1());
305 interfaceNames.insert(i->getInterfaceName(), i); 326 interfaceNames.insert(i->getInterfaceName(), i);
306 updateInterface(i); 327 updateInterface(i);
307 } 328 }
308 } 329 }
309 file.close(); 330 file.close();
310 QFile::remove(fileName); 331 QFile::remove(fileName);
311} 332}
312 333
313/** 334/**
314 * 335 * Update this interface. If no QListViewItem exists create one.
336 * @param Interface* pointer to the interface that needs to be updated.
315 */ 337 */
316void MainWindowImp::updateInterface(Interface *i){ 338void MainWindowImp::updateInterface(Interface *i){
317 QListViewItem *item = NULL; 339 QListViewItem *item = NULL;
318 340
319 // See if we already have it 341 // Find the interface, making it if needed.
320 if(items.find(i) == items.end()){ 342 if(items.find(i) == items.end()){
321 item = new QListViewItem(connectionList, "", "", ""); 343 item = new QListViewItem(connectionList, "", "", "");
322 // See if you can't find a module owner for this interface 344 // See if you can't find a module owner for this interface
323 QMap<Module*, QLibrary*>::Iterator it; 345 QMap<Module*, QLibrary*>::Iterator it;
324 for( it = libraries.begin(); it != libraries.end(); ++it ){ 346 for( it = libraries.begin(); it != libraries.end(); ++it ){
325 if(it.key()->isOwner(i)) 347 if(it.key()->isOwner(i))
326 i->setModuleOwner(it.key()); 348 i->setModuleOwner(it.key());
327 } 349 }
328
329 items.insert(i, item); 350 items.insert(i, item);
330 interfaceItems.insert(item, i); 351 interfaceItems.insert(item, i);
331 } 352 }
332 else 353 else
333 item = items[i]; 354 item = items[i];
334 355
335 QString statusImage = "down"; 356 // Update the icons and information
336 if(i->getStatus()) 357 item->setPixmap(0, (Resource::loadPixmap(i->getStatus() ? "up": "down")));
337 statusImage = "up";
338 QPixmap status = (Resource::loadPixmap(statusImage));
339 item->setPixmap(0, status);
340 358
341 QString typeName = "lan"; 359 QString typeName = "lan";
342 if(i->getHardwareName().contains("Local Loopback")) 360 if(i->getHardwareName().contains("Local Loopback"))
343 typeName = "lo"; 361 typeName = "lo";
344 if(i->getInterfaceName().contains("irda")) 362 if(i->getInterfaceName().contains("irda"))
345 typeName = "irda"; 363 typeName = "irda";
346 if(i->getInterfaceName().contains("wlan")) 364 if(i->getInterfaceName().contains("wlan"))
347 typeName = "wlan"; 365 typeName = "wlan";
348 // Actually try to use the Module 366 // Actually try to use the Module
349 if(i->getModuleOwner() != NULL){ 367 if(i->getModuleOwner() != NULL)
350 typeName = i->getModuleOwner()->getPixmapName(i); 368 typeName = i->getModuleOwner()->getPixmapName(i);
351 }
352 QPixmap type = (Resource::loadPixmap(typeName));
353 item->setPixmap(1, type);
354
355 item->setText(2, i->getHardwareName());
356 369
370 item->setPixmap(1, (Resource::loadPixmap(typeName)));
371 item->setText(2, i->getHardwareName());
372 item->setText(3, (i->getStatus()) ? i->getIp() : QString(""));
357} 373}
358 374
359/** 375/**
360 * Adds a new profile to the list of profiles. 376 * Adds a new profile to the list of profiles.
361 * Don't add profiles that already exists. 377 * Don't add profiles that already exists.
362 * Appends to the combo and QStringList 378 * Appends to the list and QStringList
363 */ 379 */
364void MainWindowImp::addProfile(){ 380void MainWindowImp::addProfile(){
365 QString newProfileName = "New"; 381 NameDialog foo(this, "namedialog", true);
382 QString newProfileName = foo.go();
383 if(newProfileName.length() == 0)
384 return;
385
366 if(profiles.grep(newProfileName).count() > 0){ 386 if(profiles.grep(newProfileName).count() > 0){
367 QMessageBox::information(this, "Can't Add.","Profile already exists.", "Ok"); 387 QMessageBox::information(this, "Can't Add","Profile already exists.", "Ok");
368 return; 388 return;
369 } 389 }
370 profiles.append(newProfileName); 390 profiles.append(newProfileName);
371 profilesList->insertItem(newProfileName); 391 profilesList->insertItem(newProfileName);
372
373} 392}
374 393
375/** 394/**
376 * Removes the currently selected profile in the combo. 395 * Removes the currently selected profile in the combo.
377 * Doesn't delete if there are less then 2 profiles. 396 * Doesn't delete if there are less then 2 profiles.
378 */ 397 */
379void MainWindowImp::removeProfile(){ 398void MainWindowImp::removeProfile(){
380 if(profilesList->count() <= 1){ 399 if(profilesList->count() <= 1){
381 QMessageBox::information(this, "Can't remove anything.","Need One Profile.", "Ok"); 400 QMessageBox::information(this, "Can't remove anything.","Need One Profile.", "Ok");
382 return; 401 return;
383 } 402 }
384 QString profileToRemove = profilesList->currentText(); 403 QString profileToRemove = profilesList->currentText();
385 if(QMessageBox::information(this, "Question",QString("Remove profile: %1").arg(profileToRemove), QMessageBox::Ok, QMessageBox::Cancel) == QMessageBox::Ok){ 404 if(QMessageBox::information(this, "Question",QString("Remove profile: %1").arg(profileToRemove), QMessageBox::Ok, QMessageBox::Cancel) == QMessageBox::Ok){
386 profiles = QStringList::split(" ", profiles.join(" ").replace(QRegExp(profileToRemove), "")); 405 profiles = QStringList::split(" ", profiles.join(" ").replace(QRegExp(profileToRemove), ""));
387 profilesList->clear(); 406 profilesList->clear();
388 for ( QStringList::Iterator it = profiles.begin(); it != profiles.end(); ++it) 407 for ( QStringList::Iterator it = profiles.begin(); it != profiles.end(); ++it)
389 profilesList->insertItem((*it)); 408 profilesList->insertItem((*it));
390 } 409 }
391 410
392} 411}
393 412
394/** 413/**
395 * A new profile has been selected, change. 414 * A new profile has been selected, change.
396 * @param newProfile the new profile. 415 * @param newProfile the new profile.
397 */ 416 */
398void MainWindowImp::changeProfile(const QString& newProfile){ 417void MainWindowImp::changeProfile(const QString& newProfile){
399 currentProfileLabel->setText(newProfile); 418 currentProfileLabel->setText(newProfile);
400} 419}
401 420
402// mainwindowimp.cpp 421// mainwindowimp.cpp
403 422