summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings/ppp/general.cpp
Side-by-side diff
Diffstat (limited to 'noncore/settings/networksettings/ppp/general.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/networksettings/ppp/general.cpp62
1 files changed, 35 insertions, 27 deletions
diff --git a/noncore/settings/networksettings/ppp/general.cpp b/noncore/settings/networksettings/ppp/general.cpp
index 5540946..ff1b11b 100644
--- a/noncore/settings/networksettings/ppp/general.cpp
+++ b/noncore/settings/networksettings/ppp/general.cpp
@@ -23,33 +23,31 @@
* License along with this program; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include <termios.h>
-#include <string.h>
+#include "general.h"
+#include "interfaceppp.h"
+#include "modeminfo.h"
+#include "modemcmds.h"
+#include "pppdata.h"
+/* OPIE */
+#include <qpe/config.h>
+#include <qpe/qpeapplication.h>
+
+/* QT */
#include <qcheckbox.h>
#include <qcombobox.h>
#include <qlabel.h>
#include <qlayout.h>
#include <qpushbutton.h>
#include <qslider.h>
#include <qspinbox.h>
#include <qwhatsthis.h>
-#include <qpe/config.h>
-// #include <qgroupbox.h>
-
-
-#include "general.h"
-#include "interfaceppp.h"
-//#include "miniterm.h"
-#include "modeminfo.h"
-#include "modemcmds.h"
-//#include "devices.h"
-#include "pppdata.h"
-//#include <klocale.h>
-
+/* STD */
+#include <termios.h>
+#include <string.h>
ModemWidget::ModemWidget( PPPData *pd, QWidget *parent, const char *name )
: QWidget(parent, name), _pppdata(pd)
@@ -147,9 +145,10 @@ ModemWidget::ModemWidget( PPPData *pd, QWidget *parent, const char *name )
tl->addWidget(baud_label, 4, 0);
baud_c = new QComboBox(this);
baud_label->setBuddy(baud_c);
- static const char *baudrates[] = {
+ static const char *baudrates[] =
+ {
#ifdef B460800
"460800",
#endif
@@ -169,9 +168,10 @@ ModemWidget::ModemWidget( PPPData *pd, QWidget *parent, const char *name )
"38400",
"19200",
"9600",
"2400",
- 0};
+ 0
+ };
for(k = 0; baudrates[k]; k++)
baud_c->insertItem(baudrates[k]);
@@ -189,9 +189,10 @@ ModemWidget::ModemWidget( PPPData *pd, QWidget *parent, const char *name )
QWhatsThis::add(baud_label,tmp);
QWhatsThis::add(baud_c,tmp);
- for(int i=0; i <= enter->count()-1; i++) {
+ for(int i=0; i <= enter->count()-1; i++)
+ {
if(_pppdata->enter() == enter->text(i))
enter->setCurrentItem(i);
}
@@ -236,19 +237,22 @@ ModemWidget::ModemWidget( PPPData *pd, QWidget *parent, const char *name )
"<i>CONNECT</i> response from your modem. The\n"
"recommended value is 30 seconds."));
//set stuff from gpppdata
- for(int i=0; i <= enter->count()-1; i++) {
+ for(int i=0; i <= enter->count()-1; i++)
+ {
if(_pppdata->enter() == enter->text(i))
enter->setCurrentItem(i);
}
- for(int i=0; i <= modemdevice->count()-1; i++) {
+ for(int i=0; i <= modemdevice->count()-1; i++)
+ {
if(_pppdata->modemDevice() == modemdevice->text(i))
modemdevice->setCurrentItem(i);
}
- for(int i=0; i <= flowcontrol->count()-1; i++) {
+ for(int i=0; i <= flowcontrol->count()-1; i++)
+ {
if(_pppdata->flowcontrol() == flowcontrol->text(i))
flowcontrol->setCurrentItem(i);
}
@@ -272,11 +276,13 @@ ModemWidget::~ModemWidget()
}
QString edited = modemdevice->currentText();
- if ( !( edited ).isEmpty() ) {
+ if ( !( edited ).isEmpty() )
+ {
edited.simplifyWhiteSpace();
- if ( devs.contains( edited ) == 0 ) {
+ if ( devs.contains( edited ) == 0 )
+ {
devs << edited;
}
_pppdata->setModemDevice( edited );
}
@@ -469,16 +475,18 @@ ModemWidget2::ModemWidget2( PPPData *pd, InterfacePPP *ip, QWidget *parent,
// SLOT(terminal()));
}
-void ModemWidget2::modemcmdsbutton() {
+void ModemWidget2::modemcmdsbutton()
+{
ModemCommands mc(_ifaceppp->data(), this, "commands" , true, Qt::WStyle_ContextHelp);
- mc.showMaximized();
- mc.exec();
+
+ QPEApplication::execDialog( &mc );
}
-void ModemWidget2::query_modem() {
+void ModemWidget2::query_modem()
+{
ModemTransfer mt(_ifaceppp->modem(), this);
mt.exec();
}