messagingapp/msgui/unifiedviewer/inc/unitexteditor.h
changeset 27 e4592d119491
parent 25 84d9eb65b26f
child 30 6a20128ce557
child 32 f3f513612312
equal deleted inserted replaced
25:84d9eb65b26f 27:e4592d119491
     1 /*
       
     2  * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3  * All rights reserved.
       
     4  * This component and the accompanying materials are made available
       
     5  * under the terms of "Eclipse Public License v1.0"
       
     6  * which accompanies this distribution, and is available
       
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8  *
       
     9  * Initial Contributors:
       
    10  * Nokia Corporation - initial contribution.
       
    11  *
       
    12  * Contributors:
       
    13  *
       
    14  * Description: Custom widget derived from HbTextEdit which provides rich text
       
    15  *              processing
       
    16  *
       
    17  */
       
    18 #ifndef UNI_TEXT_EDITOR_H
       
    19 #define UNI_TEXT_EDITOR_H
       
    20 
       
    21 #include <hbwidget.h>
       
    22 #include <hbtextedit.h>
       
    23 #include <qobject.h>
       
    24 #include <QTextCursor>
       
    25 #include <QTextDocument>
       
    26 #include <QTextOption>
       
    27 #include <QString>
       
    28 
       
    29 #include "unidatamodelplugininterface.h"
       
    30 
       
    31 class QGraphicsItem;
       
    32 
       
    33 /**
       
    34  * UniTextEditor provides support for rich text processing
       
    35  */
       
    36 class UniTextEditor : public HbTextEdit
       
    37 {
       
    38 Q_OBJECT
       
    39 public:
       
    40     /**
       
    41      * Constructor
       
    42      */
       
    43     UniTextEditor(QGraphicsItem * parent = 0);
       
    44 
       
    45     /**
       
    46      * Destructor
       
    47      */
       
    48     ~UniTextEditor();
       
    49 
       
    50 public:
       
    51 
       
    52     /**
       
    53      * called when focus is gained.
       
    54      */
       
    55     void focusInEvent(QFocusEvent *event);
       
    56 
       
    57     /**
       
    58      * called when focus is lost.
       
    59      */
       
    60     void focusOutEvent(QFocusEvent *event);
       
    61 
       
    62     /**
       
    63      * called when mouse is pressed.
       
    64      */
       
    65     void mousePressEvent(QGraphicsSceneMouseEvent *event);
       
    66 
       
    67     /**
       
    68      * called when mouse is moved.
       
    69      */
       
    70     void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
       
    71 
       
    72     /**
       
    73      * called when mouse is released.
       
    74      */
       
    75     void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
       
    76 
       
    77     };
       
    78 
       
    79 #endif // UNI_TEXT_EDITOR_H
       
    80 // EOF