summaryrefslogtreecommitdiff
path: root/core/pim/todo/todolabel.cc
Unidiff
Diffstat (limited to 'core/pim/todo/todolabel.cc') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/todo/todolabel.cc58
1 files changed, 58 insertions, 0 deletions
diff --git a/core/pim/todo/todolabel.cc b/core/pim/todo/todolabel.cc
new file mode 100644
index 0000000..4ce3499
--- a/dev/null
+++ b/core/pim/todo/todolabel.cc
@@ -0,0 +1,58 @@
1/**********************************************************************
2** Copyright (C) 2002 by Stefan Eilers (se, eilers.stefan@epost.de)
3** Copyright (C) 2002 Holger 'zecke' Freyther <freyther@kde.org>
4** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
5**
6** This file is part of the Qtopia Environment.
7**
8** This file may be distributed and/or modified under the terms of the
9** GNU General Public License version 2 as published by the Free Software
10** Foundation and appearing in the file LICENSE.GPL included in the
11** packaging of this file.
12**
13** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
14** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
15**
16** See http://www.trolltech.com/gpl/ for GPL licensing information.
17**
18** Contact info@trolltech.com if any conditions of this licensing are
19** not clear to you.
20**
21**********************************************************************/
22
23
24
25#include <qpe/stringutil.h>
26
27#include <qregexp.h>
28#include <qstylesheet.h>
29
30
31#include "todolabel.h"
32
33TodoLabel::TodoLabel( QWidget *parent, const char *name )
34 : QTextView( parent, name )
35{
36}
37
38TodoLabel::~TodoLabel()
39{
40}
41
42void TodoLabel::init( const ToDoEvent &item )
43{
44 m_item = item;
45}
46
47void TodoLabel::sync()
48{
49 QString text = m_item.richText();
50 setText( text );
51}
52
53void TodoLabel::keyPressEvent( QKeyEvent *e )
54{
55 if ( e->key() == Qt::Key_F33 ) {
56 emit okPressed();
57 }
58}