summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/addressbook.cpp6
-rw-r--r--core/pim/addressbook/configdlg_base.ui4
2 files changed, 2 insertions, 8 deletions
diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp
index c506e98..58fbccf 100644
--- a/core/pim/addressbook/addressbook.cpp
+++ b/core/pim/addressbook/addressbook.cpp
@@ -1,962 +1,960 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qt Palmtop Environment. 4** This file is part of Qt Palmtop Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** OContact info@trolltech.com if any conditions of this licensing are 16** OContact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#define QTOPIA_INTERNAL_FD 21#define QTOPIA_INTERNAL_FD
22 22
23#include "contacteditor.h" 23#include "contacteditor.h"
24#include "ablabel.h" 24#include "ablabel.h"
25#include "abview.h" 25#include "abview.h"
26#include "abtable.h" 26#include "abtable.h"
27// #include "addresssettings.h" 27// #include "addresssettings.h"
28#include "addressbook.h" 28#include "addressbook.h"
29 29
30 30
31#include <opie/ofileselector.h> 31#include <opie/ofileselector.h>
32#include <opie/ofiledialog.h> 32#include <opie/ofiledialog.h>
33#include <opie/ocontact.h> 33#include <opie/ocontact.h>
34#include <opie/ocontactaccessbackend_vcard.h> 34#include <opie/ocontactaccessbackend_vcard.h>
35 35
36#include <qpe/resource.h> 36#include <qpe/resource.h>
37#include <qpe/ir.h> 37#include <qpe/ir.h>
38#include <qpe/qpemessagebox.h> 38#include <qpe/qpemessagebox.h>
39#include <qpe/qcopenvelope_qws.h> 39#include <qpe/qcopenvelope_qws.h>
40#include <qpe/qpetoolbar.h> 40#include <qpe/qpetoolbar.h>
41#include <qpe/qpemenubar.h> 41#include <qpe/qpemenubar.h>
42// #include <qtoolbar.h> 42// #include <qtoolbar.h>
43// #include <qmenubar.h> 43// #include <qmenubar.h>
44#include <qpe/qpeapplication.h> 44#include <qpe/qpeapplication.h>
45#include <qpe/config.h> 45#include <qpe/config.h>
46 46
47#include <qaction.h> 47#include <qaction.h>
48#include <qdialog.h> 48#include <qdialog.h>
49#include <qdir.h> 49#include <qdir.h>
50#include <qfile.h> 50#include <qfile.h>
51#include <qimage.h> 51#include <qimage.h>
52#include <qlayout.h> 52#include <qlayout.h>
53#include <qmessagebox.h> 53#include <qmessagebox.h>
54#include <qpixmap.h> 54#include <qpixmap.h>
55#include <qpopupmenu.h> 55#include <qpopupmenu.h>
56#include <qstringlist.h> 56#include <qstringlist.h>
57#include <qtoolbutton.h> 57#include <qtoolbutton.h>
58#include <qwhatsthis.h> 58#include <qwhatsthis.h>
59#include <qdatetime.h> 59#include <qdatetime.h>
60 60
61#include <stdlib.h> 61#include <stdlib.h>
62#include <sys/stat.h> 62#include <sys/stat.h>
63#include <sys/types.h> 63#include <sys/types.h>
64#include <fcntl.h> 64#include <fcntl.h>
65#include <unistd.h> 65#include <unistd.h>
66 66
67 67
68#include "picker.h" 68#include "picker.h"
69#include "configdlg.h" 69#include "configdlg.h"
70 70
71extern QString addressbookPersonalVCardName(); 71extern QString addressbookPersonalVCardName();
72 72
73AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name, 73AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name,
74 WFlags f ) 74 WFlags f )
75 : QMainWindow( parent, name, f ), 75 : QMainWindow( parent, name, f ),
76 catMenu (0l), 76 catMenu (0l),
77 abEditor(0l), 77 abEditor(0l),
78 syncing(FALSE), 78 syncing(FALSE),
79 m_tableViewButton(0l), 79 m_tableViewButton(0l),
80 m_cardViewButton(0l) 80 m_cardViewButton(0l)
81{ 81{
82 isLoading = true; 82 isLoading = true;
83 83
84 m_config.load(); 84 m_config.load();
85 85
86 setCaption( tr("Contacts") ); 86 setCaption( tr("Contacts") );
87 setIcon( Resource::loadPixmap( "AddressBook" ) ); 87 setIcon( Resource::loadPixmap( "AddressBook" ) );
88 88
89 // Settings for Main Menu 89 // Settings for Main Menu
90 setToolBarsMovable( true ); 90 setToolBarsMovable( true );
91 setRightJustification( true ); 91 setRightJustification( true );
92 92
93 // Create Toolbar 93 // Create Toolbar
94 listTools = new QPEToolBar( this, "list operations" ); 94 listTools = new QPEToolBar( this, "list operations" );
95 listTools->setHorizontalStretchable( true ); 95 listTools->setHorizontalStretchable( true );
96 addToolBar( listTools ); 96 addToolBar( listTools );
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( "datebook/weeklst" ), 107 m_tableViewButton = new QAction( tr( "List" ), Resource::loadPixmap( "datebook/weeklst" ),
108 QString::null, 0, this, 0 ); 108 QString::null, 0, this, 0 );
109 connect( m_tableViewButton, SIGNAL( activated() ), this, SLOT( slotListView() ) ); 109 connect( m_tableViewButton, SIGNAL( activated() ), this, SLOT( slotListView() ) );
110 m_tableViewButton->setToggleAction( true ); 110 m_tableViewButton->setToggleAction( true );
111 m_tableViewButton->addTo( listTools ); 111 m_tableViewButton->addTo( listTools );
112 m_cardViewButton = new QAction( tr( "Card" ), Resource::loadPixmap( "day" ), QString::null, 0, this, 0 ); 112 m_cardViewButton = new QAction( tr( "Card" ), Resource::loadPixmap( "day" ), QString::null, 0, this, 0 );
113 connect( m_cardViewButton, SIGNAL( activated() ), this, SLOT( slotCardView() ) ); 113 connect( m_cardViewButton, SIGNAL( activated() ), this, SLOT( slotCardView() ) );
114 m_cardViewButton->setToggleAction( true ); 114 m_cardViewButton->setToggleAction( true );
115 m_cardViewButton->addTo( listTools ); 115 m_cardViewButton->addTo( listTools );
116 116
117 listTools->addSeparator(); 117 listTools->addSeparator();
118 118
119 // Other Buttons 119 // Other Buttons
120 QAction *a = new QAction( tr( "New" ), Resource::loadPixmap( "new" ), QString::null, 120 QAction *a = new QAction( tr( "New" ), Resource::loadPixmap( "new" ), QString::null,
121 0, this, 0 ); 121 0, this, 0 );
122 actionNew = a; 122 actionNew = a;
123 connect( a, SIGNAL( activated() ), this, SLOT( slotListNew() ) ); 123 connect( a, SIGNAL( activated() ), this, SLOT( slotListNew() ) );
124 a->addTo( edit ); 124 a->addTo( edit );
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,
128 0, this, 0 ); 128 0, this, 0 );
129 actionEdit = a; 129 actionEdit = a;
130 connect( a, SIGNAL( activated() ), this, SLOT( slotViewEdit() ) ); 130 connect( a, SIGNAL( activated() ), this, SLOT( slotViewEdit() ) );
131 a->addTo( edit ); 131 a->addTo( edit );
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,
135 0, this, 0 ); 135 0, this, 0 );
136 actionTrash = a; 136 actionTrash = a;
137 connect( a, SIGNAL( activated() ), this, SLOT( slotListDelete() ) ); 137 connect( a, SIGNAL( activated() ), this, SLOT( slotListDelete() ) );
138 a->addTo( edit ); 138 a->addTo( edit );
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) 143#if defined(Q_WS_QWS)
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 );
146 connect (addressChannel, SIGNAL( received(const QCString &, const QByteArray &)), 146 connect (addressChannel, SIGNAL( received(const QCString &, const QByteArray &)),
147 this, SLOT ( appMessage(const QCString &, const QByteArray &) ) ); 147 this, SLOT ( appMessage(const QCString &, const QByteArray &) ) );
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" ),
151 QString::null, 0, this, 0 ); 151 QString::null, 0, this, 0 );
152 actionFind = a; 152 actionFind = a;
153 connect( a, SIGNAL(activated()), this, SLOT( slotFindOpen()) ); 153 connect( a, SIGNAL(activated()), this, SLOT( slotFindOpen()) );
154 a->addTo( edit ); 154 a->addTo( edit );
155 a->addTo( listTools ); 155 a->addTo( listTools );
156 156
157 // Much better search widget, taken from QTReader.. (se) 157 // Much better search widget, taken from QTReader.. (se)
158 searchBar = new OFloatBar( "Search", this, QMainWindow::Top, TRUE ); 158 searchBar = new OFloatBar( "Search", this, QMainWindow::Top, TRUE );
159 searchBar->setHorizontalStretchable( TRUE ); 159 searchBar->setHorizontalStretchable( TRUE );
160 searchBar->hide(); 160 searchBar->hide();
161 searchEdit = new QLineEdit( searchBar, "searchEdit" ); 161 searchEdit = new QLineEdit( searchBar, "searchEdit" );
162 162
163 // QFont f("unifont", 16 /*, QFont::Bold*/); 163 // QFont f("unifont", 16 /*, QFont::Bold*/);
164 // searchEdit->setFont( f ); 164 // searchEdit->setFont( f );
165 165
166 searchBar->setStretchableWidget( searchEdit ); 166 searchBar->setStretchableWidget( searchEdit );
167 connect( searchEdit, SIGNAL( returnPressed( ) ), 167 connect( searchEdit, SIGNAL( returnPressed( ) ),
168 this, SLOT( slotFind( ) ) ); 168 this, SLOT( slotFind( ) ) );
169 169
170 a = new QAction( tr( "Start Search" ), Resource::loadPixmap( "enter" ), QString::null, 0, this, 0 ); 170 a = new QAction( tr( "Start Search" ), Resource::loadPixmap( "enter" ), QString::null, 0, this, 0 );
171 connect( a, SIGNAL( activated() ), this, SLOT( slotFind() ) ); 171 connect( a, SIGNAL( activated() ), this, SLOT( slotFind() ) );
172 a->addTo( searchBar ); 172 a->addTo( searchBar );
173 173
174 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 );
175 connect( a, SIGNAL( activated() ), this, SLOT( slotFindClose() ) ); 175 connect( a, SIGNAL( activated() ), this, SLOT( slotFindClose() ) );
176 a->addTo( searchBar ); 176 a->addTo( searchBar );
177 177
178 a = new QAction( tr( "Write Mail To" ), Resource::loadPixmap( "mail/sendmail" ), 178 a = new QAction( tr( "Write Mail To" ), Resource::loadPixmap( "mail/sendmail" ),
179 QString::null, 0, this, 0 ); 179 QString::null, 0, this, 0 );
180 //a->setEnabled( FALSE ); we got support for it now :) zecke 180 //a->setEnabled( FALSE ); we got support for it now :) zecke
181 actionMail = a; 181 actionMail = a;
182 connect( a, SIGNAL( activated() ), this, SLOT( writeMail() ) ); 182 connect( a, SIGNAL( activated() ), this, SLOT( writeMail() ) );
183 a->addTo( edit ); 183 a->addTo( edit );
184 a->addTo( listTools ); 184 a->addTo( listTools );
185 185
186 if ( Ir::supported() ) { 186 if ( Ir::supported() ) {
187 a = new QAction( tr ("Beam Entry" ), Resource::loadPixmap( "beam" ), QString::null, 187 a = new QAction( tr ("Beam Entry" ), Resource::loadPixmap( "beam" ), QString::null,
188 0, this, 0 ); 188 0, this, 0 );
189 actionBeam = a; 189 actionBeam = a;
190 connect( a, SIGNAL( activated() ), this, SLOT( slotBeam() ) ); 190 connect( a, SIGNAL( activated() ), this, SLOT( slotBeam() ) );
191 a->addTo( edit ); 191 a->addTo( edit );
192 a->addTo( listTools ); 192 a->addTo( listTools );
193 } 193 }
194 194
195 edit->insertSeparator(); 195 edit->insertSeparator();
196 196
197 a = new QAction( tr("Import vCard"), QString::null, 0, 0); 197 a = new QAction( tr("Import vCard"), QString::null, 0, 0);
198 actionPersonal = a; 198 actionPersonal = a;
199 connect( a, SIGNAL( activated() ), this, SLOT( importvCard() ) ); 199 connect( a, SIGNAL( activated() ), this, SLOT( importvCard() ) );
200 a->addTo( edit ); 200 a->addTo( edit );
201 201
202 edit->insertSeparator(); 202 edit->insertSeparator();
203 203
204 a = new QAction( tr("My Personal Details"), QString::null, 0, 0, 0, TRUE ); 204 a = new QAction( tr("My Personal Details"), QString::null, 0, 0, 0, TRUE );
205 actionPersonal = a; 205 actionPersonal = a;
206 connect( a, SIGNAL( activated() ), this, SLOT( slotPersonalView() ) ); 206 connect( a, SIGNAL( activated() ), this, SLOT( slotPersonalView() ) );
207 a->addTo( edit ); 207 a->addTo( edit );
208 208
209 209
210#ifdef __DEBUG_RELEASE 210#ifdef __DEBUG_RELEASE
211 // Remove this function for public Release ! This is only 211 // Remove this function for public Release ! This is only
212 // for debug purposes .. 212 // for debug purposes ..
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( "today/config" ), QString::null, 217 a = new QAction( tr( "Config" ), Resource::loadPixmap( "today/config" ), 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(); 235 m_abView->load();
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 // Category Menu 244 // Category Menu
245 catMenu = new QPopupMenu( this ); 245 catMenu = new QPopupMenu( this );
246 catMenu->setCheckable( TRUE ); 246 catMenu->setCheckable( TRUE );
247 connect( catMenu, SIGNAL(activated(int)), this, SLOT(slotSetCategory(int)) ); 247 connect( catMenu, SIGNAL(activated(int)), this, SLOT(slotSetCategory(int)) );
248 populateCategories(); 248 populateCategories();
249 mbList->insertItem( tr("View"), catMenu ); 249 mbList->insertItem( tr("View"), catMenu );
250 250
251 defaultFont = new QFont( m_abView->font() ); 251 defaultFont = new QFont( m_abView->font() );
252 slotSetFont(m_config.fontSize()); 252 slotSetFont(m_config.fontSize());
253 m_curFontSize = m_config.fontSize(); 253 m_curFontSize = m_config.fontSize();
254 254
255 setCentralWidget(listContainer); 255 setCentralWidget(listContainer);
256 256
257 // qDebug("adressbook contrsuction: t=%d", t.elapsed() ); 257 // qDebug("adressbook contrsuction: t=%d", t.elapsed() );
258 258
259 259
260 isLoading = false; 260 isLoading = false;
261} 261}
262 262
263 263
264void AddressbookWindow::slotConfig() 264void AddressbookWindow::slotConfig()
265{ 265{
266 ConfigDlg* dlg = new ConfigDlg( this, "Config" ); 266 ConfigDlg* dlg = new ConfigDlg( this, "Config" );
267 dlg -> setConfig( m_config ); 267 dlg -> setConfig( m_config );
268 dlg -> showMaximized(); 268 dlg -> showMaximized();
269 if ( dlg -> exec() ) { 269 if ( dlg -> exec() ) {
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();
275 emit slotSetFont( m_curFontSize ); 275 emit slotSetFont( m_curFontSize );
276 } 276 }
277 m_abView -> setListOrder( m_config.orderList() ); 277 m_abView -> setListOrder( m_config.orderList() );
278 } 278 }
279 279
280 delete dlg; 280 delete dlg;
281} 281}
282 282
283 283
284void AddressbookWindow::slotSetFont( int size ) 284void AddressbookWindow::slotSetFont( int size )
285{ 285{
286 qWarning("void AddressbookWindow::slotSetFont( %d )", size); 286 qWarning("void AddressbookWindow::slotSetFont( %d )", size);
287 287
288 if (size > 2 || size < 0) 288 if (size > 2 || size < 0)
289 size = 1; 289 size = 1;
290 290
291 m_config.setFontSize( size ); 291 m_config.setFontSize( size );
292 292
293 QFont *currentFont; 293 QFont *currentFont;
294 294
295 switch (size) { 295 switch (size) {
296 case 0: 296 case 0:
297 m_abView->setFont( QFont( defaultFont->family(), defaultFont->pointSize() - 2 ) ); 297 m_abView->setFont( QFont( defaultFont->family(), defaultFont->pointSize() - 2 ) );
298 currentFont = new QFont (m_abView->font()); 298 currentFont = new QFont (m_abView->font());
299 // abList->resizeRows(currentFont->pixelSize() + 7); :SX 299 // abList->resizeRows(currentFont->pixelSize() + 7); :SX
300 // abList->resizeRows(); 300 // abList->resizeRows();
301 break; 301 break;
302 case 1: 302 case 1:
303 m_abView->setFont( *defaultFont ); 303 m_abView->setFont( *defaultFont );
304 currentFont = new QFont (m_abView->font()); 304 currentFont = new QFont (m_abView->font());
305 // // abList->resizeRows(currentFont->pixelSize() + 7); 305 // // abList->resizeRows(currentFont->pixelSize() + 7);
306 // abList->resizeRows(); 306 // abList->resizeRows();
307 break; 307 break;
308 case 2: 308 case 2:
309 m_abView->setFont( QFont( defaultFont->family(), defaultFont->pointSize() + 2 ) ); 309 m_abView->setFont( QFont( defaultFont->family(), defaultFont->pointSize() + 2 ) );
310 currentFont = new QFont (m_abView->font()); 310 currentFont = new QFont (m_abView->font());
311 // //abList->resizeRows(currentFont->pixelSize() + 7); 311 // //abList->resizeRows(currentFont->pixelSize() + 7);
312 // abList->resizeRows(); 312 // abList->resizeRows();
313 break; 313 break;
314 } 314 }
315} 315}
316 316
317 317
318 318
319void AddressbookWindow::importvCard() { 319void AddressbookWindow::importvCard() {
320 QString str = OFileDialog::getOpenFileName( 1,"/");//,"", "*", this ); 320 QString str = OFileDialog::getOpenFileName( 1,"/");//,"", "*", this );
321 if(!str.isEmpty() ){ 321 if(!str.isEmpty() ){
322 setDocument((const QString&) str ); 322 setDocument((const QString&) str );
323 } 323 }
324 324
325} 325}
326 326
327void AddressbookWindow::setDocument( const QString &filename ) 327void AddressbookWindow::setDocument( const QString &filename )
328{ 328{
329 qWarning( "void AddressbookWindow::setDocument( %s )", filename.latin1() ); 329 qWarning( "void AddressbookWindow::setDocument( %s )", filename.latin1() );
330 330
331 if ( filename.find(".vcf") != int(filename.length()) - 4 ){ 331 if ( filename.find(".vcf") != int(filename.length()) - 4 ){
332 332
333 333
334 334
335 switch( QMessageBox::information( this, tr ( "Right file type ?" ), 335 switch( QMessageBox::information( this, tr ( "Right file type ?" ),
336 tr( "The selected File" ) + ( "\n" ) + 336 tr( "The selected file \n does not end with \".vcf\" \n. Do you really want to open it?" ),
337 tr ("does not end with \".vcf\" ") + ( "\n" ) +
338 tr ( "Do you really want to open it?" ),
339 tr( "&Yes" ), tr( "&No" ), QString::null, 337 tr( "&Yes" ), tr( "&No" ), QString::null,
340 0, // Enter == button 0 338 0, // Enter == button 0
341 2 ) ) { // Escape == button 2 339 2 ) ) { // Escape == button 2
342 case 0: 340 case 0:
343 qWarning("YES clicked"); 341 qWarning("YES clicked");
344 break; 342 break;
345 case 1: 343 case 1:
346 qWarning("NO clicked"); 344 qWarning("NO clicked");
347 return; 345 return;
348 break; 346 break;
349 } 347 }
350 } 348 }
351 349
352 OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null, 350 OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null,
353 filename ); 351 filename );
354 OContactAccess* access = new OContactAccess ( "addressbook", QString::null , vcard_backend, true ); 352 OContactAccess* access = new OContactAccess ( "addressbook", QString::null , vcard_backend, true );
355 OContactAccess::List allList = access->allRecords(); 353 OContactAccess::List allList = access->allRecords();
356 354
357 OContactAccess::List::Iterator it; 355 OContactAccess::List::Iterator it;
358 for ( it = allList.begin(); it != allList.end(); ++it ){ 356 for ( it = allList.begin(); it != allList.end(); ++it ){
359 m_abView->addEntry( *it ); 357 m_abView->addEntry( *it );
360 } 358 }
361 359
362 delete access; 360 delete access;
363} 361}
364 362
365void AddressbookWindow::resizeEvent( QResizeEvent *e ) 363void AddressbookWindow::resizeEvent( QResizeEvent *e )
366{ 364{
367 QMainWindow::resizeEvent( e ); 365 QMainWindow::resizeEvent( e );
368 366
369 367
370} 368}
371 369
372AddressbookWindow::~AddressbookWindow() 370AddressbookWindow::~AddressbookWindow()
373{ 371{
374 ToolBarDock dock; 372 ToolBarDock dock;
375 int dummy; 373 int dummy;
376 bool bDummy; 374 bool bDummy;
377 getLocation ( listTools, dock, dummy, bDummy, dummy ); 375 getLocation ( listTools, dock, dummy, bDummy, dummy );
378 m_config.setToolBarDock( dock ); 376 m_config.setToolBarDock( dock );
379 m_config.save(); 377 m_config.save();
380} 378}
381 379
382void AddressbookWindow::slotUpdateToolbar() 380void AddressbookWindow::slotUpdateToolbar()
383{ 381{
384 OContact ce = m_abView->currentEntry(); 382 OContact ce = m_abView->currentEntry();
385 actionMail->setEnabled( !ce.defaultEmail().isEmpty() ); 383 actionMail->setEnabled( !ce.defaultEmail().isEmpty() );
386} 384}
387 385
388void AddressbookWindow::slotListNew() 386void AddressbookWindow::slotListNew()
389{ 387{
390 OContact cnt; 388 OContact cnt;
391 if( !syncing ) { 389 if( !syncing ) {
392 editEntry( NewEntry ); 390 editEntry( NewEntry );
393 } else { 391 } else {
394 QMessageBox::warning(this, tr("OContacts"), 392 QMessageBox::warning(this, tr("OContacts"),
395 tr("Can not edit data, currently syncing")); 393 tr("Can not edit data, currently syncing"));
396 } 394 }
397} 395}
398 396
399// void AddressbookWindow::slotListView() 397// void AddressbookWindow::slotListView()
400// { 398// {
401 // m_abView -> init( abList->currentEntry() ); 399 // m_abView -> init( abList->currentEntry() );
402 // // :SX mView->sync(); 400 // // :SX mView->sync();
403 // //:SXshowView(); 401 // //:SXshowView();
404// } 402// }
405 403
406void AddressbookWindow::slotListDelete() 404void AddressbookWindow::slotListDelete()
407{ 405{
408 if(!syncing) { 406 if(!syncing) {
409 OContact tmpEntry = m_abView ->currentEntry(); 407 OContact tmpEntry = m_abView ->currentEntry();
410 408
411 // get a name, do the best we can... 409 // get a name, do the best we can...
412 QString strName = tmpEntry.fullName(); 410 QString strName = tmpEntry.fullName();
413 if ( strName.isEmpty() ) { 411 if ( strName.isEmpty() ) {
414 strName = tmpEntry.company(); 412 strName = tmpEntry.company();
415 if ( strName.isEmpty() ) 413 if ( strName.isEmpty() )
416 strName = "No Name"; 414 strName = "No Name";
417 } 415 }
418 416
419 417
420 if ( QPEMessageBox::confirmDelete( this, tr( "Contacts" ), 418 if ( QPEMessageBox::confirmDelete( this, tr( "Contacts" ),
421 strName ) ) { 419 strName ) ) {
422 m_abView->removeEntry( tmpEntry.uid() ); 420 m_abView->removeEntry( tmpEntry.uid() );
423 } 421 }
424 } else { 422 } else {
425 QMessageBox::warning( this, tr("Contacts"), 423 QMessageBox::warning( this, tr("Contacts"),
426 tr("Can not edit data, currently syncing") ); 424 tr("Can not edit data, currently syncing") );
427 } 425 }
428} 426}
429 427
430void AddressbookWindow::slotFindOpen() 428void AddressbookWindow::slotFindOpen()
431{ 429{
432 searchBar->show(); 430 searchBar->show();
433 m_abView -> inSearch(); 431 m_abView -> inSearch();
434 searchEdit->setFocus(); 432 searchEdit->setFocus();
435} 433}
436void AddressbookWindow::slotFindClose() 434void AddressbookWindow::slotFindClose()
437{ 435{
438 searchBar->hide(); 436 searchBar->hide();
439 m_abView -> offSearch(); 437 m_abView -> offSearch();
440 // m_abView->setFocus(); 438 // m_abView->setFocus();
441} 439}
442 440
443 441
444void AddressbookWindow::slotFind() 442void AddressbookWindow::slotFind()
445{ 443{
446 m_abView->slotDoFind( searchEdit->text(), m_config.beCaseSensitive(), m_config.useRegExp(), false); 444 m_abView->slotDoFind( searchEdit->text(), m_config.beCaseSensitive(), m_config.useRegExp(), false);
447 445
448 searchEdit->clearFocus(); 446 searchEdit->clearFocus();
449 // m_abView->setFocus(); 447 // m_abView->setFocus();
450 448
451} 449}
452 450
453void AddressbookWindow::slotViewBack() 451void AddressbookWindow::slotViewBack()
454{ 452{
455 // :SX showList(); 453 // :SX showList();
456} 454}
457 455
458void AddressbookWindow::slotViewEdit() 456void AddressbookWindow::slotViewEdit()
459{ 457{
460 if(!syncing) { 458 if(!syncing) {
461 if (actionPersonal->isOn()) { 459 if (actionPersonal->isOn()) {
462 editPersonal(); 460 editPersonal();
463 } else { 461 } else {
464 editEntry( EditEntry ); 462 editEntry( EditEntry );
465 } 463 }
466 } else { 464 } else {
467 QMessageBox::warning( this, tr("Contacts"), 465 QMessageBox::warning( this, tr("Contacts"),
468 tr("Can not edit data, currently syncing") ); 466 tr("Can not edit data, currently syncing") );
469 } 467 }
470} 468}
471 469
472 470
473 471
474void AddressbookWindow::writeMail() 472void AddressbookWindow::writeMail()
475{ 473{
476 OContact c = m_abView -> currentEntry(); 474 OContact c = m_abView -> currentEntry();
477 QString name = c.fileAs(); 475 QString name = c.fileAs();
478 QString email = c.defaultEmail(); 476 QString email = c.defaultEmail();
479 477
480 // I prefer the OPIE-Environment variable before the 478 // I prefer the OPIE-Environment variable before the
481 // QPE-one.. 479 // QPE-one..
482 QString basepath = QString::fromLatin1( getenv("OPIEDIR") ); 480 QString basepath = QString::fromLatin1( getenv("OPIEDIR") );
483 if ( basepath.isEmpty() ) 481 if ( basepath.isEmpty() )
484 basepath = QString::fromLatin1( getenv("QPEDIR") ); 482 basepath = QString::fromLatin1( getenv("QPEDIR") );
485 483
486 // Try to access the preferred. If not possible, try to 484 // Try to access the preferred. If not possible, try to
487 // switch to the other one.. 485 // switch to the other one..
488 if ( m_config.useQtMail() ){ 486 if ( m_config.useQtMail() ){
489 qWarning ("Accessing: %s", (basepath + "/bin/qtmail").latin1()); 487 qWarning ("Accessing: %s", (basepath + "/bin/qtmail").latin1());
490 if ( QFile::exists( basepath + "/bin/qtmail" ) ){ 488 if ( QFile::exists( basepath + "/bin/qtmail" ) ){
491 qWarning ("QCop"); 489 qWarning ("QCop");
492 QCopEnvelope e("QPE/Application/qtmail", "writeMail(QString,QString)"); 490 QCopEnvelope e("QPE/Application/qtmail", "writeMail(QString,QString)");
493 e << name << email; 491 e << name << email;
494 return; 492 return;
495 } else 493 } else
496 m_config.setUseOpieMail( true ); 494 m_config.setUseOpieMail( true );
497 } 495 }
498 if ( m_config.useOpieMail() ){ 496 if ( m_config.useOpieMail() ){
499 qWarning ("Accessing: %s", (basepath + "/bin/mail").latin1()); 497 qWarning ("Accessing: %s", (basepath + "/bin/mail").latin1());
500 if ( QFile::exists( basepath + "/bin/mail" ) ){ 498 if ( QFile::exists( basepath + "/bin/mail" ) ){
501 qWarning ("QCop"); 499 qWarning ("QCop");
502 QCopEnvelope e("QPE/Application/mail", "writeMail(QString,QString)"); 500 QCopEnvelope e("QPE/Application/mail", "writeMail(QString,QString)");
503 e << name << email; 501 e << name << email;
504 return; 502 return;
505 } else 503 } else
506 m_config.setUseQtMail( true ); 504 m_config.setUseQtMail( true );
507 } 505 }
508 506
509} 507}
510 508
511static const char * beamfile = "/tmp/obex/contact.vcf"; 509static const char * beamfile = "/tmp/obex/contact.vcf";
512 510
513void AddressbookWindow::slotBeam() 511void AddressbookWindow::slotBeam()
514{ 512{
515 QString filename; 513 QString filename;
516 OContact c; 514 OContact c;
517 if ( actionPersonal->isOn() ) { 515 if ( actionPersonal->isOn() ) {
518 filename = addressbookPersonalVCardName(); 516 filename = addressbookPersonalVCardName();
519 if (!QFile::exists(filename)) 517 if (!QFile::exists(filename))
520 return; // can't beam a non-existent file 518 return; // can't beam a non-existent file
521 OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null, 519 OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null,
522 filename ); 520 filename );
523 OContactAccess* access = new OContactAccess ( "addressbook", QString::null , vcard_backend, true ); 521 OContactAccess* access = new OContactAccess ( "addressbook", QString::null , vcard_backend, true );
524 OContactAccess::List allList = access->allRecords(); 522 OContactAccess::List allList = access->allRecords();
525 OContactAccess::List::Iterator it = allList.begin(); // Just take first 523 OContactAccess::List::Iterator it = allList.begin(); // Just take first
526 c = *it; 524 c = *it;
527 525
528 delete access; 526 delete access;
529 } else { 527 } else {
530 unlink( beamfile ); // delete if exists 528 unlink( beamfile ); // delete if exists
531 mkdir("/tmp/obex/", 0755); 529 mkdir("/tmp/obex/", 0755);
532 c = m_abView -> currentEntry(); 530 c = m_abView -> currentEntry();
533 OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null, 531 OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null,
534 beamfile ); 532 beamfile );
535 OContactAccess* access = new OContactAccess ( "addressbook", QString::null , vcard_backend, true ); 533 OContactAccess* access = new OContactAccess ( "addressbook", QString::null , vcard_backend, true );
536 access->add( c ); 534 access->add( c );
537 access->save(); 535 access->save();
538 delete access; 536 delete access;
539 537
540 filename = beamfile; 538 filename = beamfile;
541 } 539 }
542 540
543 541
544 Ir *ir = new Ir( this ); 542 Ir *ir = new Ir( this );
545 connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) ); 543 connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) );
546 QString description = c.fullName(); 544 QString description = c.fullName();
547 ir->send( filename, description, "text/x-vCard" ); 545 ir->send( filename, description, "text/x-vCard" );
548} 546}
549 547
550void AddressbookWindow::beamDone( Ir *ir ) 548void AddressbookWindow::beamDone( Ir *ir )
551{ 549{
552 delete ir; 550 delete ir;
553 unlink( beamfile ); 551 unlink( beamfile );
554} 552}
555 553
556 554
557static void parseName( const QString& name, QString *first, QString *middle, 555static void parseName( const QString& name, QString *first, QString *middle,
558 QString * last ) 556 QString * last )
559{ 557{
560 558
561 int comma = name.find ( "," ); 559 int comma = name.find ( "," );
562 QString rest; 560 QString rest;
563 if ( comma > 0 ) { 561 if ( comma > 0 ) {
564 *last = name.left( comma ); 562 *last = name.left( comma );
565 comma++; 563 comma++;
566 while ( comma < int(name.length()) && name[comma] == ' ' ) 564 while ( comma < int(name.length()) && name[comma] == ' ' )
567 comma++; 565 comma++;
568 rest = name.mid( comma ); 566 rest = name.mid( comma );
569 } else { 567 } else {
570 int space = name.findRev( ' ' ); 568 int space = name.findRev( ' ' );
571 *last = name.mid( space+1 ); 569 *last = name.mid( space+1 );
572 rest = name.left( space ); 570 rest = name.left( space );
573 } 571 }
574 int space = rest.find( ' ' ); 572 int space = rest.find( ' ' );
575 if ( space <= 0 ) { 573 if ( space <= 0 ) {
576 *first = rest; 574 *first = rest;
577 } else { 575 } else {
578 *first = rest.left( space ); 576 *first = rest.left( space );
579 *middle = rest.mid( space+1 ); 577 *middle = rest.mid( space+1 );
580 } 578 }
581 579
582} 580}
583 581
584 582
585void AddressbookWindow::appMessage(const QCString &msg, const QByteArray &data) 583void AddressbookWindow::appMessage(const QCString &msg, const QByteArray &data)
586{ 584{
587 if (msg == "editPersonal()") { 585 if (msg == "editPersonal()") {
588 editPersonal(); 586 editPersonal();
589 } else if (msg == "editPersonalAndClose()") { 587 } else if (msg == "editPersonalAndClose()") {
590 editPersonal(); 588 editPersonal();
591 close(); 589 close();
592 } else if ( msg == "addContact(QString,QString)" ) { 590 } else if ( msg == "addContact(QString,QString)" ) {
593 QDataStream stream(data,IO_ReadOnly); 591 QDataStream stream(data,IO_ReadOnly);
594 QString name, email; 592 QString name, email;
595 stream >> name >> email; 593 stream >> name >> email;
596 594
597 OContact cnt; 595 OContact cnt;
598 QString fn, mn, ln; 596 QString fn, mn, ln;
599 parseName( name, &fn, &mn, &ln ); 597 parseName( name, &fn, &mn, &ln );
600 // qDebug( " %s - %s - %s", fn.latin1(), mn.latin1(), ln.latin1() ); 598 // qDebug( " %s - %s - %s", fn.latin1(), mn.latin1(), ln.latin1() );
601 cnt.setFirstName( fn ); 599 cnt.setFirstName( fn );
602 cnt.setMiddleName( mn ); 600 cnt.setMiddleName( mn );
603 cnt.setLastName( ln ); 601 cnt.setLastName( ln );
604 cnt.insertEmails( email ); 602 cnt.insertEmails( email );
605 cnt.setDefaultEmail( email ); 603 cnt.setDefaultEmail( email );
606 cnt.setFileAs(); 604 cnt.setFileAs();
607 605
608 m_abView -> addEntry( cnt ); 606 m_abView -> addEntry( cnt );
609 607
610 // :SXm_abView()->init( cnt ); 608 // :SXm_abView()->init( cnt );
611 editEntry( EditEntry ); 609 editEntry( EditEntry );
612 610
613 611
614 612
615 } 613 }
616#if 0 614#if 0
617 else if (msg == "pickAddresses(QCString,QCString,QStringList,...)" ) { 615 else if (msg == "pickAddresses(QCString,QCString,QStringList,...)" ) {
618 QDataStream stream(data,IO_ReadOnly); 616 QDataStream stream(data,IO_ReadOnly);
619 QCString ch,m; 617 QCString ch,m;
620 QStringList types; 618 QStringList types;
621 stream >> ch >> m >> types; 619 stream >> ch >> m >> types;
622 AddressPicker picker(abList,this,0,TRUE); 620 AddressPicker picker(abList,this,0,TRUE);
623 picker.showMaximized(); 621 picker.showMaximized();
624 picker.setChoiceNames(types); 622 picker.setChoiceNames(types);
625 int i=0; 623 int i=0;
626 for (QStringList::ConstIterator it = types.begin(); it!=types.end(); ++it) { 624 for (QStringList::ConstIterator it = types.begin(); it!=types.end(); ++it) {
627 QStringList sel; 625 QStringList sel;
628 stream >> sel; 626 stream >> sel;
629 picker.setSelection(i++,sel); 627 picker.setSelection(i++,sel);
630 } 628 }
631 picker.showMaximized(); 629 picker.showMaximized();
632 picker.exec(); 630 picker.exec();
633 631
634 // ###### note: contacts may have been added - save here! 632 // ###### note: contacts may have been added - save here!
635 633
636 setCentralWidget(abList); 634 setCentralWidget(abList);
637 QCopEnvelope e(ch,m); 635 QCopEnvelope e(ch,m);
638 i=0; 636 i=0;
639 for (QStringList::ConstIterator it = types.begin(); it!=types.end(); ++it) { 637 for (QStringList::ConstIterator it = types.begin(); it!=types.end(); ++it) {
640 QStringList sel = picker.selection(i++); 638 QStringList sel = picker.selection(i++);
641 e << sel; 639 e << sel;
642 } 640 }
643 } 641 }
644#endif 642#endif
645 643
646} 644}
647 645
648void AddressbookWindow::editEntry( EntryMode entryMode ) 646void AddressbookWindow::editEntry( EntryMode entryMode )
649{ 647{
650 OContact entry; 648 OContact entry;
651 if ( !abEditor ) { 649 if ( !abEditor ) {
652 abEditor = new ContactEditor( entry, this, "editor" ); 650 abEditor = new ContactEditor( entry, this, "editor" );
653 } 651 }
654 if ( entryMode == EditEntry ) 652 if ( entryMode == EditEntry )
655 abEditor->setEntry( m_abView -> currentEntry() ); 653 abEditor->setEntry( m_abView -> currentEntry() );
656 else if ( entryMode == NewEntry ) 654 else if ( entryMode == NewEntry )
657 abEditor->setEntry( entry ); 655 abEditor->setEntry( entry );
658 // other things may chane the caption. 656 // other things may chane the caption.
659 abEditor->setCaption( tr("Edit Address") ); 657 abEditor->setCaption( tr("Edit Address") );
660 658
661#if defined(Q_WS_QWS) || defined(_WS_QWS_) 659#if defined(Q_WS_QWS) || defined(_WS_QWS_)
662 abEditor->showMaximized(); 660 abEditor->showMaximized();
663#endif 661#endif
664 // fix the foxus... 662 // fix the foxus...
665 abEditor->setNameFocus(); 663 abEditor->setNameFocus();
666 if ( abEditor->exec() ) { 664 if ( abEditor->exec() ) {
667 setFocus(); 665 setFocus();
668 if ( entryMode == NewEntry ) { 666 if ( entryMode == NewEntry ) {
669 OContact insertEntry = abEditor->entry(); 667 OContact insertEntry = abEditor->entry();
670 insertEntry.assignUid(); 668 insertEntry.assignUid();
671 m_abView -> addEntry( insertEntry ); 669 m_abView -> addEntry( insertEntry );
672 } else { 670 } else {
673 OContact replEntry = abEditor->entry(); 671 OContact replEntry = abEditor->entry();
674 672
675 if ( !replEntry.isValidUid() ) 673 if ( !replEntry.isValidUid() )
676 replEntry.assignUid(); 674 replEntry.assignUid();
677 675
678 m_abView -> replaceEntry( replEntry ); 676 m_abView -> replaceEntry( replEntry );
679 } 677 }
680 } 678 }
681 // populateCategories(); 679 // populateCategories();
682 680
683} 681}
684 682
685void AddressbookWindow::editPersonal() 683void AddressbookWindow::editPersonal()
686{ 684{
687 OContact entry; 685 OContact entry;
688 if ( !abEditor ) { 686 if ( !abEditor ) {
689 abEditor = new ContactEditor( entry, this, "editor" ); 687 abEditor = new ContactEditor( entry, this, "editor" );
690 } 688 }
691 689
692 abEditor->setCaption(tr("Edit My Personal Details")); 690 abEditor->setCaption(tr("Edit My Personal Details"));
693 abEditor->setPersonalView( true ); 691 abEditor->setPersonalView( true );
694 editEntry( EditEntry ); 692 editEntry( EditEntry );
695 abEditor->setPersonalView( false ); 693 abEditor->setPersonalView( false );
696 694
697} 695}
698 696
699 697
700void AddressbookWindow::slotPersonalView() 698void AddressbookWindow::slotPersonalView()
701{ 699{
702 if (!actionPersonal->isOn()) { 700 if (!actionPersonal->isOn()) {
703 // we just turned it off 701 // we just turned it off
704 setCaption( tr("Contacts") ); 702 setCaption( tr("Contacts") );
705 actionNew->setEnabled(TRUE); 703 actionNew->setEnabled(TRUE);
706 actionTrash->setEnabled(TRUE); 704 actionTrash->setEnabled(TRUE);
707 actionFind->setEnabled(TRUE); 705 actionFind->setEnabled(TRUE);
708 actionMail->setEnabled(TRUE); 706 actionMail->setEnabled(TRUE);
709 // slotUpdateToolbar(); 707 // slotUpdateToolbar();
710 708
711 m_abView->showPersonal( false ); 709 m_abView->showPersonal( false );
712 710
713 return; 711 return;
714 } 712 }
715 713
716 // XXX need to disable some QActions. 714 // XXX need to disable some QActions.
717 actionNew->setEnabled(FALSE); 715 actionNew->setEnabled(FALSE);
718 actionTrash->setEnabled(FALSE); 716 actionTrash->setEnabled(FALSE);
719 actionFind->setEnabled(FALSE); 717 actionFind->setEnabled(FALSE);
720 actionMail->setEnabled(FALSE); 718 actionMail->setEnabled(FALSE);
721 719
722 setCaption( tr("Contacts - My Personal Details") ); 720 setCaption( tr("Contacts - My Personal Details") );
723 721
724 m_abView->showPersonal( true ); 722 m_abView->showPersonal( true );
725 723
726} 724}
727 725
728 726
729void AddressbookWindow::listIsEmpty( bool empty ) 727void AddressbookWindow::listIsEmpty( bool empty )
730{ 728{
731 if ( !empty ) { 729 if ( !empty ) {
732 deleteButton->setEnabled( TRUE ); 730 deleteButton->setEnabled( TRUE );
733 } 731 }
734} 732}
735 733
736void AddressbookWindow::reload() 734void AddressbookWindow::reload()
737{ 735{
738 syncing = FALSE; 736 syncing = FALSE;
739 m_abView->clear(); 737 m_abView->clear();
740 m_abView->reload(); 738 m_abView->reload();
741} 739}
742 740
743void AddressbookWindow::flush() 741void AddressbookWindow::flush()
744{ 742{
745 syncing = TRUE; 743 syncing = TRUE;
746 m_abView->save(); 744 m_abView->save();
747} 745}
748 746
749 747
750void AddressbookWindow::closeEvent( QCloseEvent *e ) 748void AddressbookWindow::closeEvent( QCloseEvent *e )
751{ 749{
752 750
753 if(syncing) { 751 if(syncing) {
754 /* shouldn't we save, I hear you say? well its already been set 752 /* shouldn't we save, I hear you say? well its already been set
755 so that an edit can not occur during a sync, and we flushed 753 so that an edit can not occur during a sync, and we flushed
756 at the start of the sync, so there is no need to save 754 at the start of the sync, so there is no need to save
757 Saving however itself would cause problems. */ 755 Saving however itself would cause problems. */
758 e->accept(); 756 e->accept();
759 return; 757 return;
760 } 758 }
761 //################## shouldn't always save 759 //################## shouldn't always save
762 // True, but the database handles this automatically ! (se) 760 // True, but the database handles this automatically ! (se)
763 if ( save() ) 761 if ( save() )
764 e->accept(); 762 e->accept();
765 else 763 else
766 e->ignore(); 764 e->ignore();
767} 765}
768 766
769/* 767/*
770 Returns TRUE if it is OK to exit 768 Returns TRUE if it is OK to exit
771*/ 769*/
772 770
773bool AddressbookWindow::save() 771bool AddressbookWindow::save()
774{ 772{
775 if ( !m_abView->save() ) { 773 if ( !m_abView->save() ) {
776 if ( QMessageBox::critical( 0, tr( "Out of space" ), 774 if ( QMessageBox::critical( 0, tr( "Out of space" ),
777 tr("Unable to save information.\n" 775 tr("Unable to save information.\n"
778 "Free up some space\n" 776 "Free up some space\n"
779 "and try again.\n" 777 "and try again.\n"
780 "\nQuit anyway?"), 778 "\nQuit anyway?"),
781 QMessageBox::Yes|QMessageBox::Escape, 779 QMessageBox::Yes|QMessageBox::Escape,
782 QMessageBox::No|QMessageBox::Default ) 780 QMessageBox::No|QMessageBox::Default )
783 != QMessageBox::No ) 781 != QMessageBox::No )
784 return TRUE; 782 return TRUE;
785 else 783 else
786 return FALSE; 784 return FALSE;
787 } 785 }
788 return TRUE; 786 return TRUE;
789} 787}
790 788
791#ifdef __DEBUG_RELEASE 789#ifdef __DEBUG_RELEASE
792void AddressbookWindow::slotSave() 790void AddressbookWindow::slotSave()
793{ 791{
794 save(); 792 save();
795} 793}
796#endif 794#endif
797 795
798 796
799void AddressbookWindow::slotNotFound() 797void AddressbookWindow::slotNotFound()
800{ 798{
801 qWarning("Got notfound signal !"); 799 qWarning("Got notfound signal !");
802 QMessageBox::information( this, tr( "Not Found" ), 800 QMessageBox::information( this, tr( "Not Found" ),
803 tr( "Unable to find a contact for this \n search pattern!" ) ); 801 tr( "Unable to find a contact for this \n search pattern!" ) );
804 802
805 803
806} 804}
807void AddressbookWindow::slotWrapAround() 805void AddressbookWindow::slotWrapAround()
808{ 806{
809 qWarning("Got wrap signal !"); 807 qWarning("Got wrap signal !");
810 // if ( doNotifyWrapAround ) 808 // if ( doNotifyWrapAround )
811 // QMessageBox::information( this, tr( "End of list" ), 809 // QMessageBox::information( this, tr( "End of list" ),
812 // tr( "End of list. Wrap around now.. !" ) + "\n" ); 810 // tr( "End of list. Wrap around now...!" ) + "\n" );
813 811
814} 812}
815 813
816void AddressbookWindow::slotSetCategory( int c ) 814void AddressbookWindow::slotSetCategory( int c )
817{ 815{
818 qWarning( "void AddressbookWindow::slotSetCategory( %d ) from %d", c, catMenu->count() ); 816 qWarning( "void AddressbookWindow::slotSetCategory( %d ) from %d", c, catMenu->count() );
819 817
820 QString cat, book; 818 QString cat, book;
821 AbView::Views view = AbView::TableView; 819 AbView::Views view = AbView::TableView;
822 820
823 if ( c <= 0 ) 821 if ( c <= 0 )
824 return; 822 return;
825 823
826 // Checkmark Book Menu Item Selected 824 // Checkmark Book Menu Item Selected
827 if ( c < 3 ) 825 if ( c < 3 )
828 for ( unsigned int i = 1; i < 3; i++ ) 826 for ( unsigned int i = 1; i < 3; i++ )
829 catMenu->setItemChecked( i, c == (int)i ); 827 catMenu->setItemChecked( i, c == (int)i );
830 // Checkmark Category Menu Item Selected 828 // Checkmark Category Menu Item Selected
831 else 829 else
832 for ( unsigned int i = 3; i < catMenu->count(); i++ ) 830 for ( unsigned int i = 3; i < catMenu->count(); i++ )
833 catMenu->setItemChecked( i, c == (int)i ); 831 catMenu->setItemChecked( i, c == (int)i );
834 832
835 for ( unsigned int i = 1; i < catMenu->count(); i++ ) { 833 for ( unsigned int i = 1; i < catMenu->count(); i++ ) {
836 if (catMenu->isItemChecked( i )) { 834 if (catMenu->isItemChecked( i )) {
837 if ( i == 1 ){ // default List view 835 if ( i == 1 ){ // default List view
838 book = QString::null; 836 book = QString::null;
839 view = AbView::TableView; 837 view = AbView::TableView;
840 }else if ( i == 2 ){ 838 }else if ( i == 2 ){
841 book = tr( "Cards" ); 839 book = tr( "Cards" );
842 view = AbView::CardView; 840 view = AbView::CardView;
843 // }else if ( i == 3 ){ 841 // }else if ( i == 3 ){
844 // book = tr( "Personal" ); 842 // book = tr( "Personal" );
845 // view = AbView:: PersonalView; 843 // view = AbView:: PersonalView;
846 }else if ( i == 3 ){ // default All Categories 844 }else if ( i == 3 ){ // default All Categories
847 cat = QString::null; 845 cat = QString::null;
848 }else if ( i == (unsigned int)catMenu->count() - 1 ){ // last menu option (seperator is counted, too) will be Unfiled 846 }else if ( i == (unsigned int)catMenu->count() - 1 ){ // last menu option (seperator is counted, too) will be Unfiled
849 cat = "Unfiled"; 847 cat = "Unfiled";
850 qWarning ("Unfiled selected!!!"); 848 qWarning ("Unfiled selected!!!");
851 }else{ 849 }else{
852 cat = m_abView->categories()[i - 4]; 850 cat = m_abView->categories()[i - 4];
853 } 851 }
854 } 852 }
855 } 853 }
856 854
857 slotViewSwitched( view ); 855 slotViewSwitched( view );
858 856
859 m_abView -> setShowByCategory( view, cat ); 857 m_abView -> setShowByCategory( view, cat );
860 858
861 if ( book.isEmpty() ) 859 if ( book.isEmpty() )
862 book = "List"; 860 book = "List";
863 if ( cat.isEmpty() ) 861 if ( cat.isEmpty() )
864 cat = "All"; 862 cat = "All";
865 863
866 setCaption( tr( "Contacts" ) + " - " + book + " - " + tr( cat ) ); 864 setCaption( tr( "Contacts" ) + " - " + book + " - " + tr( cat ) );
867} 865}
868 866
869void AddressbookWindow::slotViewSwitched( int view ) 867void AddressbookWindow::slotViewSwitched( int view )
870{ 868{
871 qWarning( "void AddressbookWindow::slotViewSwitched( %d )", view ); 869 qWarning( "void AddressbookWindow::slotViewSwitched( %d )", view );
872 int menu = 0; 870 int menu = 0;
873 switch ( view ){ 871 switch ( view ){
874 case AbView::TableView: 872 case AbView::TableView:
875 menu = 1; 873 menu = 1;
876 m_tableViewButton->setOn(true); 874 m_tableViewButton->setOn(true);
877 m_cardViewButton->setOn(false); 875 m_cardViewButton->setOn(false);
878 break; 876 break;
879 case AbView::CardView: 877 case AbView::CardView:
880 menu = 2; 878 menu = 2;
881 m_tableViewButton->setOn(false); 879 m_tableViewButton->setOn(false);
882 m_cardViewButton->setOn(true); 880 m_cardViewButton->setOn(true);
883 break; 881 break;
884 // case AbView::PersonalView: 882 // case AbView::PersonalView:
885 // menu = 3; 883 // menu = 3;
886 // break; 884 // break;
887 // case AbView::CompanyBook: 885 // case AbView::CompanyBook:
888 // menu = 3; 886 // menu = 3;
889 // break; 887 // break;
890 // case AbView::EmailBook: 888 // case AbView::EmailBook:
891 // menu = 4; 889 // menu = 4;
892 // break; 890 // break;
893 } 891 }
894 for ( unsigned int i = 1; i < 3; i++ ){ 892 for ( unsigned int i = 1; i < 3; i++ ){
895 if ( catMenu ) 893 if ( catMenu )
896 catMenu->setItemChecked( i, menu == (int)i ); 894 catMenu->setItemChecked( i, menu == (int)i );
897 } 895 }
898} 896}
899 897
900 898
901void AddressbookWindow::slotListView() 899void AddressbookWindow::slotListView()
902{ 900{
903 emit slotSetCategory( AbView::TableView +1 ); 901 emit slotSetCategory( AbView::TableView +1 );
904} 902}
905 903
906void AddressbookWindow::slotCardView() 904void AddressbookWindow::slotCardView()
907{ 905{
908 emit slotSetCategory( AbView::CardView +1 ); 906 emit slotSetCategory( AbView::CardView +1 );
909} 907}
910 908
911void AddressbookWindow::slotSetLetter( char c ) { 909void AddressbookWindow::slotSetLetter( char c ) {
912 910
913 m_abView->setShowByLetter( c ); 911 m_abView->setShowByLetter( c );
914 912
915} 913}
916 914
917 915
918void AddressbookWindow::populateCategories() 916void AddressbookWindow::populateCategories()
919{ 917{
920 catMenu->clear(); 918 catMenu->clear();
921 919
922 int id, rememberId; 920 int id, rememberId;
923 id = 1; 921 id = 1;
924 rememberId = 0; 922 rememberId = 0;
925 923
926 catMenu->insertItem( Resource::loadPixmap( "datebook/weeklst" ), tr( "List" ), id++ ); 924 catMenu->insertItem( Resource::loadPixmap( "datebook/weeklst" ), tr( "List" ), id++ );
927 catMenu->insertItem( Resource::loadPixmap( "day" ), tr( "Cards" ), id++ ); 925 catMenu->insertItem( Resource::loadPixmap( "day" ), tr( "Cards" ), id++ );
928 // catMenu->insertItem( tr( "Personal" ), id++ ); 926 // catMenu->insertItem( tr( "Personal" ), id++ );
929 catMenu->insertSeparator(); 927 catMenu->insertSeparator();
930 928
931 catMenu->insertItem( tr( "All" ), id++ ); 929 catMenu->insertItem( tr( "All" ), id++ );
932 QStringList categories = m_abView->categories(); 930 QStringList categories = m_abView->categories();
933 categories.append( tr( "Unfiled" ) ); 931 categories.append( tr( "Unfiled" ) );
934 for ( QStringList::Iterator it = categories.begin(); 932 for ( QStringList::Iterator it = categories.begin();
935 it != categories.end(); ++it ) { 933 it != categories.end(); ++it ) {
936 catMenu->insertItem( *it, id ); 934 catMenu->insertItem( *it, id );
937 if ( *it == m_abView -> showCategory() ) 935 if ( *it == m_abView -> showCategory() )
938 rememberId = id; 936 rememberId = id;
939 ++id; 937 ++id;
940 } 938 }
941 939
942 // :SX 940 // :SX
943 // if ( abList->showBook().isEmpty() ) { 941 // if ( abList->showBook().isEmpty() ) {
944 // catMenu->setItemChecked( 1, true ); 942 // catMenu->setItemChecked( 1, true );
945 // } else if ( abList->showBook() == "Phone" ) { 943 // } else if ( abList->showBook() == "Phone" ) {
946 // catMenu->setItemChecked( 2, true ); 944 // catMenu->setItemChecked( 2, true );
947 // } else if ( abList->showBook() == "Company" ) { 945 // } else if ( abList->showBook() == "Company" ) {
948 // catMenu->setItemChecked( 3, true ); 946 // catMenu->setItemChecked( 3, true );
949 // } else if ( abList->showBook() == "Email" ) { 947 // } else if ( abList->showBook() == "Email" ) {
950 // catMenu->setItemChecked( 4, true ); 948 // catMenu->setItemChecked( 4, true );
951 // } else if ( abList->showBook() == "Cards" ) { 949 // } else if ( abList->showBook() == "Cards" ) {
952 // catMenu->setItemChecked( 5, true ); 950 // catMenu->setItemChecked( 5, true );
953 // } 951 // }
954 952
955 if ( m_abView -> showCategory().isEmpty() ) { 953 if ( m_abView -> showCategory().isEmpty() ) {
956 slotSetCategory( 3 ); 954 slotSetCategory( 3 );
957 } 955 }
958 else { 956 else {
959 slotSetCategory( rememberId ); 957 slotSetCategory( rememberId );
960 } 958 }
961} 959}
962 960
diff --git a/core/pim/addressbook/configdlg_base.ui b/core/pim/addressbook/configdlg_base.ui
index 66414f5..408bfa6 100644
--- a/core/pim/addressbook/configdlg_base.ui
+++ b/core/pim/addressbook/configdlg_base.ui
@@ -1,414 +1,410 @@
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>276</width> 15 <width>276</width>
16 <height>327</height> 16 <height>327</height>
17 </rect> 17 </rect>
18 </property> 18 </property>
19 <property stdset="1"> 19 <property stdset="1">
20 <name>sizePolicy</name> 20 <name>sizePolicy</name>
21 <sizepolicy> 21 <sizepolicy>
22 <hsizetype>5</hsizetype> 22 <hsizetype>5</hsizetype>
23 <vsizetype>5</vsizetype> 23 <vsizetype>5</vsizetype>
24 </sizepolicy> 24 </sizepolicy>
25 </property> 25 </property>
26 <property stdset="1"> 26 <property stdset="1">
27 <name>caption</name>
28 <string>MyDialog1</string>
29 </property>
30 <property stdset="1">
31 <name>sizeGripEnabled</name> 27 <name>sizeGripEnabled</name>
32 <bool>true</bool> 28 <bool>true</bool>
33 </property> 29 </property>
34 <property> 30 <property>
35 <name>layoutMargin</name> 31 <name>layoutMargin</name>
36 </property> 32 </property>
37 <vbox> 33 <vbox>
38 <property stdset="1"> 34 <property stdset="1">
39 <name>margin</name> 35 <name>margin</name>
40 <number>1</number> 36 <number>1</number>
41 </property> 37 </property>
42 <property stdset="1"> 38 <property stdset="1">
43 <name>spacing</name> 39 <name>spacing</name>
44 <number>6</number> 40 <number>6</number>
45 </property> 41 </property>
46 <widget> 42 <widget>
47 <class>QTabWidget</class> 43 <class>QTabWidget</class>
48 <property stdset="1"> 44 <property stdset="1">
49 <name>name</name> 45 <name>name</name>
50 <cstring>configDlg_base</cstring> 46 <cstring>configDlg_base</cstring>
51 </property> 47 </property>
52 <property stdset="1"> 48 <property stdset="1">
53 <name>sizePolicy</name> 49 <name>sizePolicy</name>
54 <sizepolicy> 50 <sizepolicy>
55 <hsizetype>7</hsizetype> 51 <hsizetype>7</hsizetype>
56 <vsizetype>7</vsizetype> 52 <vsizetype>7</vsizetype>
57 </sizepolicy> 53 </sizepolicy>
58 </property> 54 </property>
59 <property> 55 <property>
60 <name>layoutMargin</name> 56 <name>layoutMargin</name>
61 </property> 57 </property>
62 <property> 58 <property>
63 <name>layoutSpacing</name> 59 <name>layoutSpacing</name>
64 </property> 60 </property>
65 <widget> 61 <widget>
66 <class>QWidget</class> 62 <class>QWidget</class>
67 <property stdset="1"> 63 <property stdset="1">
68 <name>name</name> 64 <name>name</name>
69 <cstring>Widget5</cstring> 65 <cstring>Widget5</cstring>
70 </property> 66 </property>
71 <attribute> 67 <attribute>
72 <name>title</name> 68 <name>title</name>
73 <string>Misc</string> 69 <string>Misc</string>
74 </attribute> 70 </attribute>
75 <vbox> 71 <vbox>
76 <property stdset="1"> 72 <property stdset="1">
77 <name>margin</name> 73 <name>margin</name>
78 <number>5</number> 74 <number>5</number>
79 </property> 75 </property>
80 <property stdset="1"> 76 <property stdset="1">
81 <name>spacing</name> 77 <name>spacing</name>
82 <number>6</number> 78 <number>6</number>
83 </property> 79 </property>
84 <widget> 80 <widget>
85 <class>QGroupBox</class> 81 <class>QGroupBox</class>
86 <property stdset="1"> 82 <property stdset="1">
87 <name>name</name> 83 <name>name</name>
88 <cstring>GroupBox2</cstring> 84 <cstring>GroupBox2</cstring>
89 </property> 85 </property>
90 <property stdset="1"> 86 <property stdset="1">
91 <name>title</name> 87 <name>title</name>
92 <string>Search Settings</string> 88 <string>Search Settings</string>
93 </property> 89 </property>
94 <vbox> 90 <vbox>
95 <property stdset="1"> 91 <property stdset="1">
96 <name>margin</name> 92 <name>margin</name>
97 <number>11</number> 93 <number>11</number>
98 </property> 94 </property>
99 <property stdset="1"> 95 <property stdset="1">
100 <name>spacing</name> 96 <name>spacing</name>
101 <number>6</number> 97 <number>6</number>
102 </property> 98 </property>
103 <widget> 99 <widget>
104 <class>QButtonGroup</class> 100 <class>QButtonGroup</class>
105 <property stdset="1"> 101 <property stdset="1">
106 <name>name</name> 102 <name>name</name>
107 <cstring>ButtonGroup1</cstring> 103 <cstring>ButtonGroup1</cstring>
108 </property> 104 </property>
109 <property stdset="1"> 105 <property stdset="1">
110 <name>title</name> 106 <name>title</name>
111 <string>Query Style</string> 107 <string>Query Style</string>
112 </property> 108 </property>
113 <vbox> 109 <vbox>
114 <property stdset="1"> 110 <property stdset="1">
115 <name>margin</name> 111 <name>margin</name>
116 <number>11</number> 112 <number>11</number>
117 </property> 113 </property>
118 <property stdset="1"> 114 <property stdset="1">
119 <name>spacing</name> 115 <name>spacing</name>
120 <number>6</number> 116 <number>6</number>
121 </property> 117 </property>
122 <widget> 118 <widget>
123 <class>QRadioButton</class> 119 <class>QRadioButton</class>
124 <property stdset="1"> 120 <property stdset="1">
125 <name>name</name> 121 <name>name</name>
126 <cstring>m_useRegExp</cstring> 122 <cstring>m_useRegExp</cstring>
127 </property> 123 </property>
128 <property stdset="1"> 124 <property stdset="1">
129 <name>text</name> 125 <name>text</name>
130 <string>Use Regular Expressions</string> 126 <string>Use Regular Expressions</string>
131 </property> 127 </property>
132 </widget> 128 </widget>
133 <widget> 129 <widget>
134 <class>QRadioButton</class> 130 <class>QRadioButton</class>
135 <property stdset="1"> 131 <property stdset="1">
136 <name>name</name> 132 <name>name</name>
137 <cstring>m_useWildCard</cstring> 133 <cstring>m_useWildCard</cstring>
138 </property> 134 </property>
139 <property stdset="1"> 135 <property stdset="1">
140 <name>text</name> 136 <name>text</name>
141 <string>Use Wildcards (*,?)</string> 137 <string>Use Wildcards (*,?)</string>
142 </property> 138 </property>
143 <property stdset="1"> 139 <property stdset="1">
144 <name>checked</name> 140 <name>checked</name>
145 <bool>true</bool> 141 <bool>true</bool>
146 </property> 142 </property>
147 </widget> 143 </widget>
148 </vbox> 144 </vbox>
149 </widget> 145 </widget>
150 <widget> 146 <widget>
151 <class>QCheckBox</class> 147 <class>QCheckBox</class>
152 <property stdset="1"> 148 <property stdset="1">
153 <name>name</name> 149 <name>name</name>
154 <cstring>m_useCaseSensitive</cstring> 150 <cstring>m_useCaseSensitive</cstring>
155 </property> 151 </property>
156 <property stdset="1"> 152 <property stdset="1">
157 <name>text</name> 153 <name>text</name>
158 <string>Case Sensitive</string> 154 <string>Case Sensitive</string>
159 </property> 155 </property>
160 </widget> 156 </widget>
161 </vbox> 157 </vbox>
162 </widget> 158 </widget>
163 <widget> 159 <widget>
164 <class>QButtonGroup</class> 160 <class>QButtonGroup</class>
165 <property stdset="1"> 161 <property stdset="1">
166 <name>name</name> 162 <name>name</name>
167 <cstring>ButtonGroup3</cstring> 163 <cstring>ButtonGroup3</cstring>
168 </property> 164 </property>
169 <property stdset="1"> 165 <property stdset="1">
170 <name>title</name> 166 <name>title</name>
171 <string>Font</string> 167 <string>Font</string>
172 </property> 168 </property>
173 <hbox> 169 <hbox>
174 <property stdset="1"> 170 <property stdset="1">
175 <name>margin</name> 171 <name>margin</name>
176 <number>11</number> 172 <number>11</number>
177 </property> 173 </property>
178 <property stdset="1"> 174 <property stdset="1">
179 <name>spacing</name> 175 <name>spacing</name>
180 <number>6</number> 176 <number>6</number>
181 </property> 177 </property>
182 <widget> 178 <widget>
183 <class>QRadioButton</class> 179 <class>QRadioButton</class>
184 <property stdset="1"> 180 <property stdset="1">
185 <name>name</name> 181 <name>name</name>
186 <cstring>m_smallFont</cstring> 182 <cstring>m_smallFont</cstring>
187 </property> 183 </property>
188 <property stdset="1"> 184 <property stdset="1">
189 <name>text</name> 185 <name>text</name>
190 <string>Small</string> 186 <string>Small</string>
191 </property> 187 </property>
192 </widget> 188 </widget>
193 <widget> 189 <widget>
194 <class>QRadioButton</class> 190 <class>QRadioButton</class>
195 <property stdset="1"> 191 <property stdset="1">
196 <name>name</name> 192 <name>name</name>
197 <cstring>m_normalFont</cstring> 193 <cstring>m_normalFont</cstring>
198 </property> 194 </property>
199 <property stdset="1"> 195 <property stdset="1">
200 <name>text</name> 196 <name>text</name>
201 <string>Normal</string> 197 <string>Normal</string>
202 </property> 198 </property>
203 <property stdset="1"> 199 <property stdset="1">
204 <name>checked</name> 200 <name>checked</name>
205 <bool>true</bool> 201 <bool>true</bool>
206 </property> 202 </property>
207 </widget> 203 </widget>
208 <widget> 204 <widget>
209 <class>QRadioButton</class> 205 <class>QRadioButton</class>
210 <property stdset="1"> 206 <property stdset="1">
211 <name>name</name> 207 <name>name</name>
212 <cstring>m_largeFont</cstring> 208 <cstring>m_largeFont</cstring>
213 </property> 209 </property>
214 <property stdset="1"> 210 <property stdset="1">
215 <name>text</name> 211 <name>text</name>
216 <string>Large</string> 212 <string>Large</string>
217 </property> 213 </property>
218 </widget> 214 </widget>
219 </hbox> 215 </hbox>
220 </widget> 216 </widget>
221 <spacer> 217 <spacer>
222 <property> 218 <property>
223 <name>name</name> 219 <name>name</name>
224 <cstring>Spacer3</cstring> 220 <cstring>Spacer3</cstring>
225 </property> 221 </property>
226 <property stdset="1"> 222 <property stdset="1">
227 <name>orientation</name> 223 <name>orientation</name>
228 <enum>Vertical</enum> 224 <enum>Vertical</enum>
229 </property> 225 </property>
230 <property stdset="1"> 226 <property stdset="1">
231 <name>sizeType</name> 227 <name>sizeType</name>
232 <enum>Expanding</enum> 228 <enum>Expanding</enum>
233 </property> 229 </property>
234 <property> 230 <property>
235 <name>sizeHint</name> 231 <name>sizeHint</name>
236 <size> 232 <size>
237 <width>20</width> 233 <width>20</width>
238 <height>20</height> 234 <height>20</height>
239 </size> 235 </size>
240 </property> 236 </property>
241 </spacer> 237 </spacer>
242 </vbox> 238 </vbox>
243 </widget> 239 </widget>
244 <widget> 240 <widget>
245 <class>QWidget</class> 241 <class>QWidget</class>
246 <property stdset="1"> 242 <property stdset="1">
247 <name>name</name> 243 <name>name</name>
248 <cstring>tab</cstring> 244 <cstring>tab</cstring>
249 </property> 245 </property>
250 <attribute> 246 <attribute>
251 <name>title</name> 247 <name>title</name>
252 <string>Mail</string> 248 <string>Mail</string>
253 </attribute> 249 </attribute>
254 <vbox> 250 <vbox>
255 <property stdset="1"> 251 <property stdset="1">
256 <name>margin</name> 252 <name>margin</name>
257 <number>5</number> 253 <number>5</number>
258 </property> 254 </property>
259 <property stdset="1"> 255 <property stdset="1">
260 <name>spacing</name> 256 <name>spacing</name>
261 <number>6</number> 257 <number>6</number>
262 </property> 258 </property>
263 <widget> 259 <widget>
264 <class>QButtonGroup</class> 260 <class>QButtonGroup</class>
265 <property stdset="1"> 261 <property stdset="1">
266 <name>name</name> 262 <name>name</name>
267 <cstring>ButtonGroup2</cstring> 263 <cstring>ButtonGroup2</cstring>
268 </property> 264 </property>
269 <property stdset="1"> 265 <property stdset="1">
270 <name>title</name> 266 <name>title</name>
271 <string>Mail</string> 267 <string>Mail</string>
272 </property> 268 </property>
273 <vbox> 269 <vbox>
274 <property stdset="1"> 270 <property stdset="1">
275 <name>margin</name> 271 <name>margin</name>
276 <number>11</number> 272 <number>11</number>
277 </property> 273 </property>
278 <property stdset="1"> 274 <property stdset="1">
279 <name>spacing</name> 275 <name>spacing</name>
280 <number>6</number> 276 <number>6</number>
281 </property> 277 </property>
282 <widget> 278 <widget>
283 <class>QRadioButton</class> 279 <class>QRadioButton</class>
284 <property stdset="1"> 280 <property stdset="1">
285 <name>name</name> 281 <name>name</name>
286 <cstring>m_useQtMail</cstring> 282 <cstring>m_useQtMail</cstring>
287 </property> 283 </property>
288 <property stdset="1"> 284 <property stdset="1">
289 <name>text</name> 285 <name>text</name>
290 <string>Prefer QT-Mail </string> 286 <string>Prefer QT-Mail </string>
291 </property> 287 </property>
292 <property stdset="1"> 288 <property stdset="1">
293 <name>checked</name> 289 <name>checked</name>
294 <bool>true</bool> 290 <bool>true</bool>
295 </property> 291 </property>
296 </widget> 292 </widget>
297 <widget> 293 <widget>
298 <class>QRadioButton</class> 294 <class>QRadioButton</class>
299 <property stdset="1"> 295 <property stdset="1">
300 <name>name</name> 296 <name>name</name>
301 <cstring>m_useOpieMail</cstring> 297 <cstring>m_useOpieMail</cstring>
302 </property> 298 </property>
303 <property stdset="1"> 299 <property stdset="1">
304 <name>text</name> 300 <name>text</name>
305 <string>Prefer Opie-Mail</string> 301 <string>Prefer Opie-Mail</string>
306 </property> 302 </property>
307 </widget> 303 </widget>
308 <widget> 304 <widget>
309 <class>QLabel</class> 305 <class>QLabel</class>
310 <property stdset="1"> 306 <property stdset="1">
311 <name>name</name> 307 <name>name</name>
312 <cstring>TextLabel1</cstring> 308 <cstring>TextLabel1</cstring>
313 </property> 309 </property>
314 <property stdset="1"> 310 <property stdset="1">
315 <name>text</name> 311 <name>text</name>
316 <string>Notice: QT-Mail is just 312 <string>Notice: QT-Mail is just
317provided in the SHARP 313provided in the SHARP
318default ROM. Opie-Mail 314default ROM. Opie-Mail
319is provided free !</string> 315is provided free !</string>
320 </property> 316 </property>
321 </widget> 317 </widget>
322 </vbox> 318 </vbox>
323 </widget> 319 </widget>
324 <spacer> 320 <spacer>
325 <property> 321 <property>
326 <name>name</name> 322 <name>name</name>
327 <cstring>Spacer2</cstring> 323 <cstring>Spacer2</cstring>
328 </property> 324 </property>
329 <property stdset="1"> 325 <property stdset="1">
330 <name>orientation</name> 326 <name>orientation</name>
331 <enum>Vertical</enum> 327 <enum>Vertical</enum>
332 </property> 328 </property>
333 <property stdset="1"> 329 <property stdset="1">
334 <name>sizeType</name> 330 <name>sizeType</name>
335 <enum>Expanding</enum> 331 <enum>Expanding</enum>
336 </property> 332 </property>
337 <property> 333 <property>
338 <name>sizeHint</name> 334 <name>sizeHint</name>
339 <size> 335 <size>
340 <width>20</width> 336 <width>20</width>
341 <height>20</height> 337 <height>20</height>
342 </size> 338 </size>
343 </property> 339 </property>
344 </spacer> 340 </spacer>
345 </vbox> 341 </vbox>
346 </widget> 342 </widget>
347 <widget> 343 <widget>
348 <class>QWidget</class> 344 <class>QWidget</class>
349 <property stdset="1"> 345 <property stdset="1">
350 <name>name</name> 346 <name>name</name>
351 <cstring>tab</cstring> 347 <cstring>tab</cstring>
352 </property> 348 </property>
353 <attribute> 349 <attribute>
354 <name>title</name> 350 <name>title</name>
355 <string>Order</string> 351 <string>Order</string>
356 </attribute> 352 </attribute>
357 <vbox> 353 <vbox>
358 <property stdset="1"> 354 <property stdset="1">
359 <name>margin</name> 355 <name>margin</name>
360 <number>-1</number> 356 <number>-1</number>
361 </property> 357 </property>
362 <property stdset="1"> 358 <property stdset="1">
363 <name>spacing</name> 359 <name>spacing</name>
364 <number>-1</number> 360 <number>-1</number>
365 </property> 361 </property>
366 <widget> 362 <widget>
367 <class>QGroupBox</class> 363 <class>QGroupBox</class>
368 <property stdset="1"> 364 <property stdset="1">
369 <name>name</name> 365 <name>name</name>
370 <cstring>GroupBox9</cstring> 366 <cstring>GroupBox9</cstring>
371 </property> 367 </property>
372 <property stdset="1"> 368 <property stdset="1">
373 <name>title</name> 369 <name>title</name>
374 <string>Select Contact Order:</string> 370 <string>Select Contact Order:</string>
375 </property> 371 </property>
376 <grid> 372 <grid>
377 <property stdset="1"> 373 <property stdset="1">
378 <name>margin</name> 374 <name>margin</name>
379 <number>11</number> 375 <number>11</number>
380 </property> 376 </property>
381 <property stdset="1"> 377 <property stdset="1">
382 <name>spacing</name> 378 <name>spacing</name>
383 <number>6</number> 379 <number>6</number>
384 </property> 380 </property>
385 <widget row="0" column="2" > 381 <widget row="0" column="2" >
386 <class>QPushButton</class> 382 <class>QPushButton</class>
387 <property stdset="1"> 383 <property stdset="1">
388 <name>name</name> 384 <name>name</name>
389 <cstring>m_upButton</cstring> 385 <cstring>m_upButton</cstring>
390 </property> 386 </property>
391 <property stdset="1"> 387 <property stdset="1">
392 <name>sizePolicy</name> 388 <name>sizePolicy</name>
393 <sizepolicy> 389 <sizepolicy>
394 <hsizetype>1</hsizetype> 390 <hsizetype>1</hsizetype>
395 <vsizetype>0</vsizetype> 391 <vsizetype>0</vsizetype>
396 </sizepolicy> 392 </sizepolicy>
397 </property> 393 </property>
398 <property stdset="1"> 394 <property stdset="1">
399 <name>text</name> 395 <name>text</name>
400 <string>Up</string> 396 <string>Up</string>
401 </property> 397 </property>
402 <property stdset="1"> 398 <property stdset="1">
403 <name>autoRepeat</name> 399 <name>autoRepeat</name>
404 <bool>true</bool> 400 <bool>true</bool>
405 </property> 401 </property>
406 </widget> 402 </widget>
407 <widget row="1" column="2" > 403 <widget row="1" column="2" >
408 <class>QPushButton</class> 404 <class>QPushButton</class>
409 <property stdset="1"> 405 <property stdset="1">
410 <name>name</name> 406 <name>name</name>
411 <cstring>m_downButton</cstring> 407 <cstring>m_downButton</cstring>
412 </property> 408 </property>
413 <property stdset="1"> 409 <property stdset="1">
414 <name>sizePolicy</name> 410 <name>sizePolicy</name>