summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/TODO7
-rw-r--r--core/pim/addressbook/abtable.cpp76
-rw-r--r--core/pim/addressbook/addressbook.cpp47
-rw-r--r--core/pim/addressbook/addressbook.h3
-rw-r--r--core/pim/addressbook/configdlg.cpp16
-rw-r--r--core/pim/addressbook/configdlg.h4
-rw-r--r--core/pim/addressbook/configdlg_base.ui105
-rw-r--r--core/pim/addressbook/opie-addressbook.control2
-rw-r--r--core/pim/addressbook/picker.cpp12
9 files changed, 227 insertions, 45 deletions
diff --git a/core/pim/addressbook/TODO b/core/pim/addressbook/TODO
index 796dc49..80ec2d9 100644
--- a/core/pim/addressbook/TODO
+++ b/core/pim/addressbook/TODO
@@ -1,36 +1,39 @@
1Stuff todo until OPIE 1.0 : 1Stuff todo until OPIE 1.0 :
2 2
3Pending bugfixes from previous work:
4
3Urgent: 5Urgent:
4 6
5- Font menu is invisible using german translation 7- Font menu is invisible using german translation
6 8
7Important: 9Important:
8 10
11- Overview window cleanup needed..
9- Cursor keys should work in detail-view (ablabel) 12- Cursor keys should work in detail-view (ablabel)
10- "What's this" should be added 13- "What's this" should be added
11- Store last settings of combo-boxes 14- Store last settings of combo-boxes
12- Mail-Icon is missing
13- Overview window cleanup needed..
14- Finishing of new View functions (List, Phonebook...) 15- Finishing of new View functions (List, Phonebook...)
15- The names of the countries are sorted by there english names, only.. 16- The names of the countries are sorted by there english names, only..
16 Even if they are translated.. :S 17 Even if they are translated.. :S
17- Reload if contacts were changed externally 18- Reload if contacts were changed externally
18 19
19Less important: 20Less important:
20 21
21- The picker (alphabetical sort widget) should be 22- The picker (alphabetical sort widget) should be
22 placed verticaly or horizontally (configurable) 23 placed verticaly or horizontally (configurable)
23- Use advanced database functions in abtable to decrease 24- Use advanced database functions in abtable to decrease
24 memory footprint and to make everything more easy ! 25 memory footprint and to make everything more easy !
25 (abtable should store Iterator for selected Category) 26 (abtable should store Iterator for selected Category)
26 27
27Should be Fixed (not absolute sure, need further validation): 28Should be Fixed (not absolute sure, need further validation):
28- "Nonenglish" translation bug has to be fixed. 29- "Nonenglish" translation bug has to be fixed.
29 30
30Fixed: 31Fixed:
31- Syncing: abtable not reloaded after sync. 32- Syncing: abtable not reloaded after sync.
32- Find widget should be replaced by something like 33- Find widget should be replaced by something like
33 qpdf has. 34 qpdf has.
34- Adding a configuration dialog 35- Adding a configuration dialog
35- Picker: Activated letter schould be more visible 36- Picker: Activated letter schould be more visible
36- Advanced handling of cursor keys (search..) 37- Advanced handling of cursor keys (search..)
38- Mail-Icon is missing
39- Use opie-mail insted of qt-mail if possible.
diff --git a/core/pim/addressbook/abtable.cpp b/core/pim/addressbook/abtable.cpp
index 97b26db..4feadeb 100644
--- a/core/pim/addressbook/abtable.cpp
+++ b/core/pim/addressbook/abtable.cpp
@@ -641,131 +641,143 @@ void QTable::paintEmptyArea( QPainter *p, int cx, int cy, int cw, int ch )
641 QArray<QRect> r = reg.rects(); 641 QArray<QRect> r = reg.rects();
642 for (unsigned int i=0; i<r.count(); i++) 642 for (unsigned int i=0; i<r.count(); i++)
643 p->fillRect( r[i], colorGroup().brush( QColorGroup::Base ) ); 643 p->fillRect( r[i], colorGroup().brush( QColorGroup::Base ) );
644} 644}
645#endif 645#endif
646#endif 646#endif
647 647
648 648
649// int AbTable::rowHeight( int ) const 649// int AbTable::rowHeight( int ) const
650// { 650// {
651// return 18; 651// return 18;
652// } 652// }
653 653
654// int AbTable::rowPos( int row ) const 654// int AbTable::rowPos( int row ) const
655// { 655// {
656// return 18*row; 656// return 18*row;
657// } 657// }
658 658
659// int AbTable::rowAt( int pos ) const 659// int AbTable::rowAt( int pos ) const
660// { 660// {
661// return QMIN( pos/18, numRows()-1 ); 661// return QMIN( pos/18, numRows()-1 );
662// } 662// }
663 663
664void AbTable::slotDoFind( const QString &findString, bool caseSensitive, bool useRegExp, 664void AbTable::slotDoFind( const QString &findString, bool caseSensitive, bool useRegExp,
665 bool backwards, QString cat /* int category */ ) 665 bool backwards, QString cat /* int category */ )
666{ 666{
667 int category = 0; 667 int category = 0;
668 668
669 // Use the current Category if nothing else selected 669 // Use the current Category if nothing else selected
670 if ( cat.isEmpty() ) 670 if ( cat.isEmpty() )
671 category = mCat.id( "Contacts", showCat ); 671 category = mCat.id( "Contacts", showCat );
672 else{ 672 else{
673 category = mCat.id("Contacts", cat ); 673 category = mCat.id("Contacts", cat );
674 } 674 }
675 675
676 qWarning ("Found in Category %d", category); 676 qWarning ("Found in Category %d", category);
677 677
678 if ( currFindRow < -1 ) 678 if ( currFindRow < -1 )
679 currFindRow = - 1; 679 currFindRow = - 1;
680 680
681 clearSelection( TRUE ); 681 clearSelection( TRUE );
682 int rows, row; 682 int rows, row;
683 AbTableItem *ati; 683 AbTableItem *ati;
684 QRegExp r( findString ); 684 QRegExp r( findString );
685 r.setCaseSensitive( caseSensitive ); 685 r.setCaseSensitive( caseSensitive );
686 r.setWildcard( !useRegExp ); 686 r.setWildcard( !useRegExp );
687 rows = numRows(); 687 rows = numRows();
688 static bool wrapAround = true; 688 static bool wrapAround = true;
689 bool try_again = false;
689 690
690 if ( !backwards ) { 691 // We will loop until we found an entry or found nothing.
691 for ( row = currFindRow + 1; row < rows; row++ ) { 692 do {
692 ati = static_cast<AbTableItem*>( item(row, 0) ); 693 if ( !backwards ) {
693 if ( contactCompare( contactList[ati], r, category ) ) 694 for ( row = currFindRow + 1; row < rows; row++ ) {
694 break; 695 ati = static_cast<AbTableItem*>( item(row, 0) );
696 if ( contactCompare( contactList[ati], r, category ) ){
697 try_again = false;
698 break;
699 }
700 }
701 } else {
702 for ( row = currFindRow - 1; row > -1; row-- ) {
703 ati = static_cast<AbTableItem*>( item(row, 0) );
704 if ( contactCompare( contactList[ati], r, category ) ){
705 try_again = false;
706 break;
707 }
708 }
695 } 709 }
696 } else { 710 if ( row >= rows || row < 0 ) {
697 for ( row = currFindRow - 1; row > -1; row-- ) { 711 if ( row < 0 )
698 ati = static_cast<AbTableItem*>( item(row, 0) ); 712 currFindRow = rows;
699 if ( contactCompare( contactList[ati], r, category ) ) 713 else
700 break; 714 currFindRow = -1;
715
716 if ( wrapAround ){
717 emit signalWrapAround();
718 try_again = true;
719 }else{
720 emit signalNotFound();
721 try_again = false;
722 }
723
724 wrapAround = !wrapAround;
725 } else {
726 currFindRow = row;
727 QTableSelection foundSelection;
728 foundSelection.init( currFindRow, 0 );
729 foundSelection.expandTo( currFindRow, numCols() - 1 );
730 addSelection( foundSelection );
731 setCurrentCell( currFindRow, 0 /* numCols() - 1 */ );
732 wrapAround = true;
733 try_again = false;
701 } 734 }
702 } 735 } while ( try_again );
703 if ( row >= rows || row < 0 ) {
704 if ( row < 0 )
705 currFindRow = rows;
706 else
707 currFindRow = -1;
708
709 if ( wrapAround )
710 emit signalWrapAround();
711 else
712 emit signalNotFound();
713
714 wrapAround = !wrapAround;
715 } else {
716 currFindRow = row;
717 QTableSelection foundSelection;
718 foundSelection.init( currFindRow, 0 );
719 foundSelection.expandTo( currFindRow, numCols() - 1 );
720 addSelection( foundSelection );
721 setCurrentCell( currFindRow, 0 /* numCols() - 1 */ );
722 wrapAround = true;
723 }
724} 736}
725 737
726static bool contactCompare( const OContact &cnt, const QRegExp &r, int category ) 738static bool contactCompare( const OContact &cnt, const QRegExp &r, int category )
727{ 739{
728 bool returnMe; 740 bool returnMe;
729 QArray<int> cats; 741 QArray<int> cats;
730 cats = cnt.categories(); 742 cats = cnt.categories();
731 743
732 returnMe = false; 744 returnMe = false;
733 if ( (cats.count() == 0) || (category == 0) ) 745 if ( (cats.count() == 0) || (category == 0) )
734 returnMe = cnt.match( r ); 746 returnMe = cnt.match( r );
735 else { 747 else {
736 int i; 748 int i;
737 for ( i = 0; i < int(cats.count()); i++ ) { 749 for ( i = 0; i < int(cats.count()); i++ ) {
738 if ( cats[i] == category ) { 750 if ( cats[i] == category ) {
739 returnMe = cnt.match( r ); 751 returnMe = cnt.match( r );
740 break; 752 break;
741 } 753 }
742 } 754 }
743 } 755 }
744 756
745 return returnMe; 757 return returnMe;
746} 758}
747 759
748void AbTable::fitColumns() 760void AbTable::fitColumns()
749{ 761{
750 int contentsWidth = visibleWidth() / 2; 762 int contentsWidth = visibleWidth() / 2;
751 763
752 if ( showBk == "Cards" ) { 764 if ( showBk == "Cards" ) {
753 showColumn(1); 765 showColumn(1);
754 //adjustColumn(1); 766 //adjustColumn(1);
755 setColumnWidth( 1, visibleWidth() ); 767 setColumnWidth( 1, visibleWidth() );
756 columnVisible = false; 768 columnVisible = false;
757 } else { 769 } else {
758 if ( columnVisible == false ){ 770 if ( columnVisible == false ){
759 showColumn(0); 771 showColumn(0);
760 columnVisible = true; 772 columnVisible = true;
761 } 773 }
762 setColumnWidth( 0, contentsWidth ); 774 setColumnWidth( 0, contentsWidth );
763 adjustColumn(1); 775 adjustColumn(1);
764 if ( columnWidth(1) < contentsWidth ) 776 if ( columnWidth(1) < contentsWidth )
765 setColumnWidth( 1, contentsWidth ); 777 setColumnWidth( 1, contentsWidth );
766 } 778 }
767} 779}
768 780
769void AbTable::show() 781void AbTable::show()
770{ 782{
771 fitColumns(); 783 fitColumns();
diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp
index 3466801..39d8321 100644
--- a/core/pim/addressbook/addressbook.cpp
+++ b/core/pim/addressbook/addressbook.cpp
@@ -35,186 +35,192 @@
35 35
36#include <qpe/global.h> 36#include <qpe/global.h>
37#include <qpe/resource.h> 37#include <qpe/resource.h>
38#include <qpe/ir.h> 38#include <qpe/ir.h>
39#include <qpe/qpemessagebox.h> 39#include <qpe/qpemessagebox.h>
40#include <qpe/qcopenvelope_qws.h> 40#include <qpe/qcopenvelope_qws.h>
41 41
42#include <qaction.h> 42#include <qaction.h>
43#include <qdialog.h> 43#include <qdialog.h>
44#include <qdir.h> 44#include <qdir.h>
45#include <qfile.h> 45#include <qfile.h>
46#include <qimage.h> 46#include <qimage.h>
47#include <qlayout.h> 47#include <qlayout.h>
48#include <qpe/qpemenubar.h> 48#include <qpe/qpemenubar.h>
49#include <qmessagebox.h> 49#include <qmessagebox.h>
50#include <qpixmap.h> 50#include <qpixmap.h>
51#include <qpopupmenu.h> 51#include <qpopupmenu.h>
52#include <qpe/qpetoolbar.h> 52#include <qpe/qpetoolbar.h>
53#include <qstringlist.h> 53#include <qstringlist.h>
54#include <qtoolbutton.h> 54#include <qtoolbutton.h>
55#include <qwhatsthis.h> 55#include <qwhatsthis.h>
56 56
57#include <stdlib.h> 57#include <stdlib.h>
58#include <sys/stat.h> 58#include <sys/stat.h>
59#include <sys/types.h> 59#include <sys/types.h>
60#include <fcntl.h> 60#include <fcntl.h>
61#include <unistd.h> 61#include <unistd.h>
62 62
63#include <qdatetime.h> 63#include <qdatetime.h>
64 64
65#include "picker.h" 65#include "picker.h"
66#include "configdlg.h" 66#include "configdlg.h"
67 67
68static QString addressbookPersonalVCardName() 68static QString addressbookPersonalVCardName()
69{ 69{
70 QString filename = Global::applicationFileName("addressbook", 70 QString filename = Global::applicationFileName("addressbook",
71 "businesscard.vcf"); 71 "businesscard.vcf");
72 return filename; 72 return filename;
73} 73}
74 74
75 75
76AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name, 76AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name,
77 WFlags f ) 77 WFlags f )
78 : QMainWindow( parent, name, f ), 78 : QMainWindow( parent, name, f ),
79 abEditor(0), 79 abEditor(0),
80 useRegExp(false), 80 useRegExp(false),
81 doNotifyWrapAround(true), 81 doNotifyWrapAround(true),
82 caseSensitive(false), 82 caseSensitive(false),
83 m_useQtMail(true),
84 m_useOpieMail(false),
83 bAbEditFirstTime(TRUE), 85 bAbEditFirstTime(TRUE),
84 syncing(FALSE) 86 syncing(FALSE)
85{ 87{
86 isLoading = true; 88 isLoading = true;
87 89
88 // Read Config settings 90 // Read Config settings
89 Config cfg("AddressBook"); 91 Config cfg("AddressBook");
90 cfg.setGroup("Search"); 92 cfg.setGroup("Search");
91 useRegExp = cfg.readBoolEntry( "useRegExp" ); 93 useRegExp = cfg.readBoolEntry( "useRegExp" );
92 caseSensitive = cfg.readBoolEntry( "caseSensitive" ); 94 caseSensitive = cfg.readBoolEntry( "caseSensitive" );
93 doNotifyWrapAround = cfg.readBoolEntry( "doNotifyWrapAround" ); 95 doNotifyWrapAround = cfg.readBoolEntry( "doNotifyWrapAround" );
96 cfg.setGroup("Mail");
97 m_useQtMail = cfg.readBoolEntry( "useQtMail" );
98 m_useOpieMail=cfg.readBoolEntry( "useOpieMail" );
99
94 100
95 initFields(); 101 initFields();
96 102
97 setCaption( tr("Contacts") ); 103 setCaption( tr("Contacts") );
98 setIcon( Resource::loadPixmap( "AddressBook" ) ); 104 setIcon( Resource::loadPixmap( "AddressBook" ) );
99 105
100 setToolBarsMovable( FALSE ); 106 setToolBarsMovable( FALSE );
101 107
102 // Create Toolbars 108 // Create Toolbars
103 109
104 QPEToolBar *bar = new QPEToolBar( this ); 110 QPEToolBar *bar = new QPEToolBar( this );
105 bar->setHorizontalStretchable( TRUE ); 111 bar->setHorizontalStretchable( TRUE );
106 112
107 QPEMenuBar *mbList = new QPEMenuBar( bar ); 113 QPEMenuBar *mbList = new QPEMenuBar( bar );
108 mbList->setMargin( 0 ); 114 mbList->setMargin( 0 );
109 115
110 QPopupMenu *edit = new QPopupMenu( this ); 116 QPopupMenu *edit = new QPopupMenu( this );
111 mbList->insertItem( tr( "Contact" ), edit ); 117 mbList->insertItem( tr( "Contact" ), edit );
112 118
113 listTools = new QPEToolBar( this, "list operations" ); 119 listTools = new QPEToolBar( this, "list operations" );
114 120
115 121
116 QAction *a = new QAction( tr( "New" ), Resource::loadPixmap( "new" ), QString::null, 122 QAction *a = new QAction( tr( "New" ), Resource::loadPixmap( "new" ), QString::null,
117 0, this, 0 ); 123 0, this, 0 );
118 actionNew = a; 124 actionNew = a;
119 connect( a, SIGNAL( activated() ), this, SLOT( slotListNew() ) ); 125 connect( a, SIGNAL( activated() ), this, SLOT( slotListNew() ) );
120 a->addTo( edit ); 126 a->addTo( edit );
121 a->addTo( listTools ); 127 a->addTo( listTools );
122 128
123 a = new QAction( tr( "Edit" ), Resource::loadPixmap( "edit" ), QString::null, 129 a = new QAction( tr( "Edit" ), Resource::loadPixmap( "edit" ), QString::null,
124 0, this, 0 ); 130 0, this, 0 );
125 actionEdit = a; 131 actionEdit = a;
126 connect( a, SIGNAL( activated() ), this, SLOT( slotViewEdit() ) ); 132 connect( a, SIGNAL( activated() ), this, SLOT( slotViewEdit() ) );
127 a->addTo( edit ); 133 a->addTo( edit );
128 a->addTo( listTools ); 134 a->addTo( listTools );
129 135
130 a = new QAction( tr( "Delete" ), Resource::loadPixmap( "trash" ), QString::null, 136 a = new QAction( tr( "Delete" ), Resource::loadPixmap( "trash" ), QString::null,
131 0, this, 0 ); 137 0, this, 0 );
132 actionTrash = a; 138 actionTrash = a;
133 connect( a, SIGNAL( activated() ), this, SLOT( slotListDelete() ) ); 139 connect( a, SIGNAL( activated() ), this, SLOT( slotListDelete() ) );
134 a->addTo( edit ); 140 a->addTo( edit );
135 a->addTo( listTools ); 141 a->addTo( listTools );
136 142
137 143
138 // make it possible to go directly to businesscard via qcop call 144 // make it possible to go directly to businesscard via qcop call
139#if defined(Q_WS_QWS) 145#if defined(Q_WS_QWS)
140#if !defined(QT_NO_COP) 146#if !defined(QT_NO_COP)
141 QCopChannel *addressChannel = new QCopChannel("QPE/Addressbook" , this ); 147 QCopChannel *addressChannel = new QCopChannel("QPE/Addressbook" , this );
142 connect (addressChannel, SIGNAL( received(const QCString &, const QByteArray &)), 148 connect (addressChannel, SIGNAL( received(const QCString &, const QByteArray &)),
143 this, SLOT ( appMessage(const QCString &, const QByteArray &) ) ); 149 this, SLOT ( appMessage(const QCString &, const QByteArray &) ) );
144#endif 150#endif
145#endif 151#endif
146 a = new QAction( tr( "Find" ), Resource::loadPixmap( "mag" ), 152 a = new QAction( tr( "Find" ), Resource::loadPixmap( "mag" ),
147 QString::null, 0, this, 0 ); 153 QString::null, 0, this, 0 );
148 actionFind = a; 154 actionFind = a;
149 connect( a, SIGNAL(activated()), this, SLOT( slotFindOpen()) ); 155 connect( a, SIGNAL(activated()), this, SLOT( slotFindOpen()) );
150 a->addTo( edit ); 156 a->addTo( edit );
151 a->addTo( listTools ); 157 a->addTo( listTools );
152 158
153 // Much better search widget, taken from QTReader.. (se) 159 // Much better search widget, taken from QTReader.. (se)
154 searchBar = new OFloatBar( "Search", this, QMainWindow::Top, TRUE ); 160 searchBar = new OFloatBar( "Search", this, QMainWindow::Top, TRUE );
155 searchBar->setHorizontalStretchable( TRUE ); 161 searchBar->setHorizontalStretchable( TRUE );
156 searchBar->hide(); 162 searchBar->hide();
157 searchEdit = new QLineEdit( searchBar, "searchEdit" ); 163 searchEdit = new QLineEdit( searchBar, "searchEdit" );
158// QFont f("unifont", 16 /*, QFont::Bold*/); 164// QFont f("unifont", 16 /*, QFont::Bold*/);
159// searchEdit->setFont( f ); 165// searchEdit->setFont( f );
160 searchBar->setStretchableWidget( searchEdit ); 166 searchBar->setStretchableWidget( searchEdit );
161 connect( searchEdit, SIGNAL( returnPressed( ) ), 167 connect( searchEdit, SIGNAL( returnPressed( ) ),
162 this, SLOT( slotFind( ) ) ); 168 this, SLOT( slotFind( ) ) );
163 169
164 a = new QAction( tr( "Find Next" ), Resource::loadPixmap( "next" ), QString::null, 0, this, 0 ); 170 a = new QAction( tr( "Find Next" ), Resource::loadPixmap( "next" ), QString::null, 0, this, 0 );
165 connect( a, SIGNAL( activated() ), this, SLOT( slotFindNext() ) ); 171 connect( a, SIGNAL( activated() ), this, SLOT( slotFindNext() ) );
166 a->addTo( searchBar ); 172 a->addTo( searchBar );
167 173
168 a = new QAction( tr( "Close Find" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 ); 174 a = new QAction( tr( "Close Find" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 );
169 connect( a, SIGNAL( activated() ), this, SLOT( slotFindClose() ) ); 175 connect( a, SIGNAL( activated() ), this, SLOT( slotFindClose() ) );
170 a->addTo( searchBar ); 176 a->addTo( searchBar );
171 177
172 a = new QAction( tr( "Write Mail To" ), Resource::loadPixmap( "qtmail/reply" ), 178 a = new QAction( tr( "Write Mail To" ), Resource::loadPixmap( "mail/sendmail" ),
173 QString::null, 0, this, 0 ); 179 QString::null, 0, this, 0 );
174 //a->setEnabled( FALSE ); we got support for it now :) zecke 180 //a->setEnabled( FALSE ); we got support for it now :) zecke
175 actionMail = a; 181 actionMail = a;
176 connect( a, SIGNAL( activated() ), this, SLOT( writeMail() ) ); 182 connect( a, SIGNAL( activated() ), this, SLOT( writeMail() ) );
177 a->addTo( edit ); 183 a->addTo( edit );
178 a->addTo( listTools ); 184 a->addTo( listTools );
179 185
180 186
181 187
182 if ( Ir::supported() ) { 188 if ( Ir::supported() ) {
183 a = new QAction( tr ("Beam Entry" ), Resource::loadPixmap( "beam" ), QString::null, 189 a = new QAction( tr ("Beam Entry" ), Resource::loadPixmap( "beam" ), QString::null,
184 0, this, 0 ); 190 0, this, 0 );
185 actionBeam = a; 191 actionBeam = a;
186 connect( a, SIGNAL( activated() ), this, SLOT( slotBeam() ) ); 192 connect( a, SIGNAL( activated() ), this, SLOT( slotBeam() ) );
187 a->addTo( edit ); 193 a->addTo( edit );
188 a->addTo( listTools ); 194 a->addTo( listTools );
189 } 195 }
190 196
191 edit->insertSeparator(); 197 edit->insertSeparator();
192 198
193 a = new QAction( tr("Import vCard"), QString::null, 0, 0, 0, TRUE ); 199 a = new QAction( tr("Import vCard"), QString::null, 0, 0, 0, TRUE );
194 actionPersonal = a; 200 actionPersonal = a;
195 connect( a, SIGNAL( activated() ), this, SLOT( importvCard() ) ); 201 connect( a, SIGNAL( activated() ), this, SLOT( importvCard() ) );
196 a->addTo( edit ); 202 a->addTo( edit );
197 203
198 edit->insertSeparator(); 204 edit->insertSeparator();
199 205
200 a = new QAction( tr("My Personal Details"), QString::null, 0, 0, 0, TRUE ); 206 a = new QAction( tr("My Personal Details"), QString::null, 0, 0, 0, TRUE );
201 actionPersonal = a; 207 actionPersonal = a;
202 connect( a, SIGNAL( activated() ), this, SLOT( slotPersonalView() ) ); 208 connect( a, SIGNAL( activated() ), this, SLOT( slotPersonalView() ) );
203 a->addTo( edit ); 209 a->addTo( edit );
204 210
205 // Do we need this function ? (se) 211 // Do we need this function ? (se)
206 // a = new QAction( tr( "Arrange Edit Fields"), QString::null, 0, 0 ); 212 // a = new QAction( tr( "Arrange Edit Fields"), QString::null, 0, 0 );
207 // connect( a, SIGNAL( activated() ), this, SLOT( slotSettings() ) ); 213 // connect( a, SIGNAL( activated() ), this, SLOT( slotSettings() ) );
208 // a->addTo( edit ); 214 // a->addTo( edit );
209 215
210 216
211#ifdef __DEBUG_RELEASE 217#ifdef __DEBUG_RELEASE
212 // Remove this function for public Release ! This is only 218 // Remove this function for public Release ! This is only
213 // for debug purposes .. 219 // for debug purposes ..
214 a = new QAction( tr( "Save all Data"), QString::null, 0, 0 ); 220 a = new QAction( tr( "Save all Data"), QString::null, 0, 0 );
215 connect( a, SIGNAL( activated() ), this , SLOT( slotSave() ) ); 221 connect( a, SIGNAL( activated() ), this , SLOT( slotSave() ) );
216 a->addTo( edit ); 222 a->addTo( edit );
217#endif 223#endif
218 a = new QAction( tr( "Config" ), Resource::loadPixmap( "today/config" ), QString::null, 224 a = new QAction( tr( "Config" ), Resource::loadPixmap( "today/config" ), QString::null,
219 0, this, 0 ); 225 0, this, 0 );
220 connect( a, SIGNAL( activated() ), this, SLOT( slotConfig() ) ); 226 connect( a, SIGNAL( activated() ), this, SLOT( slotConfig() ) );
@@ -237,194 +243,201 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name,
237 // Maybe we should react on Wraparound and notfound ? 243 // Maybe we should react on Wraparound and notfound ?
238 QObject::connect( abList, SIGNAL(signalNotFound()), this, SLOT(slotNotFound()) ); 244 QObject::connect( abList, SIGNAL(signalNotFound()), this, SLOT(slotNotFound()) );
239 QObject::connect( abList, SIGNAL(signalWrapAround()), this, SLOT(slotWrapAround()) ); 245 QObject::connect( abList, SIGNAL(signalWrapAround()), this, SLOT(slotWrapAround()) );
240 246
241 mView = 0; 247 mView = 0;
242 248
243 abList->load(); 249 abList->load();
244 250
245 pLabel = new LetterPicker( listContainer ); 251 pLabel = new LetterPicker( listContainer );
246 connect(pLabel, SIGNAL(letterClicked(char)), this, SLOT(slotSetLetter(char))); 252 connect(pLabel, SIGNAL(letterClicked(char)), this, SLOT(slotSetLetter(char)));
247 vb->addWidget(pLabel); 253 vb->addWidget(pLabel);
248 catMenu = new QPopupMenu( this ); 254 catMenu = new QPopupMenu( this );
249 catMenu->setCheckable( TRUE ); 255 catMenu->setCheckable( TRUE );
250 connect( catMenu, SIGNAL(activated(int)), this, SLOT(slotSetCategory(int)) ); 256 connect( catMenu, SIGNAL(activated(int)), this, SLOT(slotSetCategory(int)) );
251 populateCategories(); 257 populateCategories();
252 258
253 mbList->insertItem( tr("View"), catMenu ); 259 mbList->insertItem( tr("View"), catMenu );
254 // setCentralWidget( listContainer ); 260 // setCentralWidget( listContainer );
255 261
256 fontMenu = new QPopupMenu(this); 262 fontMenu = new QPopupMenu(this);
257 fontMenu->setCheckable( true ); 263 fontMenu->setCheckable( true );
258 connect( fontMenu, SIGNAL(activated(int)), this, SLOT(slotSetFont(int))); 264 connect( fontMenu, SIGNAL(activated(int)), this, SLOT(slotSetFont(int)));
259 265
260 fontMenu->insertItem(tr( "Small" ), 0); 266 fontMenu->insertItem(tr( "Small" ), 0);
261 fontMenu->insertItem(tr( "Normal" ), 1); 267 fontMenu->insertItem(tr( "Normal" ), 1);
262 fontMenu->insertItem(tr( "Large" ), 2); 268 fontMenu->insertItem(tr( "Large" ), 2);
263 269
264 defaultFont = new QFont( abList->font() ); 270 defaultFont = new QFont( abList->font() );
265 271
266 slotSetFont(startFontSize); 272 slotSetFont(startFontSize);
267 273
268 mbList->insertItem( tr("Font"), fontMenu); 274 mbList->insertItem( tr("Font"), fontMenu);
269 setCentralWidget(listContainer); 275 setCentralWidget(listContainer);
270 276
271 // qDebug("adressbook contrsuction: t=%d", t.elapsed() ); 277 // qDebug("adressbook contrsuction: t=%d", t.elapsed() );
272 278
273 abList->setCurrentCell( 0, 0 ); 279 abList->setCurrentCell( 0, 0 );
274 280
275 isLoading = false; 281 isLoading = false;
276} 282}
277 283
278 284
279void AddressbookWindow::slotConfig() 285void AddressbookWindow::slotConfig()
280{ 286{
281 ConfigDlg* dlg = new ConfigDlg( this, "Config" ); 287 ConfigDlg* dlg = new ConfigDlg( this, "Config" );
282 dlg -> setUseRegExp ( useRegExp ); 288 dlg -> setUseRegExp ( useRegExp );
283 dlg -> setBeCaseSensitive( caseSensitive ); 289 dlg -> setBeCaseSensitive( caseSensitive );
284 dlg -> setSignalWrapAround( doNotifyWrapAround ); 290 dlg -> setSignalWrapAround( doNotifyWrapAround );
291 dlg -> setQtMail ( m_useQtMail );
292 dlg -> setOpieMail ( m_useOpieMail );
285 dlg -> showMaximized(); 293 dlg -> showMaximized();
286 if ( dlg -> exec() ) { 294 if ( dlg -> exec() ) {
287 qWarning ("Config Dialog accepted !"); 295 qWarning ("Config Dialog accepted !");
288 useRegExp = dlg -> useRegExp(); 296 useRegExp = dlg -> useRegExp();
289 caseSensitive = dlg -> beCaseSensitive(); 297 caseSensitive = dlg -> beCaseSensitive();
290 doNotifyWrapAround = dlg -> signalWrapAround(); 298 doNotifyWrapAround = dlg -> signalWrapAround();
299 m_useQtMail = dlg -> useQtMail();
300 m_useOpieMail= dlg -> useOpieMail();
291 } 301 }
292 302
293 delete dlg; 303 delete dlg;
294} 304}
295 305
296 306
297void AddressbookWindow::slotSetFont( int size ) { 307void AddressbookWindow::slotSetFont( int size ) {
298 308
299 if (size > 2 || size < 0) 309 if (size > 2 || size < 0)
300 size = 1; 310 size = 1;
301 311
302 startFontSize = size; 312 startFontSize = size;
303 313
304 QFont *currentFont; 314 QFont *currentFont;
305 315
306 switch (size) { 316 switch (size) {
307 case 0: 317 case 0:
308 fontMenu->setItemChecked(0, true); 318 fontMenu->setItemChecked(0, true);
309 fontMenu->setItemChecked(1, false); 319 fontMenu->setItemChecked(1, false);
310 fontMenu->setItemChecked(2, false); 320 fontMenu->setItemChecked(2, false);
311 abList->setFont( QFont( defaultFont->family(), defaultFont->pointSize() - 2 ) ); 321 abList->setFont( QFont( defaultFont->family(), defaultFont->pointSize() - 2 ) );
312 currentFont = new QFont (abList->font()); 322 currentFont = new QFont (abList->font());
313 // abList->resizeRows(currentFont->pixelSize() + 7); 323 // abList->resizeRows(currentFont->pixelSize() + 7);
314 abList->resizeRows(); 324 abList->resizeRows();
315 break; 325 break;
316 case 1: 326 case 1:
317 fontMenu->setItemChecked(0, false); 327 fontMenu->setItemChecked(0, false);
318 fontMenu->setItemChecked(1, true); 328 fontMenu->setItemChecked(1, true);
319 fontMenu->setItemChecked(2, false); 329 fontMenu->setItemChecked(2, false);
320 abList->setFont( *defaultFont ); 330 abList->setFont( *defaultFont );
321 currentFont = new QFont (abList->font()); 331 currentFont = new QFont (abList->font());
322 // abList->resizeRows(currentFont->pixelSize() + 7); 332 // abList->resizeRows(currentFont->pixelSize() + 7);
323 abList->resizeRows(); 333 abList->resizeRows();
324 break; 334 break;
325 case 2: 335 case 2:
326 fontMenu->setItemChecked(0, false); 336 fontMenu->setItemChecked(0, false);
327 fontMenu->setItemChecked(1, false); 337 fontMenu->setItemChecked(1, false);
328 fontMenu->setItemChecked(2, true); 338 fontMenu->setItemChecked(2, true);
329 abList->setFont( QFont( defaultFont->family(), defaultFont->pointSize() + 2 ) ); 339 abList->setFont( QFont( defaultFont->family(), defaultFont->pointSize() + 2 ) );
330 currentFont = new QFont (abList->font()); 340 currentFont = new QFont (abList->font());
331 //abList->resizeRows(currentFont->pixelSize() + 7); 341 //abList->resizeRows(currentFont->pixelSize() + 7);
332 abList->resizeRows(); 342 abList->resizeRows();
333 break; 343 break;
334 } 344 }
335} 345}
336 346
337 347
338 348
339void AddressbookWindow::importvCard() { 349void AddressbookWindow::importvCard() {
340 QString str = OFileDialog::getOpenFileName( 1,"/");//,"", "*", this ); 350 QString str = OFileDialog::getOpenFileName( 1,"/");//,"", "*", this );
341 if(!str.isEmpty() ) 351 if(!str.isEmpty() )
342 setDocument((const QString&) str ); 352 setDocument((const QString&) str );
343 353
344} 354}
345 355
346void AddressbookWindow::setDocument( const QString &filename ) 356void AddressbookWindow::setDocument( const QString &filename )
347{ 357{
348 if ( filename.find(".vcf") != int(filename.length()) - 4 ) 358 if ( filename.find(".vcf") != int(filename.length()) - 4 )
349 return; 359 return;
350 360
351 QValueList<OContact> cl = OContact::readVCard( filename ); 361 QValueList<OContact> cl = OContact::readVCard( filename );
352 for( QValueList<OContact>::Iterator it = cl.begin(); it != cl.end(); ++it ) { 362 for( QValueList<OContact>::Iterator it = cl.begin(); it != cl.end(); ++it ) {
353 // QString msg = tr("You received a vCard for\n%1.\nDo You want to add it to your\naddressbook?") 363 // QString msg = tr("You received a vCard for\n%1.\nDo You want to add it to your\naddressbook?")
354 // .arg( (*it).fullName() ); 364 // .arg( (*it).fullName() );
355 // if ( QMessageBox::information( this, tr("received contact"), msg, QMessageBox::Ok, QMessageBox::Cancel ) == 365 // if ( QMessageBox::information( this, tr("received contact"), msg, QMessageBox::Ok, QMessageBox::Cancel ) ==
356 // QMessageBox::Ok ) { 366 // QMessageBox::Ok ) {
357 abList->addEntry( *it ); 367 abList->addEntry( *it );
358 // } 368 // }
359 } 369 }
360 370
361} 371}
362 372
363void AddressbookWindow::resizeEvent( QResizeEvent *e ) 373void AddressbookWindow::resizeEvent( QResizeEvent *e )
364{ 374{
365 QMainWindow::resizeEvent( e ); 375 QMainWindow::resizeEvent( e );
366 376
367 if ( centralWidget() == listContainer ) 377 if ( centralWidget() == listContainer )
368 showList(); 378 showList();
369 else if ( centralWidget() == mView ) 379 else if ( centralWidget() == mView )
370 showView(); 380 showView();
371} 381}
372 382
373AddressbookWindow::~AddressbookWindow() 383AddressbookWindow::~AddressbookWindow()
374{ 384{
375 Config cfg("AddressBook"); 385 Config cfg("AddressBook");
376 cfg.setGroup("Font"); 386 cfg.setGroup("Font");
377 cfg.writeEntry("fontSize", startFontSize); 387 cfg.writeEntry("fontSize", startFontSize);
378 388
379 cfg.setGroup("Search"); 389 cfg.setGroup("Search");
380 cfg.writeEntry("useRegExp", useRegExp); 390 cfg.writeEntry("useRegExp", useRegExp);
381 cfg.writeEntry("caseSensitive", caseSensitive); 391 cfg.writeEntry("caseSensitive", caseSensitive);
382 cfg.writeEntry("doNotifyWrapAround", doNotifyWrapAround); 392 cfg.writeEntry("doNotifyWrapAround", doNotifyWrapAround);
393 cfg.setGroup("Mail");
394 cfg.writeEntry( "useQtMail", m_useQtMail );
395 cfg.writeEntry( "useOpieMail", m_useOpieMail);
383} 396}
384 397
385void AddressbookWindow::slotUpdateToolbar() 398void AddressbookWindow::slotUpdateToolbar()
386{ 399{
387 OContact ce = abList->currentEntry(); 400 OContact ce = abList->currentEntry();
388 actionMail->setEnabled( !ce.defaultEmail().isEmpty() ); 401 actionMail->setEnabled( !ce.defaultEmail().isEmpty() );
389} 402}
390 403
391void AddressbookWindow::showList() 404void AddressbookWindow::showList()
392{ 405{
393 bool visiblemView; 406 bool visiblemView;
394 407
395 visiblemView = false; 408 visiblemView = false;
396 if ( mView ) { 409 if ( mView ) {
397 mView->hide(); 410 mView->hide();
398 visiblemView = true; 411 visiblemView = true;
399 } 412 }
400 setCentralWidget( listContainer ); 413 setCentralWidget( listContainer );
401 listContainer->show(); 414 listContainer->show();
402 // update our focues... (or use a stack widget!); 415 // update our focues... (or use a stack widget!);
403 abList->setFocus(); 416 abList->setFocus();
404 417
405 // This makes sure we are scrolled all the way to the left 418 // This makes sure we are scrolled all the way to the left
406 abList->setContentsPos( 0, abList->contentsY() ); 419 abList->setContentsPos( 0, abList->contentsY() );
407 420
408 //if ( visiblemView && abList->showBook() == "Cards" ) 421 //if ( visiblemView && abList->showBook() == "Cards" )
409 //abList->setShowCategory( abList->showBook(), abList->showCategory() ); 422 //abList->setShowCategory( abList->showBook(), abList->showCategory() );
410 423
411} 424}
412 425
413void AddressbookWindow::showView() 426void AddressbookWindow::showView()
414{ 427{
415 if ( abList->numRows() > 0 ) { 428 if ( abList->numRows() > 0 ) {
416 listContainer->hide(); 429 listContainer->hide();
417 setCentralWidget( abView() ); 430 setCentralWidget( abView() );
418 mView->show(); 431 mView->show();
419 mView->setFocus(); 432 mView->setFocus();
420 } 433 }
421} 434}
422 435
423void AddressbookWindow::slotListNew() 436void AddressbookWindow::slotListNew()
424{ 437{
425 OContact cnt; 438 OContact cnt;
426 if( !syncing ) { 439 if( !syncing ) {
427 if ( abEditor ) 440 if ( abEditor )
428 abEditor->setEntry( cnt ); 441 abEditor->setEntry( cnt );
429 abView()->init( cnt ); 442 abView()->init( cnt );
430 editEntry( NewEntry ); 443 editEntry( NewEntry );
@@ -449,98 +462,126 @@ void AddressbookWindow::slotListDelete()
449 // get a name, do the best we can... 462 // get a name, do the best we can...
450 QString strName = tmpEntry.fullName(); 463 QString strName = tmpEntry.fullName();
451 if ( strName.isEmpty() ) { 464 if ( strName.isEmpty() ) {
452 strName = tmpEntry.company(); 465 strName = tmpEntry.company();
453 if ( strName.isEmpty() ) 466 if ( strName.isEmpty() )
454 strName = "No Name"; 467 strName = "No Name";
455 } 468 }
456 469
457 470
458 if ( QPEMessageBox::confirmDelete( this, tr( "Contacts" ), 471 if ( QPEMessageBox::confirmDelete( this, tr( "Contacts" ),
459 strName ) ) { 472 strName ) ) {
460 abList->deleteCurrentEntry(); 473 abList->deleteCurrentEntry();
461 showList(); 474 showList();
462 } 475 }
463 } else { 476 } else {
464 QMessageBox::warning( this, tr("Contacts"), 477 QMessageBox::warning( this, tr("Contacts"),
465 tr("Can not edit data, currently syncing") ); 478 tr("Can not edit data, currently syncing") );
466 } 479 }
467} 480}
468 481
469void AddressbookWindow::slotViewBack() 482void AddressbookWindow::slotViewBack()
470{ 483{
471 showList(); 484 showList();
472} 485}
473 486
474void AddressbookWindow::slotViewEdit() 487void AddressbookWindow::slotViewEdit()
475{ 488{
476 if(!syncing) { 489 if(!syncing) {
477 if (actionPersonal->isOn()) { 490 if (actionPersonal->isOn()) {
478 editPersonal(); 491 editPersonal();
479 } else { 492 } else {
480 if ( !bAbEditFirstTime ) 493 if ( !bAbEditFirstTime )
481 abEditor->setEntry( abList->currentEntry() ); 494 abEditor->setEntry( abList->currentEntry() );
482 editEntry( EditEntry ); 495 editEntry( EditEntry );
483 } 496 }
484 } else { 497 } else {
485 QMessageBox::warning( this, tr("Contacts"), 498 QMessageBox::warning( this, tr("Contacts"),
486 tr("Can not edit data, currently syncing") ); 499 tr("Can not edit data, currently syncing") );
487 } 500 }
488} 501}
489 502
490 503
491 504
492void AddressbookWindow::writeMail() 505void AddressbookWindow::writeMail()
493{ 506{
494 OContact c = abList->currentEntry(); 507 OContact c = abList->currentEntry();
495 QString name = c.fileAs(); 508 QString name = c.fileAs();
496 QString email = c.defaultEmail(); 509 QString email = c.defaultEmail();
497 QCopEnvelope e("QPE/Application/qtmail", "writeMail(QString,QString)"); 510
498 e << name << email; 511 // I prefer the OPIE-Environment variable before the
512 // QPE-one..
513 QString basepath = QString::fromLatin1( getenv("OPIEDIR") );
514 if ( basepath.isEmpty() )
515 basepath = QString::fromLatin1( getenv("QPEDIR") );
516
517 // Try to access the preferred. If not possible, try to
518 // switch to the other one..
519 if ( m_useQtMail ){
520 qWarning ("Accessing: %s", (basepath + "/bin/qtmail").latin1());
521 if ( QFile::exists( basepath + "/bin/qtmail" ) ){
522 qWarning ("QCop");
523 QCopEnvelope e("QPE/Application/qtmail", "writeMail(QString,QString)");
524 e << name << email;
525 return;
526 } else
527 m_useOpieMail = true;
528 }
529 if ( m_useOpieMail ){
530 qWarning ("Accessing: %s", (basepath + "/bin/mail").latin1());
531 if ( QFile::exists( basepath + "/bin/mail" ) ){
532 qWarning ("QCop");
533 QCopEnvelope e("QPE/Application/mail", "writeMail(QString,QString)");
534 e << name << email;
535 return;
536 } else
537 m_useQtMail = true;
538 }
539
499} 540}
500 541
501static const char * beamfile = "/tmp/obex/contact.vcf"; 542static const char * beamfile = "/tmp/obex/contact.vcf";
502 543
503void AddressbookWindow::slotBeam() 544void AddressbookWindow::slotBeam()
504{ 545{
505 QString filename; 546 QString filename;
506 OContact c; 547 OContact c;
507 if ( actionPersonal->isOn() ) { 548 if ( actionPersonal->isOn() ) {
508 filename = addressbookPersonalVCardName(); 549 filename = addressbookPersonalVCardName();
509 if (!QFile::exists(filename)) 550 if (!QFile::exists(filename))
510 return; // can't beam a non-existent file 551 return; // can't beam a non-existent file
511 c = OContact::readVCard( filename )[0]; 552 c = OContact::readVCard( filename )[0];
512 } else { 553 } else {
513 unlink( beamfile ); // delete if exists 554 unlink( beamfile ); // delete if exists
514 c = abList->currentEntry(); 555 c = abList->currentEntry();
515 mkdir("/tmp/obex/", 0755); 556 mkdir("/tmp/obex/", 0755);
516 OContact::writeVCard( beamfile, c ); 557 OContact::writeVCard( beamfile, c );
517 filename = beamfile; 558 filename = beamfile;
518 } 559 }
519 Ir *ir = new Ir( this ); 560 Ir *ir = new Ir( this );
520 connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) ); 561 connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) );
521 QString description = c.fullName(); 562 QString description = c.fullName();
522 ir->send( filename, description, "text/x-vCard" ); 563 ir->send( filename, description, "text/x-vCard" );
523} 564}
524 565
525void AddressbookWindow::beamDone( Ir *ir ) 566void AddressbookWindow::beamDone( Ir *ir )
526{ 567{
527 delete ir; 568 delete ir;
528 unlink( beamfile ); 569 unlink( beamfile );
529} 570}
530 571
531 572
532static void parseName( const QString& name, QString *first, QString *middle, 573static void parseName( const QString& name, QString *first, QString *middle,
533 QString * last ) 574 QString * last )
534{ 575{
535 576
536 int comma = name.find ( "," ); 577 int comma = name.find ( "," );
537 QString rest; 578 QString rest;
538 if ( comma > 0 ) { 579 if ( comma > 0 ) {
539 *last = name.left( comma ); 580 *last = name.left( comma );
540 comma++; 581 comma++;
541 while ( comma < int(name.length()) && name[comma] == ' ' ) 582 while ( comma < int(name.length()) && name[comma] == ' ' )
542 comma++; 583 comma++;
543 rest = name.mid( comma ); 584 rest = name.mid( comma );
544 } else { 585 } else {
545 int space = name.findRev( ' ' ); 586 int space = name.findRev( ' ' );
546 *last = name.mid( space+1 ); 587 *last = name.mid( space+1 );
diff --git a/core/pim/addressbook/addressbook.h b/core/pim/addressbook/addressbook.h
index 299ed70..8027ccf 100644
--- a/core/pim/addressbook/addressbook.h
+++ b/core/pim/addressbook/addressbook.h
@@ -73,61 +73,64 @@ private slots:
73 void slotListNew(); 73 void slotListNew();
74 void slotListView(); 74 void slotListView();
75 void slotListDelete(); 75 void slotListDelete();
76 void slotViewBack(); 76 void slotViewBack();
77 void slotViewEdit(); 77 void slotViewEdit();
78 void slotPersonalView(); 78 void slotPersonalView();
79 void listIsEmpty( bool ); 79 void listIsEmpty( bool );
80 void slotSettings(); 80 void slotSettings();
81 void writeMail(); 81 void writeMail();
82 void slotBeam(); 82 void slotBeam();
83 void beamDone( Ir * ); 83 void beamDone( Ir * );
84 void slotSetCategory( int ); 84 void slotSetCategory( int );
85 void slotSetLetter( char ); 85 void slotSetLetter( char );
86 void slotUpdateToolbar(); 86 void slotUpdateToolbar();
87 void slotSetFont(int); 87 void slotSetFont(int);
88 88
89 void slotFindOpen(); 89 void slotFindOpen();
90 void slotFindClose(); 90 void slotFindClose();
91 void slotFind(); 91 void slotFind();
92 void slotNotFound(); 92 void slotNotFound();
93 void slotWrapAround(); 93 void slotWrapAround();
94 94
95 void slotConfig(); 95 void slotConfig();
96 96
97private: 97private:
98 void initFields(); // inititialize our fields... 98 void initFields(); // inititialize our fields...
99 AbLabel *abView(); 99 AbLabel *abView();
100 void populateCategories(); 100 void populateCategories();
101 101
102 QPopupMenu *catMenu, *fontMenu; 102 QPopupMenu *catMenu, *fontMenu;
103 QPEToolBar *listTools; 103 QPEToolBar *listTools;
104 QToolButton *deleteButton; 104 QToolButton *deleteButton;
105 QValueList<int> allFields, orderedFields; 105 QValueList<int> allFields, orderedFields;
106 QStringList slOrderedFields; 106 QStringList slOrderedFields;
107 enum Panes { paneList=0, paneView, paneEdit }; 107 enum Panes { paneList=0, paneView, paneEdit };
108 ContactEditor *abEditor; 108 ContactEditor *abEditor;
109 AbLabel *mView; 109 AbLabel *mView;
110 LetterPicker *pLabel; 110 LetterPicker *pLabel;
111 AbTable *abList; 111 AbTable *abList;
112 QWidget *listContainer; 112 QWidget *listContainer;
113 113
114 // Searching stuff 114 // Searching stuff
115 OFloatBar* searchBar; 115 OFloatBar* searchBar;
116 QLineEdit* searchEdit; 116 QLineEdit* searchEdit;
117 bool useRegExp; 117 bool useRegExp;
118 bool doNotifyWrapAround; 118 bool doNotifyWrapAround;
119 bool caseSensitive; 119 bool caseSensitive;
120 120
121 bool m_useQtMail;
122 bool m_useOpieMail;
123
121 QAction *actionNew, *actionEdit, *actionTrash, *actionFind, *actionBeam, *actionPersonal, *actionMail; 124 QAction *actionNew, *actionEdit, *actionTrash, *actionFind, *actionBeam, *actionPersonal, *actionMail;
122 125
123 bool bAbEditFirstTime; 126 bool bAbEditFirstTime;
124 int viewMargin; 127 int viewMargin;
125 128
126 bool syncing; 129 bool syncing;
127 QFont *defaultFont; 130 QFont *defaultFont;
128 int startFontSize; 131 int startFontSize;
129 132
130 bool isLoading; 133 bool isLoading;
131}; 134};
132 135
133#endif 136#endif
diff --git a/core/pim/addressbook/configdlg.cpp b/core/pim/addressbook/configdlg.cpp
index b7c3b77..c0195d1 100644
--- a/core/pim/addressbook/configdlg.cpp
+++ b/core/pim/addressbook/configdlg.cpp
@@ -1,45 +1,61 @@
1#include "configdlg.h" 1#include "configdlg.h"
2#include <qcheckbox.h> 2#include <qcheckbox.h>
3#include <qradiobutton.h> 3#include <qradiobutton.h>
4 4
5ConfigDlg::ConfigDlg( QWidget *parent = 0, const char *name = 0 ): 5ConfigDlg::ConfigDlg( QWidget *parent = 0, const char *name = 0 ):
6 ConfigDlg_Base(parent, name, true ) 6 ConfigDlg_Base(parent, name, true )
7{} 7{}
8 8
9 9
10bool ConfigDlg::useRegExp() const 10bool ConfigDlg::useRegExp() const
11{ 11{
12 return m_useRegExp->isOn(); 12 return m_useRegExp->isOn();
13} 13}
14bool ConfigDlg::useWildCards() const 14bool ConfigDlg::useWildCards() const
15{ 15{
16 return m_useWildCard->isOn(); 16 return m_useWildCard->isOn();
17} 17}
18bool ConfigDlg::useQtMail() const
19{
20 return m_useQtMail->isOn();
21}
22bool ConfigDlg::useOpieMail() const
23{
24 return m_useOpieMail->isOn();
25}
18bool ConfigDlg::beCaseSensitive() const 26bool ConfigDlg::beCaseSensitive() const
19{ 27{
20 return m_useCaseSensitive->isChecked(); 28 return m_useCaseSensitive->isChecked();
21} 29}
22bool ConfigDlg::signalWrapAround() const 30bool ConfigDlg::signalWrapAround() const
23{ 31{
24 return m_signalWrapAround->isChecked(); 32 return m_signalWrapAround->isChecked();
25} 33}
26void ConfigDlg::setUseRegExp( bool v ) 34void ConfigDlg::setUseRegExp( bool v )
27{ 35{
28 m_useRegExp->setChecked( v ); 36 m_useRegExp->setChecked( v );
29} 37}
30void ConfigDlg::setUseWildCards( bool v ) 38void ConfigDlg::setUseWildCards( bool v )
31{ 39{
32 m_useWildCard->setChecked( v ); 40 m_useWildCard->setChecked( v );
33} 41}
34void ConfigDlg::setBeCaseSensitive( bool v ) 42void ConfigDlg::setBeCaseSensitive( bool v )
35{ 43{
36 m_useCaseSensitive->setChecked( v ); 44 m_useCaseSensitive->setChecked( v );
37} 45}
38void ConfigDlg::setSignalWrapAround( bool v ) 46void ConfigDlg::setSignalWrapAround( bool v )
39{ 47{
40 m_signalWrapAround->setChecked( v ); 48 m_signalWrapAround->setChecked( v );
41} 49}
50void ConfigDlg::setQtMail( bool v )
51{
52 m_useQtMail->setChecked( v );
53}
54void ConfigDlg::setOpieMail( bool v )
55{
56 m_useOpieMail->setChecked( v );
57}
42 58
43 59
44 60
45 61
diff --git a/core/pim/addressbook/configdlg.h b/core/pim/addressbook/configdlg.h
index 8be469b..34e9718 100644
--- a/core/pim/addressbook/configdlg.h
+++ b/core/pim/addressbook/configdlg.h
@@ -1,25 +1,29 @@
1#ifndef _CONFIGDLG_H_ 1#ifndef _CONFIGDLG_H_
2#define _CONFIGDLG_H_ 2#define _CONFIGDLG_H_
3 3
4#include "configdlg_base.h" 4#include "configdlg_base.h"
5 5
6class ConfigDlg: public ConfigDlg_Base 6class ConfigDlg: public ConfigDlg_Base
7{ 7{
8 Q_OBJECT 8 Q_OBJECT
9public: 9public:
10 ConfigDlg( QWidget *parent = 0, const char *name = 0 ); 10 ConfigDlg( QWidget *parent = 0, const char *name = 0 );
11 11
12 // Search Settings 12 // Search Settings
13 bool useRegExp() const; 13 bool useRegExp() const;
14 bool useWildCards() const; 14 bool useWildCards() const;
15 bool beCaseSensitive() const; 15 bool beCaseSensitive() const;
16 bool signalWrapAround() const; 16 bool signalWrapAround() const;
17 bool useQtMail() const;
18 bool useOpieMail() const;
17 19
18 void setUseRegExp( bool v ); 20 void setUseRegExp( bool v );
19 void setUseWildCards( bool v ); 21 void setUseWildCards( bool v );
20 void setBeCaseSensitive( bool v ); 22 void setBeCaseSensitive( bool v );
21 void setSignalWrapAround( bool v ); 23 void setSignalWrapAround( bool v );
24 void setQtMail( bool v );
25 void setOpieMail( bool v );
22}; 26};
23 27
24 28
25#endif 29#endif
diff --git a/core/pim/addressbook/configdlg_base.ui b/core/pim/addressbook/configdlg_base.ui
index e082702..d3ea12e 100644
--- a/core/pim/addressbook/configdlg_base.ui
+++ b/core/pim/addressbook/configdlg_base.ui
@@ -1,63 +1,63 @@
1<!DOCTYPE UI><UI> 1<!DOCTYPE UI><UI>
2<class>ConfigDlg_Base</class> 2<class>ConfigDlg_Base</class>
3<author>Stefan Eilers</author> 3<author>Stefan Eilers</author>
4<widget> 4<widget>
5 <class>QDialog</class> 5 <class>QDialog</class>
6 <property stdset="1"> 6 <property stdset="1">
7 <name>name</name> 7 <name>name</name>
8 <cstring>Configuration</cstring> 8 <cstring>Configuration</cstring>
9 </property> 9 </property>
10 <property stdset="1"> 10 <property stdset="1">
11 <name>geometry</name> 11 <name>geometry</name>
12 <rect> 12 <rect>
13 <x>0</x> 13 <x>0</x>
14 <y>0</y> 14 <y>0</y>
15 <width>227</width> 15 <width>217</width>
16 <height>287</height> 16 <height>287</height>
17 </rect> 17 </rect>
18 </property> 18 </property>
19 <property stdset="1"> 19 <property stdset="1">
20 <name>caption</name> 20 <name>caption</name>
21 <string>MyDialog1</string> 21 <string>MyDialog1</string>
22 </property> 22 </property>
23 <property stdset="1"> 23 <property stdset="1">
24 <name>sizeGripEnabled</name> 24 <name>sizeGripEnabled</name>
25 <bool>true</bool> 25 <bool>true</bool>
26 </property> 26 </property>
27 <vbox> 27 <vbox>
28 <property stdset="1"> 28 <property stdset="1">
29 <name>margin</name> 29 <name>margin</name>
30 <number>11</number> 30 <number>11</number>
31 </property> 31 </property>
32 <property stdset="1"> 32 <property stdset="1">
33 <name>spacing</name> 33 <name>spacing</name>
34 <number>6</number> 34 <number>6</number>
35 </property> 35 </property>
36 <widget> 36 <widget>
37 <class>QTabWidget</class> 37 <class>QTabWidget</class>
38 <property stdset="1"> 38 <property stdset="1">
39 <name>name</name> 39 <name>name</name>
40 <cstring>configDlg_base</cstring> 40 <cstring>configDlg_base</cstring>
41 </property> 41 </property>
42 <property> 42 <property>
43 <name>layoutMargin</name> 43 <name>layoutMargin</name>
44 </property> 44 </property>
45 <widget> 45 <widget>
46 <class>QWidget</class> 46 <class>QWidget</class>
47 <property stdset="1"> 47 <property stdset="1">
48 <name>name</name> 48 <name>name</name>
49 <cstring>Widget5</cstring> 49 <cstring>Widget5</cstring>
50 </property> 50 </property>
51 <attribute> 51 <attribute>
52 <name>title</name> 52 <name>title</name>
53 <string>Search</string> 53 <string>Search</string>
54 </attribute> 54 </attribute>
55 <vbox> 55 <vbox>
56 <property stdset="1"> 56 <property stdset="1">
57 <name>margin</name> 57 <name>margin</name>
58 <number>5</number> 58 <number>5</number>
59 </property> 59 </property>
60 <property stdset="1"> 60 <property stdset="1">
61 <name>spacing</name> 61 <name>spacing</name>
62 <number>6</number> 62 <number>6</number>
63 </property> 63 </property>
@@ -108,96 +108,199 @@
108 </widget> 108 </widget>
109 </vbox> 109 </vbox>
110 </widget> 110 </widget>
111 <widget> 111 <widget>
112 <class>QCheckBox</class> 112 <class>QCheckBox</class>
113 <property stdset="1"> 113 <property stdset="1">
114 <name>name</name> 114 <name>name</name>
115 <cstring>m_useCaseSensitive</cstring> 115 <cstring>m_useCaseSensitive</cstring>
116 </property> 116 </property>
117 <property stdset="1"> 117 <property stdset="1">
118 <name>text</name> 118 <name>text</name>
119 <string>Case Sensitive</string> 119 <string>Case Sensitive</string>
120 </property> 120 </property>
121 </widget> 121 </widget>
122 <widget> 122 <widget>
123 <class>QCheckBox</class> 123 <class>QCheckBox</class>
124 <property stdset="1"> 124 <property stdset="1">
125 <name>name</name> 125 <name>name</name>
126 <cstring>m_signalWrapAround</cstring> 126 <cstring>m_signalWrapAround</cstring>
127 </property> 127 </property>
128 <property stdset="1"> 128 <property stdset="1">
129 <name>text</name> 129 <name>text</name>
130 <string>Signal Wrap Around</string> 130 <string>Signal Wrap Around</string>
131 </property> 131 </property>
132 </widget> 132 </widget>
133 <spacer> 133 <spacer>
134 <property> 134 <property>
135 <name>name</name> 135 <name>name</name>
136 <cstring>Spacer3</cstring> 136 <cstring>Spacer3</cstring>
137 </property> 137 </property>
138 <property stdset="1"> 138 <property stdset="1">
139 <name>orientation</name> 139 <name>orientation</name>
140 <enum>Vertical</enum> 140 <enum>Vertical</enum>
141 </property> 141 </property>
142 <property stdset="1"> 142 <property stdset="1">
143 <name>sizeType</name> 143 <name>sizeType</name>
144 <enum>Expanding</enum> 144 <enum>Expanding</enum>
145 </property> 145 </property>
146 <property> 146 <property>
147 <name>sizeHint</name> 147 <name>sizeHint</name>
148 <size> 148 <size>
149 <width>20</width> 149 <width>20</width>
150 <height>20</height> 150 <height>20</height>
151 </size> 151 </size>
152 </property> 152 </property>
153 </spacer> 153 </spacer>
154 </vbox> 154 </vbox>
155 </widget> 155 </widget>
156 <widget>
157 <class>QWidget</class>
158 <property stdset="1">
159 <name>name</name>
160 <cstring>tab</cstring>
161 </property>
162 <attribute>
163 <name>title</name>
164 <string>Mail</string>
165 </attribute>
166 <vbox>
167 <property stdset="1">
168 <name>margin</name>
169 <number>5</number>
170 </property>
171 <property stdset="1">
172 <name>spacing</name>
173 <number>6</number>
174 </property>
175 <widget>
176 <class>QButtonGroup</class>
177 <property stdset="1">
178 <name>name</name>
179 <cstring>ButtonGroup2</cstring>
180 </property>
181 <property stdset="1">
182 <name>title</name>
183 <string>Mail</string>
184 </property>
185 <vbox>
186 <property stdset="1">
187 <name>margin</name>
188 <number>11</number>
189 </property>
190 <property stdset="1">
191 <name>spacing</name>
192 <number>6</number>
193 </property>
194 <widget>
195 <class>QRadioButton</class>
196 <property stdset="1">
197 <name>name</name>
198 <cstring>m_useQtMail</cstring>
199 </property>
200 <property stdset="1">
201 <name>text</name>
202 <string>Prefer QT-Mail </string>
203 </property>
204 <property stdset="1">
205 <name>checked</name>
206 <bool>true</bool>
207 </property>
208 </widget>
209 <widget>
210 <class>QRadioButton</class>
211 <property stdset="1">
212 <name>name</name>
213 <cstring>m_useOpieMail</cstring>
214 </property>
215 <property stdset="1">
216 <name>text</name>
217 <string>Prefer Opie-Mail</string>
218 </property>
219 </widget>
220 <widget>
221 <class>QLabel</class>
222 <property stdset="1">
223 <name>name</name>
224 <cstring>TextLabel1</cstring>
225 </property>
226 <property stdset="1">
227 <name>text</name>
228 <string>Notice: QT-Mail is just
229provided in the SHARP
230default ROM. Opie-Mail
231is provided free !</string>
232 </property>
233 </widget>
234 </vbox>
235 </widget>
236 <spacer>
237 <property>
238 <name>name</name>
239 <cstring>Spacer2</cstring>
240 </property>
241 <property stdset="1">
242 <name>orientation</name>
243 <enum>Vertical</enum>
244 </property>
245 <property stdset="1">
246 <name>sizeType</name>
247 <enum>Expanding</enum>
248 </property>
249 <property>
250 <name>sizeHint</name>
251 <size>
252 <width>20</width>
253 <height>20</height>
254 </size>
255 </property>
256 </spacer>
257 </vbox>
258 </widget>
156 </widget> 259 </widget>
157 <widget> 260 <widget>
158 <class>QLayoutWidget</class> 261 <class>QLayoutWidget</class>
159 <property stdset="1"> 262 <property stdset="1">
160 <name>name</name> 263 <name>name</name>
161 <cstring>Layout1</cstring> 264 <cstring>Layout1</cstring>
162 </property> 265 </property>
163 <hbox> 266 <hbox>
164 <property stdset="1"> 267 <property stdset="1">
165 <name>margin</name> 268 <name>margin</name>
166 <number>0</number> 269 <number>0</number>
167 </property> 270 </property>
168 <property stdset="1"> 271 <property stdset="1">
169 <name>spacing</name> 272 <name>spacing</name>
170 <number>6</number> 273 <number>6</number>
171 </property> 274 </property>
172 <widget> 275 <widget>
173 <class>QPushButton</class> 276 <class>QPushButton</class>
174 <property stdset="1"> 277 <property stdset="1">
175 <name>name</name> 278 <name>name</name>
176 <cstring>buttonOk</cstring> 279 <cstring>buttonOk</cstring>
177 </property> 280 </property>
178 <property stdset="1"> 281 <property stdset="1">
179 <name>text</name> 282 <name>text</name>
180 <string>&amp;OK</string> 283 <string>&amp;OK</string>
181 </property> 284 </property>
182 <property stdset="1"> 285 <property stdset="1">
183 <name>autoDefault</name> 286 <name>autoDefault</name>
184 <bool>true</bool> 287 <bool>true</bool>
185 </property> 288 </property>
186 <property stdset="1"> 289 <property stdset="1">
187 <name>default</name> 290 <name>default</name>
188 <bool>true</bool> 291 <bool>true</bool>
189 </property> 292 </property>
190 </widget> 293 </widget>
191 <widget> 294 <widget>
192 <class>QPushButton</class> 295 <class>QPushButton</class>
193 <property stdset="1"> 296 <property stdset="1">
194 <name>name</name> 297 <name>name</name>
195 <cstring>buttonCancel</cstring> 298 <cstring>buttonCancel</cstring>
196 </property> 299 </property>
197 <property stdset="1"> 300 <property stdset="1">
198 <name>text</name> 301 <name>text</name>
199 <string>&amp;Cancel</string> 302 <string>&amp;Cancel</string>
200 </property> 303 </property>
201 <property stdset="1"> 304 <property stdset="1">
202 <name>autoDefault</name> 305 <name>autoDefault</name>
203 <bool>true</bool> 306 <bool>true</bool>
diff --git a/core/pim/addressbook/opie-addressbook.control b/core/pim/addressbook/opie-addressbook.control
index 14b0770..0a04ee6 100644
--- a/core/pim/addressbook/opie-addressbook.control
+++ b/core/pim/addressbook/opie-addressbook.control
@@ -1,9 +1,9 @@
1Files: bin/addressbook apps/1Pim/addressbook.desktop 1Files: bin/addressbook apps/1Pim/addressbook.desktop
2Priority: optional 2Priority: optional
3Section: opie/applications 3Section: opie/applications
4Maintainer: Warwick Allison <warwick@trolltech.com> 4Maintainer: Stefan Eilers <eilers.stefan@epost.de>
5Architecture: arm 5Architecture: arm
6Version: $QPE_VERSION-$SUB_VERSION 6Version: $QPE_VERSION-$SUB_VERSION
7Depends: opie-base ($QPE_VERSION) libopie 7Depends: opie-base ($QPE_VERSION) libopie
8Description: Contacts 8Description: Contacts
9 A simple addressbook for the Opie environment. 9 A simple addressbook for the Opie environment.
diff --git a/core/pim/addressbook/picker.cpp b/core/pim/addressbook/picker.cpp
index 7f4acb0..2c7dd71 100644
--- a/core/pim/addressbook/picker.cpp
+++ b/core/pim/addressbook/picker.cpp
@@ -48,133 +48,133 @@ void PickerLabel::setLetters( char ch1, char ch2, char ch3 )
48 48
49 tmpStr = "<qt>"; 49 tmpStr = "<qt>";
50 tmpStr += letter1; 50 tmpStr += letter1;
51 tmpStr += letter2; 51 tmpStr += letter2;
52 tmpStr += letter3; 52 tmpStr += letter3;
53 tmpStr += "</qt>"; 53 tmpStr += "</qt>";
54 54
55 setText(tmpStr); 55 setText(tmpStr);
56 56
57 currentLetter = 0; 57 currentLetter = 0;
58 58
59} 59}
60 60
61void PickerLabel::clearLetter() 61void PickerLabel::clearLetter()
62{ 62{
63 63
64 QString tmpStr; 64 QString tmpStr;
65 65
66 tmpStr = "<qt>"; 66 tmpStr = "<qt>";
67 tmpStr += letter1; 67 tmpStr += letter1;
68 tmpStr += letter2; 68 tmpStr += letter2;
69 tmpStr += letter3; 69 tmpStr += letter3;
70 tmpStr += "</qt>"; 70 tmpStr += "</qt>";
71 71
72 setText(tmpStr); 72 setText(tmpStr);
73 73
74 currentLetter = 0; 74 currentLetter = 0;
75 75
76} 76}
77 77
78void PickerLabel::mousePressEvent( QMouseEvent* e ) 78void PickerLabel::mousePressEvent( QMouseEvent* e )
79{ 79{
80 // If one pickerlabel is was, and an other is now selected, we 80 // If one pickerlabel is was, and an other is now selected, we
81 // have to simulate the releaseevent.. Otherwise the new label 81 // have to simulate the releaseevent.. Otherwise the new label
82 // will not get a highlighted letter.. 82 // will not get a highlighted letter..
83 // Maybe there is a more intelligent solution, but this works and I am tired.. (se) 83 // Maybe there is a more intelligent solution, but this works and I am tired.. (se)
84 if ( ( currentLetter == 0 ) && ( lastLetter != '\0' ) ) mouseReleaseEvent( e ); 84 if ( ( currentLetter == 0 ) && ( lastLetter != '\0' ) ) mouseReleaseEvent( e );
85} 85}
86 86
87void PickerLabel::mouseReleaseEvent( QMouseEvent* /* e */ ) 87void PickerLabel::mouseReleaseEvent( QMouseEvent* /* e */ )
88{ 88{
89 QString tmpStr; 89 QString tmpStr;
90 90
91 if (lastLetter != letter1 && lastLetter != letter2 && lastLetter != letter3 && lastLetter != '\0') 91 if (lastLetter != letter1 && lastLetter != letter2 && lastLetter != letter3 && lastLetter != '\0')
92 QTimer::singleShot( 0, this, SLOT(emitClearSignal()) ); 92 QTimer::singleShot( 0, this, SLOT(emitClearSignal()) );
93 93
94 switch (currentLetter) { 94 switch (currentLetter) {
95 case 0: 95 case 0:
96 tmpStr = "<qt><u><font color=\"#7F0000\">"; 96 tmpStr = "<qt><u><b><font color=\"#FF00FF\">";
97 tmpStr += letter1; 97 tmpStr += letter1;
98 tmpStr += "</font></u>"; 98 tmpStr += "</font></b></u>";
99 tmpStr += letter2; 99 tmpStr += letter2;
100 tmpStr += letter3; 100 tmpStr += letter3;
101 tmpStr += "</qt>"; 101 tmpStr += "</qt>";
102 102
103 setText(tmpStr); 103 setText(tmpStr);
104 104
105 currentLetter++; 105 currentLetter++;
106 lastLetter = letter1; 106 lastLetter = letter1;
107 emit selectedLetter( letter1 ); 107 emit selectedLetter( letter1 );
108 break; 108 break;
109 109
110 case 1: 110 case 1:
111 tmpStr = "<qt>"; 111 tmpStr = "<qt>";
112 tmpStr += letter1; 112 tmpStr += letter1;
113 tmpStr += "<u><font color=\"#7F0000\">"; 113 tmpStr += "<u><b><font color=\"#FF00FF\">";
114 tmpStr += letter2; 114 tmpStr += letter2;
115 tmpStr += "</font></u>"; 115 tmpStr += "</font></b></u>";
116 tmpStr += letter3; 116 tmpStr += letter3;
117 tmpStr += "</qt>"; 117 tmpStr += "</qt>";
118 118
119 setText(tmpStr); 119 setText(tmpStr);
120 120
121 currentLetter++; 121 currentLetter++;
122 lastLetter = letter2; 122 lastLetter = letter2;
123 emit selectedLetter( letter2 ); 123 emit selectedLetter( letter2 );
124 break; 124 break;
125 125
126 case 2: 126 case 2:
127 tmpStr = "<qt>"; 127 tmpStr = "<qt>";
128 tmpStr += letter1; 128 tmpStr += letter1;
129 tmpStr += letter2; 129 tmpStr += letter2;
130 tmpStr += "<u><font color=\"#7F0000\">"; 130 tmpStr += "<u><b><font color=\"#FF00FF\">";
131 tmpStr += letter3; 131 tmpStr += letter3;
132 tmpStr += "</font></u></qt>"; 132 tmpStr += "</font></b></u></qt>";
133 133
134 setText(tmpStr); 134 setText(tmpStr);
135 135
136 currentLetter++; 136 currentLetter++;
137 lastLetter = letter3; 137 lastLetter = letter3;
138 emit selectedLetter( letter3 ); 138 emit selectedLetter( letter3 );
139 break; 139 break;
140 140
141 default: 141 default:
142 clearLetter(); 142 clearLetter();
143 lastLetter = '\0'; 143 lastLetter = '\0';
144 emit selectedLetter( '\0' ); 144 emit selectedLetter( '\0' );
145 145
146 146
147 } 147 }
148} 148}
149 149
150void PickerLabel::emitClearSignal() { 150void PickerLabel::emitClearSignal() {
151 emit clearAll(); 151 emit clearAll();
152} 152}
153 153
154LetterPicker::LetterPicker( QWidget *parent, const char *name ) 154LetterPicker::LetterPicker( QWidget *parent, const char *name )
155 : QFrame( parent, name ) 155 : QFrame( parent, name )
156{ 156{
157 QHBoxLayout *l = new QHBoxLayout(this); 157 QHBoxLayout *l = new QHBoxLayout(this);
158 158
159 lblABC = new PickerLabel( this ); 159 lblABC = new PickerLabel( this );
160 l->addWidget( lblABC ); 160 l->addWidget( lblABC );
161 161
162 lblDEF = new PickerLabel( this ); 162 lblDEF = new PickerLabel( this );
163 l->addWidget( lblDEF ); 163 l->addWidget( lblDEF );
164 164
165 lblGHI = new PickerLabel( this ); 165 lblGHI = new PickerLabel( this );
166 l->addWidget( lblGHI ); 166 l->addWidget( lblGHI );
167 167
168 lblJKL = new PickerLabel( this ); 168 lblJKL = new PickerLabel( this );
169 l->addWidget( lblJKL ); 169 l->addWidget( lblJKL );
170 170
171 lblMNO = new PickerLabel( this ); 171 lblMNO = new PickerLabel( this );
172 l->addWidget( lblMNO ); 172 l->addWidget( lblMNO );
173 173
174 lblPQR = new PickerLabel( this ); 174 lblPQR = new PickerLabel( this );
175 l->addWidget( lblPQR ); 175 l->addWidget( lblPQR );
176 176
177 lblSTU = new PickerLabel( this ); 177 lblSTU = new PickerLabel( this );
178 l->addWidget( lblSTU ); 178 l->addWidget( lblSTU );
179 179
180 lblVWX = new PickerLabel( this ); 180 lblVWX = new PickerLabel( this );