summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings/ppp/accounts.cpp
authorar <ar>2004-02-21 18:32:37 (UTC)
committer ar <ar>2004-02-21 18:32:37 (UTC)
commit536f271b1e6a1d1886e96a28524a3503c4c38c4e (patch) (side-by-side diff)
tree63b3c0ce472a89a0f9731195fececc701bf4ca67 /noncore/settings/networksettings/ppp/accounts.cpp
parentdb2afda83e495bff9fc19fa14a30072f1cd4c67a (diff)
downloadopie-536f271b1e6a1d1886e96a28524a3503c4c38c4e.zip
opie-536f271b1e6a1d1886e96a28524a3503c4c38c4e.tar.gz
opie-536f271b1e6a1d1886e96a28524a3503c4c38c4e.tar.bz2
improve support for BigScreen
Diffstat (limited to 'noncore/settings/networksettings/ppp/accounts.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/networksettings/ppp/accounts.cpp80
1 files changed, 53 insertions, 27 deletions
diff --git a/noncore/settings/networksettings/ppp/accounts.cpp b/noncore/settings/networksettings/ppp/accounts.cpp
index 28d8732..b8a1925a 100644
--- a/noncore/settings/networksettings/ppp/accounts.cpp
+++ b/noncore/settings/networksettings/ppp/accounts.cpp
@@ -26,4 +26,12 @@
+#include "accounts.h"
+#include "authwidget.h"
+#include "pppdata.h"
+#include "edit.h"
+
+/* OPIE */
+#include <qpe/qpeapplication.h>
+
+/* QT */
#include <qdir.h>
-#include <stdlib.h>
#include <qlayout.h>
@@ -33,3 +41,2 @@
#include <qmessagebox.h>
-
#include <qapplication.h>
@@ -39,6 +46,4 @@
-#include "accounts.h"
-#include "authwidget.h"
-#include "pppdata.h"
-#include "edit.h"
+/* STD */
+#include <stdlib.h>
@@ -70,3 +75,4 @@ AccountWidget::AccountWidget( PPPData *pd, QWidget *parent, const char *name, WF
- for (uint i = 0; i < listListbox->count(); i++){
+ for (uint i = 0; i < listListbox->count(); i++)
+ {
if ( listListbox->text(i) == _pppdata->accname() )
@@ -78,3 +84,4 @@ AccountWidget::AccountWidget( PPPData *pd, QWidget *parent, const char *name, WF
-void AccountWidget::slotListBoxSelect(int idx) {
+void AccountWidget::slotListBoxSelect(int idx)
+{
bool ok = _pppdata->setAccount( listListbox->text(idx) );
@@ -86,3 +93,4 @@ void AccountWidget::slotListBoxSelect(int idx) {
-void AccountWidget::edit() {
+void AccountWidget::edit()
+{
_pppdata->setAccount(listListbox->text(listListbox->currentItem()));
@@ -91,3 +99,4 @@ void AccountWidget::edit() {
- if(result == QDialog::Accepted) {
+ if(result == QDialog::Accepted)
+ {
listListbox->changeItem(_pppdata->accname(),listListbox->currentItem());
@@ -99,3 +108,4 @@ void AccountWidget::edit() {
-void AccountWidget::create() {
+void AccountWidget::create()
+{
@@ -108,3 +118,4 @@ void AccountWidget::create() {
int result;
- if (_pppdata->newaccount() == -1){
+ if (_pppdata->newaccount() == -1)
+ {
qDebug("_pppdata->newaccount() == -1");
@@ -114,3 +125,4 @@ void AccountWidget::create() {
- if(result == QDialog::Accepted) {
+ if(result == QDialog::Accepted)
+ {
listListbox->insertItem(_pppdata->accname());
@@ -119,3 +131,4 @@ void AccountWidget::create() {
_pppdata->save();
- } else
+ }
+ else
_pppdata->deleteAccount();
@@ -124,3 +137,4 @@ void AccountWidget::create() {
-void AccountWidget::copy() {
+void AccountWidget::copy()
+{
// if(listListbox->count() == MAX_ACCOUNTS) {
@@ -130,3 +144,4 @@ void AccountWidget::copy() {
- if(listListbox->currentItem()<0) {
+ if(listListbox->currentItem()<0)
+ {
QMessageBox::information(this, "sorry", tr("No account selected."));
@@ -143,3 +158,4 @@ void AccountWidget::copy() {
-void AccountWidget::remove() {
+void AccountWidget::remove()
+{
@@ -166,3 +182,4 @@ void AccountWidget::remove() {
-int AccountWidget::doTab(){
+int AccountWidget::doTab()
+{
QDialog *dlg = new QDialog( 0, "newAccount", true, Qt::WStyle_ContextHelp );
@@ -177,6 +194,9 @@ int AccountWidget::doTab(){
- if(_pppdata->accname().isEmpty()) {
+ if(_pppdata->accname().isEmpty())
+ {
dlg->setCaption(tr("New Account"));
isnewaccount = true;
- } else {
+ }
+ else
+ {
QString tit = tr("Edit Account: ");
@@ -214,14 +234,20 @@ int AccountWidget::doTab(){
- while (!ok){
- dlg->showMaximized();
- result = dlg->exec();
+ while (!ok)
+ {
+ result = QPEApplication::execDialog( dlg );
ok = true;
- if(result == QDialog::Accepted) {
- if (!auth_w->check()){
+ if(result == QDialog::Accepted)
+ {
+ if (!auth_w->check())
+ {
ok = false;
- } else if(!dial_w->save()) {
+ }
+ else if(!dial_w->save())
+ {
QMessageBox::critical(this, "error", tr( "You must enter a unique account name"));
ok = false;
- }else{
+ }
+ else
+ {
ip_w->save();