summaryrefslogtreecommitdiff
path: root/core/pim/addressbook/ablabel.cpp
Unidiff
Diffstat (limited to 'core/pim/addressbook/ablabel.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/pim/addressbook/ablabel.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/core/pim/addressbook/ablabel.cpp b/core/pim/addressbook/ablabel.cpp
index 1914f71..076e2e0 100644
--- a/core/pim/addressbook/ablabel.cpp
+++ b/core/pim/addressbook/ablabel.cpp
@@ -1,74 +1,71 @@
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** Contact info@trolltech.com if any conditions of this licensing are 16** Contact 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#include "ablabel.h" 21#include "ablabel.h"
22 22
23#include <qpe/stringutil.h>
24 23
25#include <qregexp.h>
26#include <qstylesheet.h>
27 24
28AbLabel::AbLabel( QWidget *parent, const char *name ): 25AbLabel::AbLabel( QWidget *parent, const char *name ):
29 QTextView( parent, name ), 26 QTextView( parent, name ),
30 m_empty( false ) 27 m_empty( false )
31{ 28{
32} 29}
33 30
34AbLabel::~AbLabel() 31AbLabel::~AbLabel()
35{ 32{
36} 33}
37 34
38void AbLabel::setContacts( const OContactAccess::List& viewList ) 35void AbLabel::setContacts( const OContactAccess::List& viewList )
39{ 36{
40 m_viewList = viewList; 37 m_viewList = viewList;
41 if (m_viewList.count() != 0){ 38 if (m_viewList.count() != 0){
42 m_empty = false; 39 m_empty = false;
43 m_itCurContact = m_viewList.begin(); 40 m_itCurContact = m_viewList.begin();
44 sync(); 41 sync();
45 }else{ 42 }else{
46 // m_itCurContact.clear(); 43 // m_itCurContact.clear();
47 m_empty = true; 44 m_empty = true;
48 setText( "" ); 45 setText( "" );
49 } 46 }
50} 47}
51 48
52int AbLabel::currentEntry_UID() 49int AbLabel::currentEntry_UID()
53{ 50{
54 OContact contact = currentEntry(); 51 OContact contact = currentEntry();
55 52
56 if ( contact.isEmpty() ) 53 if ( contact.isEmpty() )
57 return 0; 54 return 0;
58 else 55 else
59 return ( contact.uid() ); 56 return ( contact.uid() );
60} 57}
61 58
62OContact AbLabel::currentEntry() 59OContact AbLabel::currentEntry()
63{ 60{
64 if ( ! m_empty ) 61 if ( ! m_empty )
65 return ( *m_itCurContact ); 62 return ( *m_itCurContact );
66 else 63 else
67 return OContact(); 64 return OContact();
68} 65}
69 66
70 67
71bool AbLabel::selectContact( int UID ) 68bool AbLabel::selectContact( int UID )
72{ 69{
73 70
74 for ( int r = 0; r < m_viewList.count(); ++r ) { 71 for ( int r = 0; r < m_viewList.count(); ++r ) {