Diffstat (limited to 'noncore/settings/networksettings/ppp/pppmodule.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/ppp/pppmodule.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/noncore/settings/networksettings/ppp/pppmodule.cpp b/noncore/settings/networksettings/ppp/pppmodule.cpp index 40d2455..d6ca88a 100644 --- a/noncore/settings/networksettings/ppp/pppmodule.cpp +++ b/noncore/settings/networksettings/ppp/pppmodule.cpp | |||
@@ -1,14 +1,16 @@ | |||
1 | #include "pppconfig.h" | ||
1 | #include "pppmodule.h" | 2 | #include "pppmodule.h" |
2 | #include "pppimp.h" | 3 | //#include "pppimp.h" |
4 | #include "kpppwidget.h" | ||
3 | #include "interfaceinformationimp.h" | 5 | #include "interfaceinformationimp.h" |
4 | //#include "devices.h" | 6 | //#include "devices.h" |
5 | 7 | ||
6 | /** | 8 | /** |
7 | * Constructor, find all of the possible interfaces | 9 | * Constructor, find all of the possible interfaces |
8 | */ | 10 | */ |
9 | PPPModule::PPPModule() : Module() { | 11 | PPPModule::PPPModule() : Module() { |
10 | } | 12 | } |
11 | 13 | ||
12 | /** | 14 | /** |
13 | * Delete any interfaces that we own. | 15 | * Delete any interfaces that we own. |
14 | */ | 16 | */ |
@@ -44,60 +46,63 @@ bool PPPModule::isOwner(Interface *i){ | |||
44 | return false; | 46 | return false; |
45 | 47 | ||
46 | i->setHardwareName("PPP"); | 48 | i->setHardwareName("PPP"); |
47 | list.append(i); | 49 | list.append(i); |
48 | return true; | 50 | return true; |
49 | } | 51 | } |
50 | 52 | ||
51 | /** | 53 | /** |
52 | * Create, and return the WLANConfigure Module | 54 | * Create, and return the WLANConfigure Module |
53 | * @return QWidget* pointer to this modules configure. | 55 | * @return QWidget* pointer to this modules configure. |
54 | */ | 56 | */ |
55 | QWidget *PPPModule::configure(Interface *i){ | 57 | QWidget *PPPModule::configure(Interface *i){ |
56 | PPPConfigureImp *pppconfig = new PPPConfigureImp(0, "PPPConfig", /* i,*/ false, Qt::WDestructiveClose); | 58 | qDebug("return ModemWidget"); |
59 | PPPConfigWidget *pppconfig = new PPPConfigWidget( 0, "PPPConfig", false, Qt::WDestructiveClose ); | ||
57 | // pppconfig->setProfile(profile); | 60 | // pppconfig->setProfile(profile); |
58 | return pppconfig; | 61 | return pppconfig; |
59 | } | 62 | } |
60 | 63 | ||
61 | /** | 64 | /** |
62 | * Create, and return the Information Module | 65 | * Create, and return the Information Module |
63 | * @return QWidget* pointer to this modules info. | 66 | * @return QWidget* pointer to this modules info. |
64 | */ | 67 | */ |
65 | QWidget *PPPModule::information(Interface *i){ | 68 | QWidget *PPPModule::information(Interface *i){ |
66 | // We don't have any advanced pppd information widget yet :-D | 69 | // We don't have any advanced pppd information widget yet :-D |
67 | // TODO ^ | 70 | // TODO ^ |
71 | qDebug("return PPPModule::information"); | ||
68 | InterfaceInformationImp *information = new InterfaceInformationImp(0, "InterfaceSetupImp", i); | 72 | InterfaceInformationImp *information = new InterfaceInformationImp(0, "InterfaceSetupImp", i); |
69 | return information; | 73 | return information; |
70 | } | 74 | } |
71 | 75 | ||
72 | /** | 76 | /** |
73 | * Get all active (up or down) interfaces | 77 | * Get all active (up or down) interfaces |
74 | * @return QList<Interface> A list of interfaces that exsist that havn't | 78 | * @return QList<Interface> A list of interfaces that exsist that havn't |
75 | * been called by isOwner() | 79 | * been called by isOwner() |
76 | */ | 80 | */ |
77 | QList<Interface> PPPModule::getInterfaces(){ | 81 | QList<Interface> PPPModule::getInterfaces(){ |
78 | // List all of the files in the peer directory | 82 | // List all of the files in the peer directory |
79 | return list; | 83 | return list; |
80 | } | 84 | } |
81 | 85 | ||
82 | /** | 86 | /** |
83 | * Attempt to add a new interface as defined by name | 87 | * Attempt to add a new interface as defined by name |
84 | * @param name the name of the type of interface that should be created given | 88 | * @param name the name of the type of interface that should be created given |
85 | * by possibleNewInterfaces(); | 89 | * by possibleNewInterfaces(); |
86 | * @return Interface* NULL if it was unable to be created. | 90 | * @return Interface* NULL if it was unable to be created. |
87 | */ | 91 | */ |
88 | Interface *PPPModule::addNewInterface(const QString &newInterface){ | 92 | Interface *PPPModule::addNewInterface(const QString &newInterface){ |
89 | // If the | 93 | |
90 | qDebug("try to add iface %s",newInterface.latin1()); | 94 | qDebug("try to add iface %s",newInterface.latin1()); |
91 | PPPConfigureImp imp(0, "PPPConfigImp"); | 95 | |
96 | PPPConfigWidget imp(0, "PPPConfigImp", true); | ||
92 | imp.showMaximized(); | 97 | imp.showMaximized(); |
93 | if(imp.exec() == QDialog::Accepted ){ | 98 | if(imp.exec() == QDialog::Accepted ){ |
94 | qDebug("ACCEPTED"); | 99 | qDebug("ACCEPTED"); |
95 | return new Interface( 0, newInterface ); | 100 | return new Interface( 0, newInterface ); |
96 | } | 101 | } |
97 | return NULL; | 102 | return NULL; |
98 | } | 103 | } |
99 | 104 | ||
100 | /** | 105 | /** |
101 | * Attempts to remove the interface, doesn't delete i | 106 | * Attempts to remove the interface, doesn't delete i |
102 | * @return bool true if successfull, false otherwise. | 107 | * @return bool true if successfull, false otherwise. |
103 | */ | 108 | */ |