diff -r 1f002146abb4 -r cee7e9e0906c telutils/dialpad/inc/dialpadkeypad.h --- a/telutils/dialpad/inc/dialpadkeypad.h Tue Jul 06 14:53:02 2010 +0300 +++ b/telutils/dialpad/inc/dialpadkeypad.h Wed Aug 18 10:19:22 2010 +0300 @@ -18,10 +18,13 @@ #ifndef DIALPADKEYPAD_H #define DIALPADKEYPAD_H +#include +#include #include class DialpadInputField; class DialpadButton; +class DialpadNumericButton; class QSignalMapper; class QGraphicsGridLayout; @@ -53,10 +56,44 @@ void sendLongPressEvent(const QKeyEvent& event); void handleKeyChangeEvent(const QKeyEvent& releaseEvent, const QKeyEvent& pressEvent); + void cancelButtonPress(); + +protected: + void postKeyEvent(QEvent::Type type, int key); + void sendKeyEventToEditor(QEvent::Type type, int key); + + inline DialpadNumericButton* button(int i) const; + void updateButtonLabels(); + void updateColorArray(); + void updateIconColor(); + void updateTextLayouts(const QSizeF &size); + void resolveTextContent(QList &content); + void createTextLayouts(const QSizeF &size, + const QList &content); + void layoutTextLines(const QSizeF &size, + QTextLayout &textLayout, + int state, + int type); + +protected: + void paint(QPainter* painter, + const QStyleOptionGraphicsItem* option, + QWidget* widget); + void setGeometry(const QRectF &rect); + void changeEvent(QEvent *event); private: - void postKeyEvent(QEvent::Type type, int key); - void sendKeyEventToEditor(QEvent::Type type, int key); + enum ButtonState { + Normal = 0, + Pressed, + StateCount + }; + + enum TextType { + PrimaryText = 0, + SecondaryText, + TextTypeCount + }; private: const HbMainWindow& mMainWindow; @@ -65,6 +102,10 @@ QMap mGeneratedChar; int mPressedNumericKey; DialpadButton* mCallButton; + QList mColors; + QList mTextLayouts; + qreal mUnit; + qreal mMaxPrimaryLineWidth; }; #endif // DIALPADKEYPAD_H