File: prefixdialogbase.cpp

package info (click to toggle)
aethera 0.9.3-7
  • links: PTS
  • area: main
  • in suites: woody
  • size: 8,588 kB
  • ctags: 7,282
  • sloc: cpp: 64,544; sh: 9,913; perl: 1,756; makefile: 1,680; python: 258
file content (303 lines) | stat: -rw-r--r-- 9,292 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
#include <klocale.h>
/****************************************************************************
** Form implementation generated from reading ui file './prefixdialogbase.ui'
**
** Created: Sat Jul 14 05:38:16 2001
**      by:  The User Interface Compiler (uic)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#include "prefixdialogbase.h"

#include <qcheckbox.h>
#include <qcombobox.h>
#include <qgroupbox.h>
#include <qlabel.h>
#include <qlineedit.h>
#include <qpushbutton.h>
#include <qlayout.h>
#include <qvariant.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include <qimage.h>
#include <qpixmap.h>

static const char* const image0_data[] = { 
"16 20 113 2",
"Qt c None",
".a c #000000",
"#U c #110300",
"#T c #120300",
"#S c #130300",
"#R c #140300",
"#Q c #150200",
"#P c #160300",
"#O c #160400",
"#N c #170400",
".b c #222222",
".r c #280700",
".q c #280800",
"#g c #2d0800",
".C c #310900",
".x c #370c00",
".8 c #420c00",
".Q c #430b00",
".0 c #470c00",
".P c #470d00",
".Z c #4b0d00",
".R c #520e00",
".I c #531200",
".H c #531300",
".S c #5d1200",
".G c #6e1800",
".J c #7d0f00",
".O c #7e0d00",
".5 c #828f8a",
"#m c #868485",
".B c #971300",
".A c #9d0a00",
".y c #9d1200",
".z c #a40e00",
"#L c #a61d00",
"#C c #a71d00",
".m c #a81d00",
"#d c #aa8f87",
"#K c #ad1e00",
"#B c #b01e00",
".l c #b31f00",
".X c #b47172",
"#q c #b52000",
"#A c #b82000",
"#f c #ba2100",
"#r c #bb2000",
"#n c #bbaba2",
"#J c #bd2100",
"#p c #be2100",
"#o c #bf5851",
".6 c #bf8984",
"## c #c0c5c0",
".k c #c12200",
"#y c #c25852",
"#I c #c42302",
"#e c #c52200",
"#b c #c6c0b1",
".v c #c82300",
"#c c #c8c5b6",
"#x c #c99c91",
"#H c #cb2704",
".j c #ce2400",
"#z c #cf1f05",
"#G c #d32804",
".F c #d52500",
".u c #d62500",
".V c #d6eaf1",
"#F c #d92803",
"#w c #d9a89c",
".e c #dd3100",
".d c #dd3200",
".c c #dd3300",
"#E c #de2700",
".3 c #dfe9eb",
"#D c #e12700",
".E c #e22700",
".7 c #e32800",
"#M c #e4e4e4",
".t c #e52800",
".L c #e87e66",
"#t c #ea2900",
"#l c #ebe2d2",
"#s c #ec2900",
"#v c #ef6d64",
".i c #f02a00",
".D c #f12a00",
".h c #f22d00",
".g c #f22f00",
".f c #f23200",
"#i c #f92b00",
"#h c #fb2b00",
".4 c #fcf6dd",
"#a c #fcfce5",
"#u c #fe2706",
".9 c #ff2e00",
".s c #ff2f00",
".1 c #ff3700",
".o c #ff3b00",
".n c #ff3d00",
".w c #ff3e00",
".p c #ff3f00",
".Y c #ff4b35",
".N c #ff5439",
".K c #ff714f",
".T c #ff7453",
"#j c #ff7e6f",
".M c #ff8e6c",
".U c #ffe3e0",
".2 c #ffe7e3",
"#. c #fff0ef",
"#k c #fff4e4",
".W c #fff8e6",
".# c #ffffff",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQt.#.#.#.#.#.#.#.#.#.#.#.#QtQt",
"Qt.#.a.a.a.a.a.a.a.a.a.a.a.a.#Qt",
".#.b.c.c.d.e.f.g.h.i.j.k.l.m.b.#",
".#.a.n.n.o.p.q.q.r.r.s.t.u.v.a.#",
".#.a.p.p.w.x.y.z.A.B.C.D.E.F.a.#",
"Qt.#.G.H.I.J.K.L.M.N.O.P.Q.R.#Qt",
"Qt.#.a.S.S.T.U.V.W.X.Y.Z.0.a.#Qt",
"Qt.#.a.1.1.2.3Qt.4.5.6.7.u.a.#Qt",
"Qt.#.8.9.9#.###a#b#c#d#e#f#g.#Qt",
".#.a.s#h#i#j#k#l#m#n#o#p#q#r.a.#",
".#.a#s#s#t#u#v#w#x#y#z#A#B#C.a.#",
".#.a.7.7#D#E#F#G#H#I#J#q#K#L.a.#",
".##M#N#N#N#O#P#Q#Q#R#S#T#T#U#M.#",
"Qt.#.#.#.#.#.#.#.#.#.#.#.#.#.#Qt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt"};


/* 
 *  Constructs a PrefixDialogBase which is a child of 'parent', with the 
 *  name 'name' and widget flags set to 'f' 
 *
 *  The dialog will by default be modeless, unless you set 'modal' to
 *  TRUE to construct a modal dialog.
 */
PrefixDialogBase::PrefixDialogBase( QWidget* parent,  const char* name, bool modal, WFlags fl )
    : QDialog( parent, name, modal, fl )
{
    QPixmap image0( ( const char** ) image0_data );
    if ( !name )
	setName( "PrefixDialogBase" );
    resize( 491, 216 ); 
    QFont f( font() );
    f.setPointSize( 10 );
    setFont( f ); 
    setCaption( i18n( "Phone details" ) );
    setSizeGripEnabled( TRUE );
    setBackgroundOrigin( QDialog::ParentOrigin );
    setFocusPolicy( QDialog::TabFocus );
    setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, sizePolicy().hasHeightForWidth() ) );
    QWhatsThis::add(  this, i18n( "Format your phone number to be <b>I</b>nternational <b>D</b>ialing <b>C</b>odes compliant. This helps you to dial it from <i>any</i> point in the world." ) );

    cancelButton = new QPushButton( this, "cancelButton" );
    cancelButton->setGeometry( QRect( 400, 185, 81, 26 ) ); 
    cancelButton->setText( i18n( "&Cancel" ) );
    QWhatsThis::add(  cancelButton, i18n( "Click to cancel your selection and leave the phone number intact." ) );

    okButton = new QPushButton( this, "okButton" );
    okButton->setGeometry( QRect( 310, 185, 81, 26 ) ); 
    okButton->setText( i18n( "&Ok" ) );
    okButton->setFlat( FALSE );
    okButton->setDefault( TRUE );
    QWhatsThis::add(  okButton, i18n( "Click if you have made your choice." ) );

    TextLabel4 = new QLabel( this, "TextLabel4" );
    TextLabel4->setGeometry( QRect( 10, 5, 30, 25 ) ); 
    TextLabel4->setText( i18n( "Type:" ) );

    GroupBox = new QGroupBox( this, "GroupBox" );
    GroupBox->setGeometry( QRect( 10, 40, 470, 135 ) ); 
    GroupBox->setTitle( i18n( "Phone details:" ) );

    TextLabel2 = new QLabel( GroupBox, "TextLabel2" );
    TextLabel2->setGeometry( QRect( 5, 55, 55, 25 ) ); 
    TextLabel2->setText( i18n( "Area code:" ) );

    TextLabel1 = new QLabel( GroupBox, "TextLabel1" );
    TextLabel1->setGeometry( QRect( 5, 25, 55, 25 ) ); 
    TextLabel1->setText( i18n( "Prefix:" ) );

    TextLabel3 = new QLabel( GroupBox, "TextLabel3" );
    TextLabel3->setGeometry( QRect( 5, 85, 70, 25 ) ); 
    TextLabel3->setText( i18n( "Local number:" ) );

    countriesBox = new QComboBox( FALSE, GroupBox, "countriesBox" );
    countriesBox->setGeometry( QRect( 175, 25, 290, 25 ) ); 
    QWhatsThis::add(  countriesBox, i18n( "Choose the <b>country</b> for which you need the prefix." ) );

    numberEdit = new QLineEdit( GroupBox, "numberEdit" );
    numberEdit->setGeometry( QRect( 75, 85, 100, 25 ) ); 
    QWhatsThis::add(  numberEdit, i18n( "Use <i>this</i> to edit your phone number." ) );

    areaEdit = new QLineEdit( GroupBox, "areaEdit" );
    areaEdit->setGeometry( QRect( 75, 55, 100, 25 ) ); 
    QWhatsThis::add(  areaEdit, i18n( "Type the <b>city</b> or <b>area</b> code inhere." ) );

    prefixLabel = new QLabel( GroupBox, "prefixLabel" );
    prefixLabel->setGeometry( QRect( 75, 25, 95, 25 ) ); 
    prefixLabel->setText( i18n( "" ) );
    prefixLabel->setFrameShape( QLabel::Box );
    prefixLabel->setFrameShadow( QLabel::Sunken );
    prefixLabel->setAlignment( int( QLabel::AlignCenter ) );
    QWhatsThis::add(  prefixLabel, i18n( "This shows the prefix associated to your country selection." ) );

    typeLabel = new QLabel( this, "typeLabel" );
    typeLabel->setGeometry( QRect( 40, 10, 16, 16 ) ); 
    typeLabel->setPixmap( image0 );
    typeLabel->setScaledContents( FALSE );
    typeLabel->setAlignment( int( QLabel::AlignCenter ) );

    phoneNumberLabel = new QLabel( this, "phoneNumberLabel" );
    phoneNumberLabel->setGeometry( QRect( 100, 5, 285, 26 ) ); 
    phoneNumberLabel->setText( i18n( "" ) );
    phoneNumberLabel->setFrameShadow( QLabel::Sunken );
    phoneNumberLabel->setFrameShape( QLabel::Box );
    phoneNumberLabel->setAlignment( int( QLabel::AlignCenter ) );
    QWhatsThis::add(  phoneNumberLabel, i18n( "This is the phone number which will be stored." ) );

    showDialogBox = new QCheckBox( this, "showDialogBox" );
    showDialogBox->setGeometry( QRect( 10, 185, 170, 20 ) ); 
    showDialogBox->setText( i18n( "Don't show this dialog again." ) );

    // signals and slots connections
    connect( countriesBox, SIGNAL( activated(const QString&) ), this, SLOT( countrySelected(const QString &) ) );
    connect( okButton, SIGNAL( clicked() ), this, SLOT( okClicked() ) );
    connect( cancelButton, SIGNAL( clicked() ), this, SLOT( cancelClicked() ) );
    connect( numberEdit, SIGNAL( textChanged(const QString&) ), this, SLOT( numberChanged(const QString &) ) );
    connect( areaEdit, SIGNAL( textChanged(const QString&) ), this, SLOT( areaChanged(const QString &) ) );
    connect( showDialogBox, SIGNAL( toggled(bool) ), this, SLOT( showDialog(bool) ) );
}

/*  
 *  Destroys the object and frees any allocated resources
 */
PrefixDialogBase::~PrefixDialogBase()
{
    // no need to delete child widgets, Qt does it all for us
}

void PrefixDialogBase::areaChanged(const QString &)
{
    qWarning( "PrefixDialogBase::areaChanged(const QString &): Not implemented yet!" );
}

void PrefixDialogBase::cancelClicked()
{
    qWarning( "PrefixDialogBase::cancelClicked(): Not implemented yet!" );
}

void PrefixDialogBase::countrySelected(const QString &)
{
    qWarning( "PrefixDialogBase::countrySelected(const QString &): Not implemented yet!" );
}

void PrefixDialogBase::numberChanged(const QString &)
{
    qWarning( "PrefixDialogBase::numberChanged(const QString &): Not implemented yet!" );
}

void PrefixDialogBase::okClicked()
{
    qWarning( "PrefixDialogBase::okClicked(): Not implemented yet!" );
}

void PrefixDialogBase::showDialog(bool)
{
    qWarning( "PrefixDialogBase::showDialog(bool): Not implemented yet!" );
}

#include "prefixdialogbase.moc"