activityfw/testapplications/newtestappset/acttestfigure/figurewidget.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 FIGUREWIDGET_H_
       
    18 #define FIGUREWIDGET_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 HbComboBox;
       
    28 class HbCheckBox;
       
    29 
       
    30 class figurewidget: public HbWidget
       
    31 {
       
    32     Q_OBJECT
       
    33 public:
       
    34     figurewidget(QGraphicsItem *parent = 0);
       
    35     ~figurewidget();
       
    36     void setcolor(const QString &color);
       
    37     QString color();
       
    38     QString visibility();
       
    39     QString persistent();
       
    40     QString name();
       
    41     
       
    42 protected:
       
    43     virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
       
    44     QGraphicsGridLayout *mGridLayout;
       
    45     HbPushButton *mTriangle;
       
    46     HbPushButton *mSqure;
       
    47     HbPushButton *mCircle;
       
    48     HbPushButton *mRed;
       
    49     HbPushButton *mGreen;
       
    50     HbPushButton *mBlue;
       
    51     HbPushButton *mSave;
       
    52     HbPushButton *mDelete;
       
    53     HbLabel* mVisibilityLabel;
       
    54     HbLabel* mPersistentLabel;
       
    55     HbLabel* mNameLabel;
       
    56     HbComboBox *mVisibilityCombo;
       
    57     HbComboBox *mPersistentCombo;
       
    58     HbComboBox *mNameCombo;  
       
    59     HbCheckBox* mSaveDekCheckBox;
       
    60     QString mColor;
       
    61     bool mFailed;
       
    62     
       
    63 signals:
       
    64     void tosqure();
       
    65     void totriangle();
       
    66     void tocircle();
       
    67     void save();
       
    68     void updateAct();
       
    69     void del();
       
    70 
       
    71 protected slots:
       
    72     void red();
       
    73     void green();
       
    74     void blue();
       
    75 
       
    76 public slots:
       
    77     void clearFailedFlag();
       
    78     void setFailedFlag();
       
    79     bool delBeforeSave();
       
    80 };
       
    81 
       
    82 #endif /* FIGUREWIDGET_H_*/