author | zecke <zecke> | 2005-03-01 20:04:21 (UTC) |
---|---|---|
committer | zecke <zecke> | 2005-03-01 20:04:21 (UTC) |
commit | bb6be9cbe75892a7cc1d7c234f1c48023f9c9592 (patch) (unidiff) | |
tree | 0d517350be5926a2ac8bc5dc4c1bbf61f734ca2f | |
parent | 09c95ae28f4500ae0bb81f6ed305f877950626e8 (diff) | |
download | opie-bb6be9cbe75892a7cc1d7c234f1c48023f9c9592.zip opie-bb6be9cbe75892a7cc1d7c234f1c48023f9c9592.tar.gz opie-bb6be9cbe75892a7cc1d7c234f1c48023f9c9592.tar.bz2 |
Allow to wait 6 seconds (instead of three) when initialising the modem
-rw-r--r-- | noncore/settings/networksettings/ppp/modemcmds.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/settings/networksettings/ppp/modemcmds.cpp b/noncore/settings/networksettings/ppp/modemcmds.cpp index e797795..3d15b96 100644 --- a/noncore/settings/networksettings/ppp/modemcmds.cpp +++ b/noncore/settings/networksettings/ppp/modemcmds.cpp | |||
@@ -28,97 +28,97 @@ | |||
28 | #include <qslider.h> | 28 | #include <qslider.h> |
29 | #include <qbuttongroup.h> | 29 | #include <qbuttongroup.h> |
30 | #include <qscrollview.h> | 30 | #include <qscrollview.h> |
31 | #include <qapplication.h> | 31 | #include <qapplication.h> |
32 | #include <stdlib.h> | 32 | #include <stdlib.h> |
33 | #include "modemcmds.h" | 33 | #include "modemcmds.h" |
34 | #include "pppdata.h" | 34 | #include "pppdata.h" |
35 | 35 | ||
36 | #define ADJUSTEDIT(e) //e->setText("XXXXXXXXqy"); e->setMinimumSize(e->sizeHint()); /*e->setFixedHeight(e->sizeHint().height());*/ e->setText(""); e->setMaxLength(MODEMSTR_SIZE); | 36 | #define ADJUSTEDIT(e) //e->setText("XXXXXXXXqy"); e->setMinimumSize(e->sizeHint()); /*e->setFixedHeight(e->sizeHint().height());*/ e->setText(""); e->setMaxLength(MODEMSTR_SIZE); |
37 | 37 | ||
38 | // a little trick to make the label look like a disabled lineedit | 38 | // a little trick to make the label look like a disabled lineedit |
39 | #define FORMATSLIDERLABEL(l) //l->setFixedWidth(l->sizeHint().width()); l->setFixedHeight(QLineEdit(dummyWidget).sizeHint().height()); l->setAlignment(AlignCenter); l->setFrameStyle(QFrame::WinPanel|QFrame::Sunken); l->setLineWidth(2); | 39 | #define FORMATSLIDERLABEL(l) //l->setFixedWidth(l->sizeHint().width()); l->setFixedHeight(QLineEdit(dummyWidget).sizeHint().height()); l->setAlignment(AlignCenter); l->setFrameStyle(QFrame::WinPanel|QFrame::Sunken); l->setLineWidth(2); |
40 | 40 | ||
41 | ModemCommands::ModemCommands(PPPData *pd, QWidget *parent, const char *name , bool modal, WFlags f) | 41 | ModemCommands::ModemCommands(PPPData *pd, QWidget *parent, const char *name , bool modal, WFlags f) |
42 | : QDialog( parent, name, modal, f ), _pppdata(pd) | 42 | : QDialog( parent, name, modal, f ), _pppdata(pd) |
43 | { | 43 | { |
44 | setCaption(QObject::tr("Edit Modem Commands")); | 44 | setCaption(QObject::tr("Edit Modem Commands")); |
45 | 45 | ||
46 | const int GRIDROWS = 22; | 46 | const int GRIDROWS = 22; |
47 | int row = 0; | 47 | int row = 0; |
48 | 48 | ||
49 | QVBoxLayout *main = new QVBoxLayout( this ); | 49 | QVBoxLayout *main = new QVBoxLayout( this ); |
50 | QScrollView *sv = new QScrollView( this ); | 50 | QScrollView *sv = new QScrollView( this ); |
51 | QWidget *mainW = new QWidget( sv->viewport() ); | 51 | QWidget *mainW = new QWidget( sv->viewport() ); |
52 | sv->setResizePolicy( QScrollView::AutoOneFit ); | 52 | sv->setResizePolicy( QScrollView::AutoOneFit ); |
53 | sv->setHScrollBarMode( QScrollView::AlwaysOff ); | 53 | sv->setHScrollBarMode( QScrollView::AlwaysOff ); |
54 | sv->setFrameShape( QFrame::NoFrame ); | 54 | sv->setFrameShape( QFrame::NoFrame ); |
55 | sv->addChild( mainW ); | 55 | sv->addChild( mainW ); |
56 | main->addWidget( sv ); | 56 | main->addWidget( sv ); |
57 | // evil hack | 57 | // evil hack |
58 | mainW->setMaximumWidth( QApplication::desktop()->width() - 10 ); | 58 | mainW->setMaximumWidth( QApplication::desktop()->width() - 10 ); |
59 | 59 | ||
60 | // toplevel layout | 60 | // toplevel layout |
61 | QVBoxLayout *tl = new QVBoxLayout( mainW, 10, 4); | 61 | QVBoxLayout *tl = new QVBoxLayout( mainW, 10, 4); |
62 | 62 | ||
63 | // add grid + frame | 63 | // add grid + frame |
64 | QGridLayout *l1 = new QGridLayout(GRIDROWS, 4); | 64 | QGridLayout *l1 = new QGridLayout(GRIDROWS, 4); |
65 | tl->addLayout(l1); | 65 | tl->addLayout(l1); |
66 | box = new QGroupBox(mainW, "box"); | 66 | box = new QGroupBox(mainW, "box"); |
67 | box->setMargin( 0 ); | 67 | box->setMargin( 0 ); |
68 | l1->addMultiCellWidget(box, row++, GRIDROWS, 0, 3); | 68 | l1->addMultiCellWidget(box, row++, GRIDROWS, 0, 3); |
69 | 69 | ||
70 | // put slider and label into a separate H-Box | 70 | // put slider and label into a separate H-Box |
71 | QHBoxLayout *l2 = new QHBoxLayout; | 71 | QHBoxLayout *l2 = new QHBoxLayout; |
72 | l1->addLayout(l2, row, 2); | 72 | l1->addLayout(l2, row, 2); |
73 | lpreinitslider = new QLabel("MMMM", mainW); | 73 | lpreinitslider = new QLabel("MMMM", mainW); |
74 | FORMATSLIDERLABEL(lpreinitslider); | 74 | FORMATSLIDERLABEL(lpreinitslider); |
75 | 75 | ||
76 | QSlider *preinitslider = new QSlider(0, 300, 1, 0, | 76 | QSlider *preinitslider = new QSlider(0, 600, 1, 0, |
77 | QSlider::Horizontal, mainW); | 77 | QSlider::Horizontal, mainW); |
78 | // preinitslider->setFixedHeight(preinitslider->sizeHint().height()); | 78 | // preinitslider->setFixedHeight(preinitslider->sizeHint().height()); |
79 | connect(preinitslider, SIGNAL(valueChanged(int)), | 79 | connect(preinitslider, SIGNAL(valueChanged(int)), |
80 | lpreinitslider, SLOT(setNum(int))); | 80 | lpreinitslider, SLOT(setNum(int))); |
81 | l2->addWidget(lpreinitslider, 0); | 81 | l2->addWidget(lpreinitslider, 0); |
82 | l2->addWidget(preinitslider, 1); | 82 | l2->addWidget(preinitslider, 1); |
83 | 83 | ||
84 | lpreinit = new QLabel(QObject::tr("Pre-init delay (sec/100):"), mainW); | 84 | lpreinit = new QLabel(QObject::tr("Pre-init delay (sec/100):"), mainW); |
85 | l1->addWidget(lpreinit, row++, 1); | 85 | l1->addWidget(lpreinit, row++, 1); |
86 | 86 | ||
87 | for(int i = 0; i < PPPData::NumInitStrings; i++) { | 87 | for(int i = 0; i < PPPData::NumInitStrings; i++) { |
88 | initstr[i] = new QLineEdit(mainW); | 88 | initstr[i] = new QLineEdit(mainW); |
89 | QLabel *initLabel = new QLabel(QObject::tr("Initialization string %1:").arg(i + 1), | 89 | QLabel *initLabel = new QLabel(QObject::tr("Initialization string %1:").arg(i + 1), |
90 | mainW); | 90 | mainW); |
91 | ADJUSTEDIT(initstr[i]); | 91 | ADJUSTEDIT(initstr[i]); |
92 | l1->addWidget(initLabel, row, 1); | 92 | l1->addWidget(initLabel, row, 1); |
93 | l1->addWidget(initstr[i], row++, 2); | 93 | l1->addWidget(initstr[i], row++, 2); |
94 | } | 94 | } |
95 | 95 | ||
96 | QHBoxLayout *l3 = new QHBoxLayout; | 96 | QHBoxLayout *l3 = new QHBoxLayout; |
97 | l1->addLayout(l3, row, 2); | 97 | l1->addLayout(l3, row, 2); |
98 | linitslider = new QLabel("MMMM", mainW); | 98 | linitslider = new QLabel("MMMM", mainW); |
99 | FORMATSLIDERLABEL(linitslider); | 99 | FORMATSLIDERLABEL(linitslider); |
100 | QSlider *initslider = new QSlider(1, 300, 1, 0, | 100 | QSlider *initslider = new QSlider(1, 300, 1, 0, |
101 | QSlider::Horizontal, mainW); | 101 | QSlider::Horizontal, mainW); |
102 | // initslider->setFixedHeight(initslider->sizeHint().height()); | 102 | // initslider->setFixedHeight(initslider->sizeHint().height()); |
103 | connect(initslider, SIGNAL(valueChanged(int)), | 103 | connect(initslider, SIGNAL(valueChanged(int)), |
104 | linitslider, SLOT(setNum(int))); | 104 | linitslider, SLOT(setNum(int))); |
105 | l3->addWidget(linitslider, 0); | 105 | l3->addWidget(linitslider, 0); |
106 | l3->addWidget(initslider, 1); | 106 | l3->addWidget(initslider, 1); |
107 | 107 | ||
108 | label3 = new QLabel(QObject::tr("Post-init delay (sec/100):"), mainW); | 108 | label3 = new QLabel(QObject::tr("Post-init delay (sec/100):"), mainW); |
109 | l1->addWidget(label3, row++, 1); | 109 | l1->addWidget(label3, row++, 1); |
110 | 110 | ||
111 | /* Set ATS11 (Dial tone duration) between 0-255 (Default ~ 70) */ | 111 | /* Set ATS11 (Dial tone duration) between 0-255 (Default ~ 70) */ |
112 | QHBoxLayout *l4 = new QHBoxLayout; | 112 | QHBoxLayout *l4 = new QHBoxLayout; |
113 | l1->addLayout(l4, row, 2); | 113 | l1->addLayout(l4, row, 2); |
114 | ldurationslider = new QLabel("MMMM", mainW); | 114 | ldurationslider = new QLabel("MMMM", mainW); |
115 | FORMATSLIDERLABEL(ldurationslider); | 115 | FORMATSLIDERLABEL(ldurationslider); |
116 | QSlider *durationslider = new QSlider(1, 255, 1, 0, | 116 | QSlider *durationslider = new QSlider(1, 255, 1, 0, |
117 | QSlider::Horizontal, mainW); | 117 | QSlider::Horizontal, mainW); |
118 | // durationslider->setFixedHeight(durationslider->sizeHint().height()); | 118 | // durationslider->setFixedHeight(durationslider->sizeHint().height()); |
119 | connect(durationslider, SIGNAL(valueChanged(int)), | 119 | connect(durationslider, SIGNAL(valueChanged(int)), |
120 | ldurationslider, SLOT(setNum(int))); | 120 | ldurationslider, SLOT(setNum(int))); |
121 | l4->addWidget(ldurationslider, 0); | 121 | l4->addWidget(ldurationslider, 0); |
122 | l4->addWidget(durationslider, 1); | 122 | l4->addWidget(durationslider, 1); |
123 | 123 | ||
124 | lduration = new QLabel(QObject::tr("Dialing speed (sec/100):"), mainW); | 124 | lduration = new QLabel(QObject::tr("Dialing speed (sec/100):"), mainW); |