activityfw/testapplications/activitytestletter/letterwidget.h
changeset 117 c63ee96dbe5f
equal deleted inserted replaced
115:3ab5c078b490 117:c63ee96dbe5f
       
     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:
       
    15 *
       
    16 */
       
    17 #ifndef LETTERWIDGET_H_
       
    18 #define LETTERWIDGET_H_
       
    19 
       
    20 #include <hbwidget.h>
       
    21 #include <QGraphicsLinearLayout>
       
    22 #include <QGraphicsGridLayout>
       
    23 #include <HbPushButton>
       
    24 #include <hblabel.h>
       
    25 #include <HbComboBox>
       
    26 
       
    27 class letterwidget: public HbWidget
       
    28 {
       
    29     Q_OBJECT
       
    30 public:
       
    31     letterwidget(QGraphicsItem *parent = 0);
       
    32     ~letterwidget();
       
    33     void setcolor(const QString &color);
       
    34     QString color();
       
    35     QString visibility();
       
    36     QString persistent();
       
    37     QString name();
       
    38     
       
    39 
       
    40 protected:
       
    41     virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);    
       
    42 
       
    43 protected:
       
    44     
       
    45     QGraphicsGridLayout *mGridLayout;
       
    46     HbPushButton *mItalic;
       
    47     HbPushButton *mBold;
       
    48     HbPushButton *mUnderline;
       
    49     HbPushButton *mRed;
       
    50     HbPushButton *mGreen;
       
    51     HbPushButton *mBlue;
       
    52     HbPushButton *mSave;
       
    53     HbPushButton *mDelete;
       
    54     HbLabel* mVisibilityLabel;
       
    55     HbLabel* mPersistentLabel;
       
    56     HbLabel* mNameLabel;
       
    57     HbComboBox *mVisibilityCombo;
       
    58     HbComboBox *mPersistentCombo;
       
    59     HbComboBox *mNameCombo;
       
    60     QString mColor;    
       
    61 
       
    62 signals:
       
    63     void tobold();
       
    64     void toitalic();
       
    65     void tounderline();
       
    66     void save();
       
    67     void del();
       
    68 
       
    69 protected slots:
       
    70     void red();
       
    71     void green();
       
    72     void blue();
       
    73     
       
    74 };
       
    75 
       
    76 #endif /* LETTERWIDGET_H_*/