messagingapp/msgui/unifiedviewer/src/unitexteditor.cpp
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 
       
    19 #include "unitexteditor.h"
       
    20 
       
    21 #include <QFile>
       
    22 #include <QGraphicsSceneMouseEvent>
       
    23 #include <HbAbstractEdit>
       
    24 
       
    25 //---------------------------------------------------------------
       
    26 // UniTextEditor::UniTextEditor
       
    27 // @see header file
       
    28 //---------------------------------------------------------------
       
    29 UniTextEditor::UniTextEditor(QGraphicsItem * parent) :
       
    30     HbTextEdit(parent)
       
    31 {
       
    32     setReadOnly(true);
       
    33     setCursorVisibility(Hb::TextCursorHidden);
       
    34     setScrollable(false);
       
    35     setAttribute(Qt::WA_InputMethodEnabled, false);
       
    36 }
       
    37 
       
    38 //---------------------------------------------------------------
       
    39 // UniTextEditor::~UniTextEditor
       
    40 // @see header file
       
    41 //---------------------------------------------------------------
       
    42 UniTextEditor::~UniTextEditor()
       
    43 {
       
    44 
       
    45     }
       
    46 
       
    47 //---------------------------------------------------------------
       
    48 //UniTextEditor :: focusInEvent
       
    49 // @see header file
       
    50 //---------------------------------------------------------------
       
    51 void UniTextEditor::focusInEvent(QFocusEvent *event)
       
    52 {
       
    53     event->ignore();
       
    54 }
       
    55 
       
    56 //---------------------------------------------------------------
       
    57 //UniTextEditor :: focusOutEvent
       
    58 // @see header file
       
    59 //---------------------------------------------------------------
       
    60 void UniTextEditor::focusOutEvent(QFocusEvent *event)
       
    61 {
       
    62     event->ignore();
       
    63 }
       
    64 
       
    65 //---------------------------------------------------------------
       
    66 //UniTextEditor :: mousePressEvent
       
    67 // @see header file
       
    68 //---------------------------------------------------------------
       
    69 void UniTextEditor::mousePressEvent(QGraphicsSceneMouseEvent *event)
       
    70 {
       
    71     event->ignore();
       
    72 }
       
    73 
       
    74 //---------------------------------------------------------------
       
    75 //UniTextEditor :: mouseMoveEvent
       
    76 // @see header file
       
    77 //---------------------------------------------------------------
       
    78 void UniTextEditor::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
       
    79 {
       
    80     event->ignore();
       
    81 }
       
    82 
       
    83 //---------------------------------------------------------------
       
    84 //UniTextEditor :: mouseReleaseEvent
       
    85 // @see header file
       
    86 //---------------------------------------------------------------
       
    87 void UniTextEditor::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
       
    88 {
       
    89     event->ignore();
       
    90 }
       
    91 
       
    92 // EOF