author | zecke <zecke> | 2002-04-23 12:45:20 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-04-23 12:45:20 (UTC) |
commit | e25c5384f3f3025be64ed26d244c59afc5862711 (patch) (unidiff) | |
tree | 603f32b0550ecda9cbe95a93807a2a89b32cabcd /core/pim/todo/todolabel.cc | |
parent | 367304a610dd618ad45ddce8256ba4d7d8ded442 (diff) | |
download | opie-e25c5384f3f3025be64ed26d244c59afc5862711.zip opie-e25c5384f3f3025be64ed26d244c59afc5862711.tar.gz opie-e25c5384f3f3025be64ed26d244c59afc5862711.tar.bz2 |
Patch from Stefan Eilers for overview
merged by hand
-rw-r--r-- | core/pim/todo/todolabel.cc | 58 |
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 | |||
33 | TodoLabel::TodoLabel( QWidget *parent, const char *name ) | ||
34 | : QTextView( parent, name ) | ||
35 | { | ||
36 | } | ||
37 | |||
38 | TodoLabel::~TodoLabel() | ||
39 | { | ||
40 | } | ||
41 | |||
42 | void TodoLabel::init( const ToDoEvent &item ) | ||
43 | { | ||
44 | m_item = item; | ||
45 | } | ||
46 | |||
47 | void TodoLabel::sync() | ||
48 | { | ||
49 | QString text = m_item.richText(); | ||
50 | setText( text ); | ||
51 | } | ||
52 | |||
53 | void TodoLabel::keyPressEvent( QKeyEvent *e ) | ||
54 | { | ||
55 | if ( e->key() == Qt::Key_F33 ) { | ||
56 | emit okPressed(); | ||
57 | } | ||
58 | } | ||