summaryrefslogtreecommitdiff
path: root/core/pim/addressbook
authoralwin <alwin>2004-03-02 12:14:15 (UTC)
committer alwin <alwin>2004-03-02 12:14:15 (UTC)
commit0d59c780513da78033f4d9040475dee9db0256d4 (patch) (unidiff)
tree503d320b4aa3daae9982082e7b34e3e2c48bdfb7 /core/pim/addressbook
parenta0981652d61776d70f25980f035748b21339e946 (diff)
downloadopie-0d59c780513da78033f4d9040475dee9db0256d4.zip
opie-0d59c780513da78033f4d9040475dee9db0256d4.tar.gz
opie-0d59c780513da78033f4d9040475dee9db0256d4.tar.bz2
run the optimize_connect script
the whole cvs is tagged with "before_optimize_connect" if there are problems you can check the diff (but it had compiled and run here)
Diffstat (limited to 'core/pim/addressbook') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/abtable.cpp2
-rw-r--r--core/pim/addressbook/abview.cpp8
-rw-r--r--core/pim/addressbook/addressbook.cpp20
-rw-r--r--core/pim/addressbook/contacteditor.cpp60
4 files changed, 45 insertions, 45 deletions
diff --git a/core/pim/addressbook/abtable.cpp b/core/pim/addressbook/abtable.cpp
index f7bff58..29f4383 100644
--- a/core/pim/addressbook/abtable.cpp
+++ b/core/pim/addressbook/abtable.cpp
@@ -114,33 +114,33 @@ void AbPickItem::setContentFromEditor( QWidget *w )
114*/ 114*/
115 115
116AbTable::AbTable( const QValueList<int> order, QWidget *parent, const char *name ) 116AbTable::AbTable( const QValueList<int> order, QWidget *parent, const char *name )
117 : QTable( parent, name ), 117 : QTable( parent, name ),
118 lastSortCol( -1 ), 118 lastSortCol( -1 ),
119 asc( TRUE ), 119 asc( TRUE ),
120 intFields( order ), 120 intFields( order ),
121 enablePainting( true ), 121 enablePainting( true ),
122 columnVisible( true ), 122 columnVisible( true ),
123 countNested( 0 ) 123 countNested( 0 )
124{ 124{
125 //qWarning("C'tor start"); 125 //qWarning("C'tor start");
126 126
127 setSelectionMode( NoSelection ); 127 setSelectionMode( NoSelection );
128 init(); 128 init();
129 setSorting( TRUE ); 129 setSorting( TRUE );
130 connect( this, SIGNAL(clicked(int,int,int,const QPoint &)), 130 connect( this, SIGNAL(clicked(int,int,int,const QPoint&)),
131 this, SLOT(itemClicked(int,int)) ); 131 this, SLOT(itemClicked(int,int)) );
132 132
133 // contactList.clear(); 133 // contactList.clear();
134 //qWarning("C'tor end"); 134 //qWarning("C'tor end");
135} 135}
136 136
137AbTable::~AbTable() 137AbTable::~AbTable()
138{ 138{
139} 139}
140 140
141void AbTable::init() 141void AbTable::init()
142{ 142{
143 // :SX showChar = '\0'; 143 // :SX showChar = '\0';
144 setNumRows( 0 ); 144 setNumRows( 0 );
145 setNumCols( 2 ); 145 setNumCols( 2 );
146 146
diff --git a/core/pim/addressbook/abview.cpp b/core/pim/addressbook/abview.cpp
index 670cdb0..8d61582 100644
--- a/core/pim/addressbook/abview.cpp
+++ b/core/pim/addressbook/abview.cpp
@@ -64,36 +64,36 @@ AbView::AbView ( QWidget* parent, const QValueList<int>& ordered ):
64 64
65 // Creat TableView 65 // Creat TableView
66 QVBox* tableBox = new QVBox( m_viewStack ); 66 QVBox* tableBox = new QVBox( m_viewStack );
67 m_abTable = new AbTable( m_orderedFields, tableBox, "table" ); 67 m_abTable = new AbTable( m_orderedFields, tableBox, "table" );
68 m_abTable->setCurrentCell( 0, 0 ); 68 m_abTable->setCurrentCell( 0, 0 );
69 m_abTable->setFocus(); 69 m_abTable->setFocus();
70 70
71 // Add TableView to WidgetStack and raise it 71 // Add TableView to WidgetStack and raise it
72 m_viewStack -> addWidget( tableBox , TableView ); 72 m_viewStack -> addWidget( tableBox , TableView );
73 73
74 // Create CardView and add it to WidgetStack 74 // Create CardView and add it to WidgetStack
75 QVBox* cardBox = new QVBox( m_viewStack ); 75 QVBox* cardBox = new QVBox( m_viewStack );
76 m_ablabel = new AbLabel( cardBox, "CardView"); 76 m_ablabel = new AbLabel( cardBox, "CardView");
77 m_viewStack -> addWidget( cardBox , CardView ); 77 m_viewStack -> addWidget( cardBox , CardView );
78 78
79 // Connect views to me 79 // Connect views to me
80 connect ( m_abTable, SIGNAL( signalSwitch( void ) ), 80 connect ( m_abTable, SIGNAL( signalSwitch(void) ),
81 this, SLOT( slotSwitch( void ) ) ); 81 this, SLOT( slotSwitch(void) ) );
82 connect ( m_ablabel, SIGNAL( signalOkPressed( void ) ), 82 connect ( m_ablabel, SIGNAL( signalOkPressed(void) ),
83 this, SLOT( slotSwitch( void ) ) ); 83 this, SLOT( slotSwitch(void) ) );
84 84
85 load(); 85 load();
86} 86}
87 87
88AbView::~AbView() 88AbView::~AbView()
89{ 89{
90 m_contactdb -> save(); 90 m_contactdb -> save();
91 delete m_contactdb; 91 delete m_contactdb;
92 92
93 if ( m_storedDB ){ 93 if ( m_storedDB ){
94 m_storedDB -> save(); 94 m_storedDB -> save();
95 delete m_storedDB; 95 delete m_storedDB;
96 } 96 }
97} 97}
98 98
99 99
diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp
index 9cf55b3..8a5f9d5 100644
--- a/core/pim/addressbook/addressbook.cpp
+++ b/core/pim/addressbook/addressbook.cpp
@@ -122,55 +122,55 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name,
122 connect( a, SIGNAL( activated() ), this, SLOT( slotViewEdit() ) ); 122 connect( a, SIGNAL( activated() ), this, SLOT( slotViewEdit() ) );
123 a->addTo( edit ); 123 a->addTo( edit );
124 a->addTo( listTools ); 124 a->addTo( listTools );
125 125
126 a = new QAction( tr( "Delete" ), Resource::loadPixmap( "trash" ), QString::null, 126 a = new QAction( tr( "Delete" ), Resource::loadPixmap( "trash" ), QString::null,
127 0, this, 0 ); 127 0, this, 0 );
128 actionTrash = a; 128 actionTrash = a;
129 connect( a, SIGNAL( activated() ), this, SLOT( slotListDelete() ) ); 129 connect( a, SIGNAL( activated() ), this, SLOT( slotListDelete() ) );
130 a->addTo( edit ); 130 a->addTo( edit );
131 a->addTo( listTools ); 131 a->addTo( listTools );
132 132
133 133
134 // make it possible to go directly to businesscard via qcop call 134 // make it possible to go directly to businesscard via qcop call
135 //#if defined(Q_WS_QWS) // Why this ? (se) 135 //#if defined(Q_WS_QWS) // Why this ? (se)
136#if !defined(QT_NO_COP) 136#if !defined(QT_NO_COP)
137 QCopChannel *addressChannel = new QCopChannel("QPE/Addressbook" , this ); 137 QCopChannel *addressChannel = new QCopChannel("QPE/Addressbook" , this );
138 connect (addressChannel, SIGNAL( received(const QCString &, const QByteArray &)), 138 connect (addressChannel, SIGNAL( received(const QCString&,const QByteArray&)),
139 this, SLOT ( appMessage(const QCString &, const QByteArray &) ) ); 139 this, SLOT ( appMessage(const QCString&,const QByteArray&) ) );
140#endif 140#endif
141 // #endif 141 // #endif
142 a = new QAction( tr( "Find" ), Resource::loadPixmap( "mag" ), 142 a = new QAction( tr( "Find" ), Resource::loadPixmap( "mag" ),
143 QString::null, 0, this, 0 ); 143 QString::null, 0, this, 0 );
144 actionFind = a; 144 actionFind = a;
145 connect( a, SIGNAL(activated()), this, SLOT( slotFindOpen()) ); 145 connect( a, SIGNAL(activated()), this, SLOT( slotFindOpen()) );
146 a->addTo( edit ); 146 a->addTo( edit );
147 a->addTo( listTools ); 147 a->addTo( listTools );
148 148
149 // Much better search widget, taken from QTReader.. (se) 149 // Much better search widget, taken from QTReader.. (se)
150 searchBar = new OFloatBar( "Search", this, QMainWindow::Top, TRUE ); 150 searchBar = new OFloatBar( "Search", this, QMainWindow::Top, TRUE );
151 searchBar->setHorizontalStretchable( TRUE ); 151 searchBar->setHorizontalStretchable( TRUE );
152 searchBar->hide(); 152 searchBar->hide();
153 searchEdit = new QLineEdit( searchBar, "searchEdit" ); 153 searchEdit = new QLineEdit( searchBar, "searchEdit" );
154 154
155 // QFont f("unifont", 16 /*, QFont::Bold*/); 155 // QFont f("unifont", 16 /*, QFont::Bold*/);
156 // searchEdit->setFont( f ); 156 // searchEdit->setFont( f );
157 157
158 searchBar->setStretchableWidget( searchEdit ); 158 searchBar->setStretchableWidget( searchEdit );
159 connect( searchEdit, SIGNAL( returnPressed( ) ), 159 connect( searchEdit, SIGNAL( returnPressed() ),
160 this, SLOT( slotFind( ) ) ); 160 this, SLOT( slotFind() ) );
161 161
162 a = new QAction( tr( "Start Search" ), Resource::loadPixmap( "enter" ), QString::null, 0, this, 0 ); 162 a = new QAction( tr( "Start Search" ), Resource::loadPixmap( "enter" ), QString::null, 0, this, 0 );
163 connect( a, SIGNAL( activated() ), this, SLOT( slotFind() ) ); 163 connect( a, SIGNAL( activated() ), this, SLOT( slotFind() ) );
164 a->addTo( searchBar ); 164 a->addTo( searchBar );
165 165
166 a = new QAction( tr( "Close Find" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 ); 166 a = new QAction( tr( "Close Find" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 );
167 connect( a, SIGNAL( activated() ), this, SLOT( slotFindClose() ) ); 167 connect( a, SIGNAL( activated() ), this, SLOT( slotFindClose() ) );
168 a->addTo( searchBar ); 168 a->addTo( searchBar );
169 169
170 a = new QAction( tr( "Write Mail To" ), Resource::loadPixmap( "addressbook/sendmail" ), 170 a = new QAction( tr( "Write Mail To" ), Resource::loadPixmap( "addressbook/sendmail" ),
171 QString::null, 0, this, 0 ); 171 QString::null, 0, this, 0 );
172 //a->setEnabled( FALSE ); we got support for it now :) zecke 172 //a->setEnabled( FALSE ); we got support for it now :) zecke
173 actionMail = a; 173 actionMail = a;
174 connect( a, SIGNAL( activated() ), this, SLOT( writeMail() ) ); 174 connect( a, SIGNAL( activated() ), this, SLOT( writeMail() ) );
175 a->addTo( edit ); 175 a->addTo( edit );
176 a->addTo( listTools ); 176 a->addTo( listTools );
@@ -213,62 +213,62 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name,
213 a = new QAction( tr( "Save all Data"), QString::null, 0, 0 ); 213 a = new QAction( tr( "Save all Data"), QString::null, 0, 0 );
214 connect( a, SIGNAL( activated() ), this , SLOT( slotSave() ) ); 214 connect( a, SIGNAL( activated() ), this , SLOT( slotSave() ) );
215 a->addTo( edit ); 215 a->addTo( edit );
216#endif 216#endif
217 a = new QAction( tr( "Config" ), Resource::loadPixmap( "SettingsIcon" ), QString::null, 217 a = new QAction( tr( "Config" ), Resource::loadPixmap( "SettingsIcon" ), QString::null,
218 0, this, 0 ); 218 0, this, 0 );
219 connect( a, SIGNAL( activated() ), this, SLOT( slotConfig() ) ); 219 connect( a, SIGNAL( activated() ), this, SLOT( slotConfig() ) );
220 a->addTo( edit ); 220 a->addTo( edit );
221 221
222 // Create Views 222 // Create Views
223 listContainer = new QWidget( this ); 223 listContainer = new QWidget( this );
224 QVBoxLayout *vb = new QVBoxLayout( listContainer ); 224 QVBoxLayout *vb = new QVBoxLayout( listContainer );
225 225
226 m_abView = new AbView( listContainer, m_config.orderList() ); 226 m_abView = new AbView( listContainer, m_config.orderList() );
227 vb->addWidget( m_abView ); 227 vb->addWidget( m_abView );
228 // abList->setHScrollBarMode( QScrollView::AlwaysOff ); 228 // abList->setHScrollBarMode( QScrollView::AlwaysOff );
229 connect( m_abView, SIGNAL( signalViewSwitched ( int ) ), 229 connect( m_abView, SIGNAL( signalViewSwitched(int) ),
230 this, SLOT( slotViewSwitched( int ) ) ); 230 this, SLOT( slotViewSwitched(int) ) );
231 231
232 232
233 QObject::connect( m_abView, SIGNAL(signalNotFound()), this, SLOT(slotNotFound()) ); 233 QObject::connect( m_abView, SIGNAL(signalNotFound()), this, SLOT(slotNotFound()) );
234 234
235 // m_abView->load(); // Already done by c'tor . 235 // m_abView->load(); // Already done by c'tor .
236 236
237 // Letter Picker 237 // Letter Picker
238 pLabel = new LetterPicker( listContainer ); 238 pLabel = new LetterPicker( listContainer );
239 connect(pLabel, SIGNAL(letterClicked(char)), this, SLOT(slotSetLetter(char))); 239 connect(pLabel, SIGNAL(letterClicked(char)), this, SLOT(slotSetLetter(char)));
240 connect(m_abView, SIGNAL( signalClearLetterPicker() ), pLabel, SLOT( clear() ) ); 240 connect(m_abView, SIGNAL( signalClearLetterPicker() ), pLabel, SLOT( clear() ) );
241 241
242 vb->addWidget( pLabel ); 242 vb->addWidget( pLabel );
243 243
244 // All Categories into view-menu.. 244 // All Categories into view-menu..
245 populateCategories(); 245 populateCategories();
246 246
247 // Fontsize 247 // Fontsize
248 defaultFont = new QFont( m_abView->font() ); 248 defaultFont = new QFont( m_abView->font() );
249 slotSetFont(m_config.fontSize()); 249 slotSetFont(m_config.fontSize());
250 m_curFontSize = m_config.fontSize(); 250 m_curFontSize = m_config.fontSize();
251 251
252 setCentralWidget(listContainer); 252 setCentralWidget(listContainer);
253 253
254 // qDebug("adressbook contrsuction: t=%d", t.elapsed() ); 254 // qDebug("adressbook contrsuction: t=%d", t.elapsed() );
255 connect( qApp, SIGNAL( flush() ), this, SLOT( flush() ) ); 255 connect( qApp, SIGNAL( flush() ), this, SLOT( flush() ) );
256 connect( qApp, SIGNAL( reload() ), this, SLOT( reload() ) ); 256 connect( qApp, SIGNAL( reload() ), this, SLOT( reload() ) );
257 connect( qApp, SIGNAL( appMessage(const QCString &, const QByteArray &) ), 257 connect( qApp, SIGNAL( appMessage(const QCString&,const QByteArray&) ),
258 this, SLOT( appMessage(const QCString &, const QByteArray &) ) ); 258 this, SLOT( appMessage(const QCString&,const QByteArray&) ) );
259 259
260 260
261 isLoading = false; 261 isLoading = false;
262} 262}
263 263
264 264
265void AddressbookWindow::slotConfig() 265void AddressbookWindow::slotConfig()
266{ 266{
267 ConfigDlg* dlg = new ConfigDlg( this, "Config" ); 267 ConfigDlg* dlg = new ConfigDlg( this, "Config" );
268 dlg -> setConfig( m_config ); 268 dlg -> setConfig( m_config );
269 if ( QPEApplication::execDialog( dlg ) ) { 269 if ( QPEApplication::execDialog( dlg ) ) {
270 qWarning ("Config Dialog accepted!"); 270 qWarning ("Config Dialog accepted!");
271 m_config = dlg -> getConfig(); 271 m_config = dlg -> getConfig();
272 if ( m_curFontSize != m_config.fontSize() ){ 272 if ( m_curFontSize != m_config.fontSize() ){
273 qWarning("Font was changed!"); 273 qWarning("Font was changed!");
274 m_curFontSize = m_config.fontSize(); 274 m_curFontSize = m_config.fontSize();
@@ -582,33 +582,33 @@ void AddressbookWindow::slotBeam()
582 unlink( beamfile ); // delete if exists 582 unlink( beamfile ); // delete if exists
583 mkdir("/tmp/obex/", 0755); 583 mkdir("/tmp/obex/", 0755);
584 c = m_abView -> currentEntry(); 584 c = m_abView -> currentEntry();
585 OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null, 585 OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null,
586 beamfile ); 586 beamfile );
587 OContactAccess* access = new OContactAccess ( "addressbook", QString::null , vcard_backend, true ); 587 OContactAccess* access = new OContactAccess ( "addressbook", QString::null , vcard_backend, true );
588 access->add( c ); 588 access->add( c );
589 access->save(); 589 access->save();
590 delete access; 590 delete access;
591 591
592 beamFilename = beamfile; 592 beamFilename = beamfile;
593 } 593 }
594 594
595 qWarning("Beaming: %s", beamFilename.latin1() ); 595 qWarning("Beaming: %s", beamFilename.latin1() );
596 596
597 Ir *ir = new Ir( this ); 597 Ir *ir = new Ir( this );
598 connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) ); 598 connect( ir, SIGNAL( done(Ir*) ), this, SLOT( beamDone(Ir*) ) );
599 QString description = c.fullName(); 599 QString description = c.fullName();
600 ir->send( beamFilename, description, "text/x-vCard" ); 600 ir->send( beamFilename, description, "text/x-vCard" );
601} 601}
602 602
603void AddressbookWindow::beamDone( Ir *ir ) 603void AddressbookWindow::beamDone( Ir *ir )
604{ 604{
605 605
606 delete ir; 606 delete ir;
607 unlink( beamfile ); 607 unlink( beamfile );
608} 608}
609 609
610 610
611static void parseName( const QString& name, QString *first, QString *middle, 611static void parseName( const QString& name, QString *first, QString *middle,
612 QString * last ) 612 QString * last )
613{ 613{
614 614
@@ -660,33 +660,33 @@ void AddressbookWindow::appMessage(const QCString &msg, const QByteArray &data)
660 cnt.setMiddleName( mn ); 660 cnt.setMiddleName( mn );
661 cnt.setLastName( ln ); 661 cnt.setLastName( ln );
662 cnt.insertEmails( email ); 662 cnt.insertEmails( email );
663 cnt.setDefaultEmail( email ); 663 cnt.setDefaultEmail( email );
664 cnt.setFileAs(); 664 cnt.setFileAs();
665 665
666 m_abView -> addEntry( cnt ); 666 m_abView -> addEntry( cnt );
667 667
668 // :SXm_abView()->init( cnt ); 668 // :SXm_abView()->init( cnt );
669 editEntry( EditEntry ); 669 editEntry( EditEntry );
670 } else if ( msg == "beamBusinessCard()" ) { 670 } else if ( msg == "beamBusinessCard()" ) {
671 QString beamFilename = addressbookPersonalVCardName(); 671 QString beamFilename = addressbookPersonalVCardName();
672 if ( !QFile::exists( beamFilename ) ) 672 if ( !QFile::exists( beamFilename ) )
673 return; // can't beam a non-existent file 673 return; // can't beam a non-existent file
674 674
675 Ir *ir = new Ir( this ); 675 Ir *ir = new Ir( this );
676 connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) ); 676 connect( ir, SIGNAL( done(Ir*) ), this, SLOT( beamDone(Ir*) ) );
677 QString description = "mycard.vcf"; 677 QString description = "mycard.vcf";
678 ir->send( beamFilename, description, "text/x-vCard" ); 678 ir->send( beamFilename, description, "text/x-vCard" );
679 } else if ( msg == "show(int)" ) { 679 } else if ( msg == "show(int)" ) {
680 raise(); 680 raise();
681 QDataStream stream(data,IO_ReadOnly); 681 QDataStream stream(data,IO_ReadOnly);
682 int uid; 682 int uid;
683 stream >> uid; 683 stream >> uid;
684 684
685 qWarning( "Showing uid: %d" , uid ); 685 qWarning( "Showing uid: %d" , uid );
686 686
687 // Deactivate Personal View.. 687 // Deactivate Personal View..
688 if ( actionPersonal->isOn() ){ 688 if ( actionPersonal->isOn() ){
689 actionPersonal->setOn( false ); 689 actionPersonal->setOn( false );
690 slotPersonalView(); 690 slotPersonalView();
691 } 691 }
692 692
diff --git a/core/pim/addressbook/contacteditor.cpp b/core/pim/addressbook/contacteditor.cpp
index b1eb042..8acf570 100644
--- a/core/pim/addressbook/contacteditor.cpp
+++ b/core/pim/addressbook/contacteditor.cpp
@@ -522,58 +522,58 @@ void ContactEditor::init() {
522 gl->addWidget( l, counter, 0 ); 522 gl->addWidget( l, counter, 0 );
523 523
524 QPopupMenu* m1 = new QPopupMenu( container ); 524 QPopupMenu* m1 = new QPopupMenu( container );
525 birthdayPicker = new DateBookMonth( m1, 0, TRUE ); 525 birthdayPicker = new DateBookMonth( m1, 0, TRUE );
526 m1->insertItem( birthdayPicker ); 526 m1->insertItem( birthdayPicker );
527 527
528 birthdayButton= new QToolButton( hBox, "buttonStart" ); 528 birthdayButton= new QToolButton( hBox, "buttonStart" );
529 birthdayButton->setPopup( m1 ); 529 birthdayButton->setPopup( m1 );
530 birthdayButton->setPopupDelay(0); 530 birthdayButton->setPopupDelay(0);
531 531
532 QPushButton* deleteButton = new QPushButton( QIconSet( Resource::loadPixmap( "trash" ) ), 532 QPushButton* deleteButton = new QPushButton( QIconSet( Resource::loadPixmap( "trash" ) ),
533 tr( "Delete" ), 533 tr( "Delete" ),
534 hBox, 0 ); 534 hBox, 0 );
535 535
536 gl->addWidget( hBox, counter , 1 ); 536 gl->addWidget( hBox, counter , 1 );
537 537
538 connect( birthdayPicker, SIGNAL( dateClicked( int, int, int ) ), 538 connect( birthdayPicker, SIGNAL( dateClicked(int,int,int) ),
539 this, SLOT( slotBirthdayDateChanged( int, int, int ) ) ); 539 this, SLOT( slotBirthdayDateChanged(int,int,int) ) );
540 connect( deleteButton, SIGNAL( clicked() ), this, SLOT( slotRemoveBirthday() ) ); 540 connect( deleteButton, SIGNAL( clicked() ), this, SLOT( slotRemoveBirthday() ) );
541 541
542 ++counter; 542 ++counter;
543 543
544 // Anniversary 544 // Anniversary
545 hBox = new QHBox( container ); 545 hBox = new QHBox( container );
546 l = new QLabel( tr("Anniversary"), container ); 546 l = new QLabel( tr("Anniversary"), container );
547 gl->addWidget( l, counter, 0 ); 547 gl->addWidget( l, counter, 0 );
548 548
549 m1 = new QPopupMenu( container ); 549 m1 = new QPopupMenu( container );
550 anniversaryPicker = new DateBookMonth( m1, 0, TRUE ); 550 anniversaryPicker = new DateBookMonth( m1, 0, TRUE );
551 m1->insertItem( anniversaryPicker ); 551 m1->insertItem( anniversaryPicker );
552 552
553 anniversaryButton= new QToolButton( hBox, "buttonStart" ); 553 anniversaryButton= new QToolButton( hBox, "buttonStart" );
554 anniversaryButton->setPopup( m1 ); 554 anniversaryButton->setPopup( m1 );
555 anniversaryButton->setPopupDelay(0); 555 anniversaryButton->setPopupDelay(0);
556 556
557 deleteButton = new QPushButton( QIconSet( Resource::loadPixmap( "trash" ) ), 557 deleteButton = new QPushButton( QIconSet( Resource::loadPixmap( "trash" ) ),
558 tr( "Delete" ), 558 tr( "Delete" ),
559 hBox, 0 ); 559 hBox, 0 );
560 gl->addWidget( hBox, counter , 1 ); 560 gl->addWidget( hBox, counter , 1 );
561 561
562 connect( anniversaryPicker, SIGNAL( dateClicked( int, int, int ) ), 562 connect( anniversaryPicker, SIGNAL( dateClicked(int,int,int) ),
563 this, SLOT( slotAnniversaryDateChanged( int, int, int ) ) ); 563 this, SLOT( slotAnniversaryDateChanged(int,int,int) ) );
564 connect( deleteButton, SIGNAL( clicked() ), this, SLOT( slotRemoveAnniversary() ) ); 564 connect( deleteButton, SIGNAL( clicked() ), this, SLOT( slotRemoveAnniversary() ) );
565 565
566 ++counter; 566 ++counter;
567 567
568 // Gender 568 // Gender
569 l = new QLabel( tr("Gender"), container ); 569 l = new QLabel( tr("Gender"), container );
570 gl->addWidget( l, counter, 0 ); 570 gl->addWidget( l, counter, 0 );
571 cmbGender = new QComboBox( container ); 571 cmbGender = new QComboBox( container );
572 cmbGender->insertItem( "", 0 ); 572 cmbGender->insertItem( "", 0 );
573 cmbGender->insertItem( tr("Male"), 1); 573 cmbGender->insertItem( tr("Male"), 1);
574 cmbGender->insertItem( tr("Female"), 2); 574 cmbGender->insertItem( tr("Female"), 2);
575 gl->addWidget( cmbGender, counter, 1 ); 575 gl->addWidget( cmbGender, counter, 1 );
576 576
577 ++counter; 577 ++counter;
578 578
579 // Create Labels and lineedit fields for every dynamic entry 579 // Create Labels and lineedit fields for every dynamic entry
@@ -631,58 +631,58 @@ void ContactEditor::init() {
631 space = new QSpacerItem(1,1, 631 space = new QSpacerItem(1,1,
632 QSizePolicy::Maximum, 632 QSizePolicy::Maximum,
633 QSizePolicy::MinimumExpanding ); 633 QSizePolicy::MinimumExpanding );
634 gl->addItem( space, 4, 0 ); 634 gl->addItem( space, 4, 0 );
635 635
636 cmbChooserField1->insertStringList( trlChooserNames ); 636 cmbChooserField1->insertStringList( trlChooserNames );
637 cmbChooserField2->insertStringList( trlChooserNames ); 637 cmbChooserField2->insertStringList( trlChooserNames );
638 cmbChooserField3->insertStringList( trlChooserNames ); 638 cmbChooserField3->insertStringList( trlChooserNames );
639 cmbChooserField4->insertStringList( trlChooserNames ); 639 cmbChooserField4->insertStringList( trlChooserNames );
640 640
641 cmbChooserField1->setCurrentItem( 0 ); 641 cmbChooserField1->setCurrentItem( 0 );
642 cmbChooserField2->setCurrentItem( 1 ); 642 cmbChooserField2->setCurrentItem( 1 );
643 cmbChooserField3->setCurrentItem( 2 ); 643 cmbChooserField3->setCurrentItem( 2 );
644 644
645 connect( btnFullName, SIGNAL(clicked()), this, SLOT(slotName()) ); 645 connect( btnFullName, SIGNAL(clicked()), this, SLOT(slotName()) );
646 646
647 connect( txtFullName, SIGNAL(textChanged(const QString &)), 647 connect( txtFullName, SIGNAL(textChanged(const QString&)),
648 this, SLOT(slotFullNameChange(const QString &)) ); 648 this, SLOT(slotFullNameChange(const QString&)) );
649 connect( txtSuffix, SIGNAL(textChanged(const QString &)), 649 connect( txtSuffix, SIGNAL(textChanged(const QString&)),
650 this, SLOT(slotSuffixChange(const QString &)) ); 650 this, SLOT(slotSuffixChange(const QString&)) );
651 connect( txtOrganization, SIGNAL(textChanged(const QString &)), 651 connect( txtOrganization, SIGNAL(textChanged(const QString&)),
652 this, SLOT(slotOrganizationChange(const QString &)) ); 652 this, SLOT(slotOrganizationChange(const QString&)) );
653 connect( txtChooserField1, SIGNAL(textChanged(const QString &)), 653 connect( txtChooserField1, SIGNAL(textChanged(const QString&)),
654 this, SLOT(slotChooser1Change(const QString &)) ); 654 this, SLOT(slotChooser1Change(const QString&)) );
655 connect( txtChooserField2, SIGNAL(textChanged(const QString &)), 655 connect( txtChooserField2, SIGNAL(textChanged(const QString&)),
656 this, SLOT(slotChooser2Change(const QString &)) ); 656 this, SLOT(slotChooser2Change(const QString&)) );
657 connect( txtChooserField3, SIGNAL(textChanged(const QString &)), 657 connect( txtChooserField3, SIGNAL(textChanged(const QString&)),
658 this, SLOT(slotChooser3Change(const QString &)) ); 658 this, SLOT(slotChooser3Change(const QString&)) );
659 connect( txtChooserField4, SIGNAL(textChanged(const QString &)), 659 connect( txtChooserField4, SIGNAL(textChanged(const QString&)),
660 this, SLOT(slotChooser4Change(const QString &)) ); 660 this, SLOT(slotChooser4Change(const QString&)) );
661 connect( txtAddress, SIGNAL(textChanged(const QString &)), 661 connect( txtAddress, SIGNAL(textChanged(const QString&)),
662 this, SLOT(slotAddressChange(const QString &)) ); 662 this, SLOT(slotAddressChange(const QString&)) );
663 connect( txtCity, SIGNAL(textChanged(const QString &)), 663 connect( txtCity, SIGNAL(textChanged(const QString&)),
664 this, SLOT(slotCityChange(const QString &)) ); 664 this, SLOT(slotCityChange(const QString&)) );
665 connect( txtState, SIGNAL(textChanged(const QString &)), 665 connect( txtState, SIGNAL(textChanged(const QString&)),
666 this, SLOT(slotStateChange(const QString &)) ); 666 this, SLOT(slotStateChange(const QString&)) );
667 connect( txtZip, SIGNAL(textChanged(const QString &)), 667 connect( txtZip, SIGNAL(textChanged(const QString&)),
668 this, SLOT(slotZipChange(const QString &)) ); 668 this, SLOT(slotZipChange(const QString&)) );
669 connect( cmbCountry, SIGNAL(textChanged(const QString &)), 669 connect( cmbCountry, SIGNAL(textChanged(const QString&)),
670 this, SLOT(slotCountryChange(const QString &)) ); 670 this, SLOT(slotCountryChange(const QString&)) );
671 connect( cmbCountry, SIGNAL(activated(const QString &)), 671 connect( cmbCountry, SIGNAL(activated(const QString&)),
672 this, SLOT(slotCountryChange(const QString &)) ); 672 this, SLOT(slotCountryChange(const QString&)) );
673 connect( cmbChooserField1, SIGNAL(activated(int)), 673 connect( cmbChooserField1, SIGNAL(activated(int)),
674 this, SLOT(slotCmbChooser1Change(int)) ); 674 this, SLOT(slotCmbChooser1Change(int)) );
675 connect( cmbChooserField2, SIGNAL(activated(int)), 675 connect( cmbChooserField2, SIGNAL(activated(int)),
676 this, SLOT(slotCmbChooser2Change(int)) ); 676 this, SLOT(slotCmbChooser2Change(int)) );
677 connect( cmbChooserField3, SIGNAL(activated(int)), 677 connect( cmbChooserField3, SIGNAL(activated(int)),
678 this, SLOT(slotCmbChooser3Change(int)) ); 678 this, SLOT(slotCmbChooser3Change(int)) );
679 connect( cmbChooserField4, SIGNAL(activated(int)), 679 connect( cmbChooserField4, SIGNAL(activated(int)),
680 this, SLOT(slotCmbChooser4Change(int)) ); 680 this, SLOT(slotCmbChooser4Change(int)) );
681 connect( cmbAddress, SIGNAL(activated(int)), 681 connect( cmbAddress, SIGNAL(activated(int)),
682 this, SLOT(slotAddressTypeChange(int)) ); 682 this, SLOT(slotAddressTypeChange(int)) );
683 683
684 new QPEDialogListener(this); 684 new QPEDialogListener(this);
685 685
686 setPersonalView ( m_personalView ); 686 setPersonalView ( m_personalView );
687 687
688 qWarning("init() END"); 688 qWarning("init() END");