|
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 #include <hbcheckbox.h> |
|
27 |
|
28 class letterwidget: public HbWidget |
|
29 { |
|
30 Q_OBJECT |
|
31 public: |
|
32 letterwidget(QGraphicsItem *parent = 0); |
|
33 ~letterwidget(); |
|
34 void setcolor(const QString &color); |
|
35 QString color(); |
|
36 QString visibility(); |
|
37 QString persistent(); |
|
38 QString name(); |
|
39 void setBackgroundFlag(bool background); |
|
40 |
|
41 |
|
42 protected: |
|
43 virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget); |
|
44 |
|
45 protected: |
|
46 |
|
47 QGraphicsGridLayout *mGridLayout; |
|
48 HbPushButton *mItalic; |
|
49 HbPushButton *mBold; |
|
50 HbPushButton *mUnderline; |
|
51 HbPushButton *mRed; |
|
52 HbPushButton *mGreen; |
|
53 HbPushButton *mBlue; |
|
54 HbPushButton *mSave; |
|
55 HbPushButton *mDelete; |
|
56 HbLabel* mVisibilityLabel; |
|
57 HbLabel* mPersistentLabel; |
|
58 HbLabel* mNameLabel; |
|
59 HbComboBox *mVisibilityCombo; |
|
60 HbComboBox *mPersistentCombo; |
|
61 HbComboBox *mNameCombo; |
|
62 HbLabel* mStatusLabel; |
|
63 HbLabel* mResultLabel; |
|
64 HbCheckBox* mSaveDekCheckBox; |
|
65 QString mColor; |
|
66 HbLabel* mBackgroundLabel; |
|
67 HbLabel* mBackgroundStatusLabel; |
|
68 |
|
69 signals: |
|
70 void tobold(); |
|
71 void toitalic(); |
|
72 void tounderline(); |
|
73 void save(); |
|
74 void del(); |
|
75 |
|
76 protected slots: |
|
77 void red(); |
|
78 void green(); |
|
79 void blue(); |
|
80 |
|
81 public: |
|
82 void setStatus(bool status); |
|
83 bool delBeforeSave(); |
|
84 |
|
85 }; |
|
86 |
|
87 #endif /* LETTERWIDGET_H_*/ |