equal
deleted
inserted
replaced
|
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 |
|
26 class figurewidget: public HbWidget |
|
27 { |
|
28 Q_OBJECT |
|
29 public: |
|
30 figurewidget(QGraphicsItem *parent = 0); |
|
31 ~figurewidget(); |
|
32 void setcolor(const QString &color); |
|
33 QString color(); |
|
34 protected: |
|
35 virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget); |
|
36 QGraphicsGridLayout *mGridLayout; |
|
37 HbPushButton *mTriangle; |
|
38 HbPushButton *mSqure; |
|
39 HbPushButton *mCircle; |
|
40 HbPushButton *mRed; |
|
41 HbPushButton *mGreen; |
|
42 HbPushButton *mBlue; |
|
43 HbPushButton *mSave; |
|
44 HbPushButton *mDelete; |
|
45 HbPushButton *mUpdate; |
|
46 QString mColor; |
|
47 bool mFailed; |
|
48 |
|
49 signals: |
|
50 void tosqure(); |
|
51 void totriangle(); |
|
52 void tocircle(); |
|
53 void save(); |
|
54 void updateAct(); |
|
55 void del(); |
|
56 |
|
57 protected slots: |
|
58 void red(); |
|
59 void green(); |
|
60 void blue(); |
|
61 |
|
62 public slots: |
|
63 void clearFailedFlag(); |
|
64 void setFailedFlag(); |
|
65 }; |
|
66 |
|
67 #endif /* FIGUREWIDGET_H_*/ |