summaryrefslogtreecommitdiff
path: root/core/pim/addressbook
authorharlekin <harlekin>2003-03-08 21:10:34 (UTC)
committer harlekin <harlekin>2003-03-08 21:10:34 (UTC)
commitd44025daf7b191e1f79fe181b9ad1fcad20f3bdb (patch) (unidiff)
treedfeca99f66ac32be7d7485aaf36b353a8d775dd3 /core/pim/addressbook
parent9e482f354732a04aebfe8ab9a9eb5cfaad5b3cdb (diff)
downloadopie-d44025daf7b191e1f79fe181b9ad1fcad20f3bdb.zip
opie-d44025daf7b191e1f79fe181b9ad1fcad20f3bdb.tar.gz
opie-d44025daf7b191e1f79fe181b9ad1fcad20f3bdb.tar.bz2
use the opie wide config icon
Diffstat (limited to 'core/pim/addressbook') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/addressbook.cpp166
1 files changed, 83 insertions, 83 deletions
diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp
index 8937227..14e5b3f 100644
--- a/core/pim/addressbook/addressbook.cpp
+++ b/core/pim/addressbook/addressbook.cpp
@@ -91,3 +91,3 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name,
91 setRightJustification( true ); 91 setRightJustification( true );
92 92
93 // Create Toolbar 93 // Create Toolbar
@@ -97,12 +97,12 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name,
97 moveToolBar( listTools, m_config.getToolBarPos() ); 97 moveToolBar( listTools, m_config.getToolBarPos() );
98 98
99 QPEMenuBar *mbList = new QPEMenuBar( this ); 99 QPEMenuBar *mbList = new QPEMenuBar( this );
100 mbList->setMargin( 0 ); 100 mbList->setMargin( 0 );
101 101
102 QPopupMenu *edit = new QPopupMenu( mbList ); 102 QPopupMenu *edit = new QPopupMenu( mbList );
103 mbList->insertItem( tr( "Contact" ), edit ); 103 mbList->insertItem( tr( "Contact" ), edit );
104 104
105 105
106 // View Icons 106 // View Icons
107 m_tableViewButton = new QAction( tr( "List" ), Resource::loadPixmap( "addressbook/weeklst" ), 107 m_tableViewButton = new QAction( tr( "List" ), Resource::loadPixmap( "addressbook/weeklst" ),
108 QString::null, 0, this, 0 ); 108 QString::null, 0, this, 0 );
@@ -125,3 +125,3 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name,
125 a->addTo( listTools ); 125 a->addTo( listTools );
126 126
127 a = new QAction( tr( "Edit" ), Resource::loadPixmap( "edit" ), QString::null, 127 a = new QAction( tr( "Edit" ), Resource::loadPixmap( "edit" ), QString::null,
@@ -132,3 +132,3 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name,
132 a->addTo( listTools ); 132 a->addTo( listTools );
133 133
134 a = new QAction( tr( "Delete" ), Resource::loadPixmap( "trash" ), QString::null, 134 a = new QAction( tr( "Delete" ), Resource::loadPixmap( "trash" ), QString::null,
@@ -139,7 +139,7 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name,
139 a->addTo( listTools ); 139 a->addTo( listTools );
140 140
141 141
142 // make it possible to go directly to businesscard via qcop call 142 // make it possible to go directly to businesscard via qcop call
143 //#if defined(Q_WS_QWS) // Why this ? (se) 143 //#if defined(Q_WS_QWS) // Why this ? (se)
144#if !defined(QT_NO_COP) 144#if !defined(QT_NO_COP)
145 QCopChannel *addressChannel = new QCopChannel("QPE/Addressbook" , this ); 145 QCopChannel *addressChannel = new QCopChannel("QPE/Addressbook" , this );
@@ -148,3 +148,3 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name,
148#endif 148#endif
149 // #endif 149 // #endif
150 a = new QAction( tr( "Find" ), Resource::loadPixmap( "mag" ), 150 a = new QAction( tr( "Find" ), Resource::loadPixmap( "mag" ),
@@ -184,3 +184,3 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name,
184 a->addTo( listTools ); 184 a->addTo( listTools );
185 185
186 if ( Ir::supported() ) { 186 if ( Ir::supported() ) {
@@ -193,6 +193,6 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name,
193 } 193 }
194 194
195 edit->insertSeparator(); 195 edit->insertSeparator();
196 196
197 a = new QAction( tr("Import vCard"), Resource::loadPixmap( "addressbook/fileimport"), QString::null, 197 a = new QAction( tr("Import vCard"), Resource::loadPixmap( "addressbook/fileimport"), QString::null,
198 0, this, 0); 198 0, this, 0);
@@ -201,6 +201,6 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name,
201 a->addTo( edit ); 201 a->addTo( edit );
202 202
203 edit->insertSeparator(); 203 edit->insertSeparator();
204 204
205 a = new QAction( tr("My Personal Details"), Resource::loadPixmap( "addressbook/identity" ), 205 a = new QAction( tr("My Personal Details"), Resource::loadPixmap( "addressbook/identity" ),
206 QString::null, 0, this, 0 , TRUE ); 206 QString::null, 0, this, 0 , TRUE );
@@ -209,3 +209,3 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name,
209 a->addTo( edit ); 209 a->addTo( edit );
210 210
211 211
@@ -218,3 +218,3 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name,
218#endif 218#endif
219 a = new QAction( tr( "Config" ), Resource::loadPixmap( "addressbook/configure" ), QString::null, 219 a = new QAction( tr( "Config" ), Resource::loadPixmap( "SettingsIcon" ), QString::null,
220 0, this, 0 ); 220 0, this, 0 );
@@ -226,3 +226,3 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name,
226 QVBoxLayout *vb = new QVBoxLayout( listContainer ); 226 QVBoxLayout *vb = new QVBoxLayout( listContainer );
227 227
228 m_abView = new AbView( listContainer, m_config.orderList() ); 228 m_abView = new AbView( listContainer, m_config.orderList() );
@@ -230,10 +230,10 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name,
230 // abList->setHScrollBarMode( QScrollView::AlwaysOff ); 230 // abList->setHScrollBarMode( QScrollView::AlwaysOff );
231 connect( m_abView, SIGNAL( signalViewSwitched ( int ) ), 231 connect( m_abView, SIGNAL( signalViewSwitched ( int ) ),
232 this, SLOT( slotViewSwitched( int ) ) ); 232 this, SLOT( slotViewSwitched( int ) ) );
233 233
234 234
235 QObject::connect( m_abView, SIGNAL(signalNotFound()), this, SLOT(slotNotFound()) ); 235 QObject::connect( m_abView, SIGNAL(signalNotFound()), this, SLOT(slotNotFound()) );
236 236
237 m_abView->load(); 237 m_abView->load();
238 238
239 // Letter Picker 239 // Letter Picker
@@ -251,3 +251,3 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name,
251 mbList->insertItem( tr("View"), catMenu ); 251 mbList->insertItem( tr("View"), catMenu );
252 252
253 defaultFont = new QFont( m_abView->font() ); 253 defaultFont = new QFont( m_abView->font() );
@@ -255,8 +255,8 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name,
255 m_curFontSize = m_config.fontSize(); 255 m_curFontSize = m_config.fontSize();
256 256
257 setCentralWidget(listContainer); 257 setCentralWidget(listContainer);
258 258
259 // qDebug("adressbook contrsuction: t=%d", t.elapsed() ); 259 // qDebug("adressbook contrsuction: t=%d", t.elapsed() );
260 260
261 261
262 isLoading = false; 262 isLoading = false;
@@ -285,13 +285,13 @@ void AddressbookWindow::slotConfig()
285 285
286void AddressbookWindow::slotSetFont( int size ) 286void AddressbookWindow::slotSetFont( int size )
287{ 287{
288 qWarning("void AddressbookWindow::slotSetFont( %d )", size); 288 qWarning("void AddressbookWindow::slotSetFont( %d )", size);
289 289
290 if (size > 2 || size < 0) 290 if (size > 2 || size < 0)
291 size = 1; 291 size = 1;
292 292
293 m_config.setFontSize( size ); 293 m_config.setFontSize( size );
294 294
295 QFont *currentFont; 295 QFont *currentFont;
296 296
297 switch (size) { 297 switch (size) {
@@ -325,3 +325,3 @@ void AddressbookWindow::importvCard() {
325 } 325 }
326 326
327} 327}
@@ -332,3 +332,3 @@ void AddressbookWindow::setDocument( const QString &filename )
332 332
333 if ( filename.find(".vcf") != int(filename.length()) - 4 ){ 333 if ( filename.find(".vcf") != int(filename.length()) - 4 ){
334 334
@@ -341,6 +341,6 @@ void AddressbookWindow::setDocument( const QString &filename )
341 2 ) ) { // Escape == button 2 341 2 ) ) { // Escape == button 2
342 case 0: 342 case 0:
343 qWarning("YES clicked"); 343 qWarning("YES clicked");
344 break; 344 break;
345 case 1: 345 case 1:
346 qWarning("NO clicked"); 346 qWarning("NO clicked");
@@ -351,3 +351,3 @@ void AddressbookWindow::setDocument( const QString &filename )
351 351
352 OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null, 352 OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null,
353 filename ); 353 filename );
@@ -374,3 +374,3 @@ void AddressbookWindow::setDocument( const QString &filename )
374 2 ) ) { // Escape == button 2 374 2 ) ) { // Escape == button 2
375 case 0: 375 case 0:
376 qWarning("YES clicked"); 376 qWarning("YES clicked");
@@ -378,3 +378,3 @@ void AddressbookWindow::setDocument( const QString &filename )
378 break; 378 break;
379 case 1: 379 case 1:
380 qWarning("NO clicked"); 380 qWarning("NO clicked");
@@ -390,3 +390,3 @@ void AddressbookWindow::setDocument( const QString &filename )
390 } 390 }
391 391
392 delete access; 392 delete access;
@@ -397,3 +397,3 @@ void AddressbookWindow::resizeEvent( QResizeEvent *e )
397 QMainWindow::resizeEvent( e ); 397 QMainWindow::resizeEvent( e );
398 398
399 399
@@ -439,3 +439,3 @@ void AddressbookWindow::slotListDelete()
439 OContact tmpEntry = m_abView ->currentEntry(); 439 OContact tmpEntry = m_abView ->currentEntry();
440 440
441 // get a name, do the best we can... 441 // get a name, do the best we can...
@@ -447,4 +447,4 @@ void AddressbookWindow::slotListDelete()
447 } 447 }
448 448
449 449
450 if ( QPEMessageBox::confirmDelete( this, tr( "Contacts" ), 450 if ( QPEMessageBox::confirmDelete( this, tr( "Contacts" ),
@@ -476,6 +476,6 @@ void AddressbookWindow::slotFind()
476 m_abView->slotDoFind( searchEdit->text(), m_config.beCaseSensitive(), m_config.useRegExp(), false); 476 m_abView->slotDoFind( searchEdit->text(), m_config.beCaseSensitive(), m_config.useRegExp(), false);
477 477
478 searchEdit->clearFocus(); 478 searchEdit->clearFocus();
479 // m_abView->setFocus(); 479 // m_abView->setFocus();
480 480
481} 481}
@@ -509,3 +509,3 @@ void AddressbookWindow::writeMail()
509 509
510 // I prefer the OPIE-Environment variable before the 510 // I prefer the OPIE-Environment variable before the
511 // QPE-one.. 511 // QPE-one..
@@ -515,4 +515,4 @@ void AddressbookWindow::writeMail()
515 515
516 // Try to access the preferred. If not possible, try to 516 // Try to access the preferred. If not possible, try to
517 // switch to the other one.. 517 // switch to the other one..
518 if ( m_config.useQtMail() ){ 518 if ( m_config.useQtMail() ){
@@ -550,3 +550,3 @@ void AddressbookWindow::slotBeam()
550 return; // can't beam a non-existent file 550 return; // can't beam a non-existent file
551 OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null, 551 OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null,
552 beamFilename ); 552 beamFilename );
@@ -562,3 +562,3 @@ void AddressbookWindow::slotBeam()
562 c = m_abView -> currentEntry(); 562 c = m_abView -> currentEntry();
563 OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null, 563 OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null,
564 beamfile ); 564 beamfile );
@@ -591,3 +591,3 @@ static void parseName( const QString& name, QString *first, QString *middle,
591{ 591{
592 592
593 int comma = name.find ( "," ); 593 int comma = name.find ( "," );
@@ -612,3 +612,3 @@ static void parseName( const QString& name, QString *first, QString *middle,
612 } 612 }
613 613
614} 614}
@@ -627,3 +627,3 @@ void AddressbookWindow::appMessage(const QCString &msg, const QByteArray &data)
627 stream >> name >> email; 627 stream >> name >> email;
628 628
629 OContact cnt; 629 OContact cnt;
@@ -638,5 +638,5 @@ void AddressbookWindow::appMessage(const QCString &msg, const QByteArray &data)
638 cnt.setFileAs(); 638 cnt.setFileAs();
639 639
640 m_abView -> addEntry( cnt ); 640 m_abView -> addEntry( cnt );
641 641
642 // :SXm_abView()->init( cnt ); 642 // :SXm_abView()->init( cnt );
@@ -670,5 +670,5 @@ void AddressbookWindow::appMessage(const QCString &msg, const QByteArray &data)
670 picker.exec(); 670 picker.exec();
671 671
672 // ###### note: contacts may have been added - save here! 672 // ###### note: contacts may have been added - save here!
673 673
674 setCentralWidget(abList); 674 setCentralWidget(abList);
@@ -682,3 +682,3 @@ void AddressbookWindow::appMessage(const QCString &msg, const QByteArray &data)
682#endif 682#endif
683 683
684} 684}
@@ -697,3 +697,3 @@ void AddressbookWindow::editEntry( EntryMode entryMode )
697 abEditor->setCaption( tr("Edit Address") ); 697 abEditor->setCaption( tr("Edit Address") );
698 698
699#if defined(Q_WS_QWS) || defined(_WS_QWS_) 699#if defined(Q_WS_QWS) || defined(_WS_QWS_)
@@ -760,6 +760,6 @@ void AddressbookWindow::slotPersonalView()
760 m_abView->showPersonal( false ); 760 m_abView->showPersonal( false );
761 761
762 return; 762 return;
763 } 763 }
764 764
765 qWarning("slotPersonalView()-> ON"); 765 qWarning("slotPersonalView()-> ON");
@@ -770,3 +770,3 @@ void AddressbookWindow::slotPersonalView()
770 actionMail->setEnabled(FALSE); 770 actionMail->setEnabled(FALSE);
771 771
772 setCaption( tr("Contacts - My Personal Details") ); 772 setCaption( tr("Contacts - My Personal Details") );
@@ -774,3 +774,3 @@ void AddressbookWindow::slotPersonalView()
774 m_abView->showPersonal( true ); 774 m_abView->showPersonal( true );
775 775
776} 776}
@@ -858,3 +858,3 @@ void AddressbookWindow::slotNotFound()
858 858
859 859
860} 860}
@@ -866,3 +866,3 @@ void AddressbookWindow::slotWrapAround()
866 // tr( "End of list. Wrap around now...!" ) + "\n" ); 866 // tr( "End of list. Wrap around now...!" ) + "\n" );
867 867
868} 868}
@@ -872,10 +872,10 @@ void AddressbookWindow::slotSetCategory( int c )
872 qWarning( "void AddressbookWindow::slotSetCategory( %d ) from %d", c, catMenu->count() ); 872 qWarning( "void AddressbookWindow::slotSetCategory( %d ) from %d", c, catMenu->count() );
873 873
874 QString cat, book; 874 QString cat, book;
875 AbView::Views view = AbView::TableView; 875 AbView::Views view = AbView::TableView;
876 876
877 if ( c <= 0 ) 877 if ( c <= 0 )
878 return; 878 return;
879 879
880 // Switch view 880 // Switch view
881 if ( c < 3 ) 881 if ( c < 3 )
@@ -886,6 +886,6 @@ void AddressbookWindow::slotSetCategory( int c )
886 else 886 else
887 // Checkmark Category Menu Item Selected 887 // Checkmark Category Menu Item Selected
888 for ( unsigned int i = 3; i < catMenu->count(); i++ ) 888 for ( unsigned int i = 3; i < catMenu->count(); i++ )
889 catMenu->setItemChecked( i, c == (int)i ); 889 catMenu->setItemChecked( i, c == (int)i );
890 890
891 // Now switch to the selected category 891 // Now switch to the selected category
@@ -912,3 +912,3 @@ void AddressbookWindow::slotSetCategory( int c )
912 } 912 }
913 913
914 // Switch to the selected View 914 // Switch to the selected View
@@ -923,3 +923,3 @@ void AddressbookWindow::slotSetCategory( int c )
923 cat = "All"; 923 cat = "All";
924 924
925 setCaption( tr( "Contacts" ) + " - " + book + " - " + tr( cat ) ); 925 setCaption( tr( "Contacts" ) + " - " + book + " - " + tr( cat ) );
@@ -967,5 +967,5 @@ void AddressbookWindow::slotCardView()
967void AddressbookWindow::slotSetLetter( char c ) { 967void AddressbookWindow::slotSetLetter( char c ) {
968 968
969 m_abView->setShowByLetter( c ); 969 m_abView->setShowByLetter( c );
970 970
971} 971}
@@ -976,3 +976,3 @@ void AddressbookWindow::populateCategories()
976 catMenu->clear(); 976 catMenu->clear();
977 977
978 int id, rememberId; 978 int id, rememberId;
@@ -980,3 +980,3 @@ void AddressbookWindow::populateCategories()
980 rememberId = 0; 980 rememberId = 0;
981 981
982 catMenu->insertItem( Resource::loadPixmap( "datebook/weeklst" ), tr( "List" ), id++ ); 982 catMenu->insertItem( Resource::loadPixmap( "datebook/weeklst" ), tr( "List" ), id++ );
@@ -985,3 +985,3 @@ void AddressbookWindow::populateCategories()
985 catMenu->insertSeparator(); 985 catMenu->insertSeparator();
986 986
987 catMenu->insertItem( tr( "All" ), id++ ); 987 catMenu->insertItem( tr( "All" ), id++ );
@@ -997,3 +997,3 @@ void AddressbookWindow::populateCategories()
997 997
998 998
999 if ( m_abView -> showCategory().isEmpty() ) { 999 if ( m_abView -> showCategory().isEmpty() ) {