summaryrefslogtreecommitdiff
path: root/core/pim/addressbook/ablabel.cpp
Unidiff
Diffstat (limited to 'core/pim/addressbook/ablabel.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/ablabel.cpp53
1 files changed, 53 insertions, 0 deletions
diff --git a/core/pim/addressbook/ablabel.cpp b/core/pim/addressbook/ablabel.cpp
new file mode 100644
index 0000000..3bf3e12
--- a/dev/null
+++ b/core/pim/addressbook/ablabel.cpp
@@ -0,0 +1,53 @@
1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3**
4** This file is part of Qt Palmtop Environment.
5**
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
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
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.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20
21#include "ablabel.h"
22
23#include <qpe/stringutil.h>
24
25#include <qregexp.h>
26#include <qstylesheet.h>
27
28AbLabel::AbLabel( QWidget *parent, const char *name )
29 : QTextView( parent, name )
30{
31}
32
33AbLabel::~AbLabel()
34{
35}
36
37void AbLabel::init( const Contact &entry )
38{
39 ent = entry;
40}
41
42void AbLabel::sync()
43{
44 QString text = ent.toRichText();
45 setText( text );
46}
47
48void AbLabel::keyPressEvent( QKeyEvent *e )
49{
50 if ( e->key() == Qt::Key_F33 ) {
51 emit okPressed();
52 }
53}