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 | |||
@@ -1,268 +1,268 @@ | |||
1 | /* | 1 | /* |
2 | * kPPP: A front end for pppd for the KDE project | 2 | * kPPP: A front end for pppd for the KDE project |
3 | * | 3 | * |
4 | * $Id$ | 4 | * $Id$ |
5 | * | 5 | * |
6 | * Copyright (C) 1997 Bernd Johannes Wuebben | 6 | * Copyright (C) 1997 Bernd Johannes Wuebben |
7 | * wuebben@math.cornell.edu | 7 | * wuebben@math.cornell.edu |
8 | * | 8 | * |
9 | * based on EzPPP: | 9 | * based on EzPPP: |
10 | * Copyright (C) 1997 Jay Painter | 10 | * Copyright (C) 1997 Jay Painter |
11 | * | 11 | * |
12 | * This library is free software; you can redistribute it and/or | 12 | * This library is free software; you can redistribute it and/or |
13 | * modify it under the terms of the GNU Library General Public | 13 | * modify it under the terms of the GNU Library General Public |
14 | * License as published by the Free Software Foundation; either | 14 | * License as published by the Free Software Foundation; either |
15 | * version 2 of the License, or (at your option) any later version. | 15 | * version 2 of the License, or (at your option) any later version. |
16 | * | 16 | * |
17 | * This library is distributed in the hope that it will be useful, | 17 | * This library is distributed in the hope that it will be useful, |
18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
20 | * Library General Public License for more details. | 20 | * Library General Public License for more details. |
21 | * | 21 | * |
22 | * You should have received a copy of the GNU Library General Public | 22 | * You should have received a copy of the GNU Library General Public |
23 | * License along with dummyWidget program; if not, write to the Free | 23 | * License along with dummyWidget program; if not, write to the Free |
24 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 24 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include <qlayout.h> | 27 | #include <qlayout.h> |
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); |
125 | l1->addWidget(lduration, row++, 1); | 125 | l1->addWidget(lduration, row++, 1); |
126 | 126 | ||
127 | 127 | ||
128 | initresp = new QLineEdit(mainW); | 128 | initresp = new QLineEdit(mainW); |
129 | label2 = new QLabel(QObject::tr("Init response:"), mainW); | 129 | label2 = new QLabel(QObject::tr("Init response:"), mainW); |
130 | ADJUSTEDIT(initresp); | 130 | ADJUSTEDIT(initresp); |
131 | l1->addWidget(label2, row, 1); | 131 | l1->addWidget(label2, row, 1); |
132 | l1->addWidget(initresp, row++, 2); | 132 | l1->addWidget(initresp, row++, 2); |
133 | 133 | ||
134 | nodetectdialtone = new QLineEdit(mainW); | 134 | nodetectdialtone = new QLineEdit(mainW); |
135 | lnodetectdialtone = new QLabel(QObject::tr("No dial tone detection:"), mainW); | 135 | lnodetectdialtone = new QLabel(QObject::tr("No dial tone detection:"), mainW); |
136 | ADJUSTEDIT(nodetectdialtone); | 136 | ADJUSTEDIT(nodetectdialtone); |
137 | l1->addWidget(lnodetectdialtone, row, 1); | 137 | l1->addWidget(lnodetectdialtone, row, 1); |
138 | l1->addWidget(nodetectdialtone, row++, 2); | 138 | l1->addWidget(nodetectdialtone, row++, 2); |
139 | 139 | ||
140 | dialstr = new QLineEdit(mainW); | 140 | dialstr = new QLineEdit(mainW); |
141 | label4 = new QLabel(QObject::tr("Dial string:"),mainW); | 141 | label4 = new QLabel(QObject::tr("Dial string:"),mainW); |
142 | ADJUSTEDIT(dialstr); | 142 | ADJUSTEDIT(dialstr); |
143 | l1->addWidget(label4, row, 1); | 143 | l1->addWidget(label4, row, 1); |
144 | l1->addWidget(dialstr, row++, 2); | 144 | l1->addWidget(dialstr, row++, 2); |
145 | 145 | ||
146 | connectresp = new QLineEdit(mainW); | 146 | connectresp = new QLineEdit(mainW); |
147 | label5 = new QLabel(QObject::tr("Connect response:"), mainW); | 147 | label5 = new QLabel(QObject::tr("Connect response:"), mainW); |
148 | ADJUSTEDIT(connectresp); | 148 | ADJUSTEDIT(connectresp); |
149 | l1->addWidget(label5, row, 1); | 149 | l1->addWidget(label5, row, 1); |
150 | l1->addWidget(connectresp, row++, 2); | 150 | l1->addWidget(connectresp, row++, 2); |
151 | 151 | ||
152 | busyresp = new QLineEdit(mainW); | 152 | busyresp = new QLineEdit(mainW); |
153 | label6 = new QLabel(QObject::tr("Busy response:"), mainW); | 153 | label6 = new QLabel(QObject::tr("Busy response:"), mainW); |
154 | ADJUSTEDIT(busyresp); | 154 | ADJUSTEDIT(busyresp); |
155 | l1->addWidget(label6, row, 1); | 155 | l1->addWidget(label6, row, 1); |
156 | l1->addWidget(busyresp, row++, 2); | 156 | l1->addWidget(busyresp, row++, 2); |
157 | 157 | ||
158 | nocarrierresp = new QLineEdit(mainW); | 158 | nocarrierresp = new QLineEdit(mainW); |
159 | label7 = new QLabel(QObject::tr("No carrier response:"), mainW); | 159 | label7 = new QLabel(QObject::tr("No carrier response:"), mainW); |
160 | ADJUSTEDIT(nocarrierresp); | 160 | ADJUSTEDIT(nocarrierresp); |
161 | l1->addWidget(label7, row, 1); | 161 | l1->addWidget(label7, row, 1); |
162 | l1->addWidget(nocarrierresp, row++, 2); | 162 | l1->addWidget(nocarrierresp, row++, 2); |
163 | 163 | ||
164 | nodialtoneresp = new QLineEdit(mainW); | 164 | nodialtoneresp = new QLineEdit(mainW); |
165 | label8 = new QLabel(QObject::tr("No dial tone response:"), mainW); | 165 | label8 = new QLabel(QObject::tr("No dial tone response:"), mainW); |
166 | ADJUSTEDIT(nodialtoneresp); | 166 | ADJUSTEDIT(nodialtoneresp); |
167 | l1->addWidget(label8, row, 1); | 167 | l1->addWidget(label8, row, 1); |
168 | l1->addWidget(nodialtoneresp, row++, 2); | 168 | l1->addWidget(nodialtoneresp, row++, 2); |
169 | 169 | ||
170 | hangupstr = new QLineEdit(mainW); | 170 | hangupstr = new QLineEdit(mainW); |
171 | label9 = new QLabel(QObject::tr("Hangup string:"), mainW); | 171 | label9 = new QLabel(QObject::tr("Hangup string:"), mainW); |
172 | ADJUSTEDIT(hangupstr); | 172 | ADJUSTEDIT(hangupstr); |
173 | l1->addWidget(label9, row, 1); | 173 | l1->addWidget(label9, row, 1); |
174 | l1->addWidget(hangupstr, row++, 2); | 174 | l1->addWidget(hangupstr, row++, 2); |
175 | 175 | ||
176 | hangupresp = new QLineEdit(mainW); | 176 | hangupresp = new QLineEdit(mainW); |
177 | label10 = new QLabel(QObject::tr("Hangup response:"), mainW); | 177 | label10 = new QLabel(QObject::tr("Hangup response:"), mainW); |
178 | ADJUSTEDIT(hangupresp); | 178 | ADJUSTEDIT(hangupresp); |
179 | l1->addWidget(label10, row, 1); | 179 | l1->addWidget(label10, row, 1); |
180 | l1->addWidget(hangupresp, row++, 2); | 180 | l1->addWidget(hangupresp, row++, 2); |
181 | 181 | ||
182 | answerstr = new QLineEdit(mainW); | 182 | answerstr = new QLineEdit(mainW); |
183 | label11 = new QLabel(QObject::tr("Answer string:"), mainW); | 183 | label11 = new QLabel(QObject::tr("Answer string:"), mainW); |
184 | ADJUSTEDIT(answerstr); | 184 | ADJUSTEDIT(answerstr); |
185 | l1->addWidget(label11, row, 1); | 185 | l1->addWidget(label11, row, 1); |
186 | l1->addWidget(answerstr, row++, 2); | 186 | l1->addWidget(answerstr, row++, 2); |
187 | 187 | ||
188 | ringresp = new QLineEdit(mainW); | 188 | ringresp = new QLineEdit(mainW); |
189 | label12 = new QLabel(QObject::tr("Ring response:"), mainW); | 189 | label12 = new QLabel(QObject::tr("Ring response:"), mainW); |
190 | ADJUSTEDIT(ringresp); | 190 | ADJUSTEDIT(ringresp); |
191 | l1->addWidget(label12, row, 1); | 191 | l1->addWidget(label12, row, 1); |
192 | l1->addWidget(ringresp, row++, 2); | 192 | l1->addWidget(ringresp, row++, 2); |
193 | 193 | ||
194 | answerresp = new QLineEdit(mainW); | 194 | answerresp = new QLineEdit(mainW); |
195 | label13 = new QLabel(QObject::tr("Answer response:"), mainW); | 195 | label13 = new QLabel(QObject::tr("Answer response:"), mainW); |
196 | ADJUSTEDIT(answerresp); | 196 | ADJUSTEDIT(answerresp); |
197 | l1->addWidget(label13, row, 1); | 197 | l1->addWidget(label13, row, 1); |
198 | l1->addWidget(answerresp, row++, 2); | 198 | l1->addWidget(answerresp, row++, 2); |
199 | 199 | ||
200 | escapestr = new QLineEdit(mainW); | 200 | escapestr = new QLineEdit(mainW); |
201 | label14 = new QLabel(QObject::tr("Escape string:"), mainW); | 201 | label14 = new QLabel(QObject::tr("Escape string:"), mainW); |
202 | ADJUSTEDIT(escapestr); | 202 | ADJUSTEDIT(escapestr); |
203 | l1->addWidget(label14, row, 1); | 203 | l1->addWidget(label14, row, 1); |
204 | l1->addWidget(escapestr, row++, 2); | 204 | l1->addWidget(escapestr, row++, 2); |
205 | 205 | ||
206 | escaperesp = new QLineEdit(mainW); | 206 | escaperesp = new QLineEdit(mainW); |
207 | label15 = new QLabel(QObject::tr("Escape response:"), mainW); | 207 | label15 = new QLabel(QObject::tr("Escape response:"), mainW); |
208 | ADJUSTEDIT(escaperesp); | 208 | ADJUSTEDIT(escaperesp); |
209 | l1->addWidget(label15, row, 1); | 209 | l1->addWidget(label15, row, 1); |
210 | l1->addWidget(escaperesp, row++, 2); | 210 | l1->addWidget(escaperesp, row++, 2); |
211 | 211 | ||
212 | QHBoxLayout *l5 = new QHBoxLayout; | 212 | QHBoxLayout *l5 = new QHBoxLayout; |
213 | l1->addLayout(l5, row, 2); | 213 | l1->addLayout(l5, row, 2); |
214 | lslider = new QLabel("MMMM", mainW); | 214 | lslider = new QLabel("MMMM", mainW); |
215 | FORMATSLIDERLABEL(lslider); | 215 | FORMATSLIDERLABEL(lslider); |
216 | 216 | ||
217 | QSlider *slider = new QSlider(0, 255, 1, 0, | 217 | QSlider *slider = new QSlider(0, 255, 1, 0, |
218 | QSlider::Horizontal, mainW); | 218 | QSlider::Horizontal, mainW); |
219 | // slider->setFixedHeight(slider->sizeHint().height()); | 219 | // slider->setFixedHeight(slider->sizeHint().height()); |
220 | connect(slider, SIGNAL(valueChanged(int)), | 220 | connect(slider, SIGNAL(valueChanged(int)), |
221 | lslider, SLOT(setNum(int))); | 221 | lslider, SLOT(setNum(int))); |
222 | l5->addWidget(lslider, 0); | 222 | l5->addWidget(lslider, 0); |
223 | l5->addWidget(slider, 1); | 223 | l5->addWidget(slider, 1); |
224 | 224 | ||
225 | label16 = new QLabel(QObject::tr("Guard time (sec/50):"), mainW); | 225 | label16 = new QLabel(QObject::tr("Guard time (sec/50):"), mainW); |
226 | l1->addWidget(label16, row++, 1); | 226 | l1->addWidget(label16, row++, 1); |
227 | 227 | ||
228 | QLabel *l = new QLabel(QObject::tr("Volume off/low/high:"), mainW); | 228 | QLabel *l = new QLabel(QObject::tr("Volume off/low/high:"), mainW); |
229 | l1->addWidget(l, row, 1); | 229 | l1->addWidget(l, row, 1); |
230 | QHBoxLayout *l6 = new QHBoxLayout; | 230 | QHBoxLayout *l6 = new QHBoxLayout; |
231 | l1->addLayout(l6, row++, 2); | 231 | l1->addLayout(l6, row++, 2); |
232 | volume_off = new QLineEdit(mainW); | 232 | volume_off = new QLineEdit(mainW); |
233 | // volume_off->setFixedHeight(volume_off->sizeHint().height()); | 233 | // volume_off->setFixedHeight(volume_off->sizeHint().height()); |
234 | // volume_off->setMinimumWidth((int)(volume_off->sizeHint().width() / 2)); | 234 | // volume_off->setMinimumWidth((int)(volume_off->sizeHint().width() / 2)); |
235 | volume_medium = new QLineEdit(mainW); | 235 | volume_medium = new QLineEdit(mainW); |
236 | // volume_medium->setFixedHeight(volume_medium->sizeHint().height()); | 236 | // volume_medium->setFixedHeight(volume_medium->sizeHint().height()); |
237 | // volume_medium->setMinimumWidth((int)(volume_medium->sizeHint().width() / 2)); | 237 | // volume_medium->setMinimumWidth((int)(volume_medium->sizeHint().width() / 2)); |
238 | volume_high = new QLineEdit(mainW); | 238 | volume_high = new QLineEdit(mainW); |
239 | // volume_high->setFixedHeight(volume_high->sizeHint().height()); | 239 | // volume_high->setFixedHeight(volume_high->sizeHint().height()); |
240 | // volume_high->setMinimumWidth((int)(volume_high->sizeHint().width() / 2)); | 240 | // volume_high->setMinimumWidth((int)(volume_high->sizeHint().width() / 2)); |
241 | l6->addWidget(volume_off); | 241 | l6->addWidget(volume_off); |
242 | l6->addWidget(volume_medium); | 242 | l6->addWidget(volume_medium); |
243 | l6->addWidget(volume_high); | 243 | l6->addWidget(volume_high); |
244 | 244 | ||
245 | initstr[0]->setFocus(); | 245 | initstr[0]->setFocus(); |
246 | 246 | ||
247 | l1->addColSpacing(0, 10); | 247 | l1->addColSpacing(0, 10); |
248 | l1->addColSpacing(3, 10); | 248 | l1->addColSpacing(3, 10); |
249 | l1->addRowSpacing(0, 5); | 249 | l1->addRowSpacing(0, 5); |
250 | l1->addRowSpacing(GRIDROWS, 5); | 250 | l1->addRowSpacing(GRIDROWS, 5); |
251 | 251 | ||
252 | //set stuff from gpppdata | 252 | //set stuff from gpppdata |
253 | preinitslider->setValue(_pppdata->modemPreInitDelay()); | 253 | preinitslider->setValue(_pppdata->modemPreInitDelay()); |
254 | lpreinitslider->setNum(_pppdata->modemPreInitDelay()); | 254 | lpreinitslider->setNum(_pppdata->modemPreInitDelay()); |
255 | for(int i = 0; i < PPPData::NumInitStrings; i++) | 255 | for(int i = 0; i < PPPData::NumInitStrings; i++) |
256 | initstr[i]->setText(_pppdata->modemInitStr(i)); | 256 | initstr[i]->setText(_pppdata->modemInitStr(i)); |
257 | initslider->setValue(_pppdata->modemInitDelay()); | 257 | initslider->setValue(_pppdata->modemInitDelay()); |
258 | linitslider->setNum(_pppdata->modemInitDelay()); | 258 | linitslider->setNum(_pppdata->modemInitDelay()); |
259 | initresp->setText(_pppdata->modemInitResp()); | 259 | initresp->setText(_pppdata->modemInitResp()); |
260 | 260 | ||
261 | durationslider->setValue(_pppdata->modemToneDuration()); | 261 | durationslider->setValue(_pppdata->modemToneDuration()); |
262 | ldurationslider->setNum(_pppdata->modemToneDuration()); | 262 | ldurationslider->setNum(_pppdata->modemToneDuration()); |
263 | 263 | ||
264 | nodetectdialtone->setText(_pppdata->modemNoDialToneDetectionStr()); | 264 | nodetectdialtone->setText(_pppdata->modemNoDialToneDetectionStr()); |
265 | dialstr->setText(_pppdata->modemDialStr()); | 265 | dialstr->setText(_pppdata->modemDialStr()); |
266 | connectresp->setText(_pppdata->modemConnectResp()); | 266 | connectresp->setText(_pppdata->modemConnectResp()); |
267 | busyresp->setText(_pppdata->modemBusyResp()); | 267 | busyresp->setText(_pppdata->modemBusyResp()); |
268 | nocarrierresp->setText(_pppdata->modemNoCarrierResp()); | 268 | nocarrierresp->setText(_pppdata->modemNoCarrierResp()); |