58 virtual void moveEvent(const QPointF &oldPosition, const QPointF &newPosition); |
58 virtual void moveEvent(const QPointF &oldPosition, const QPointF &newPosition); |
59 virtual void releaseEvent(const QPointF &position, bool emitSignal = true); |
59 virtual void releaseEvent(const QPointF &position, bool emitSignal = true); |
60 virtual void longPressEvent(); |
60 virtual void longPressEvent(); |
61 |
61 |
62 virtual void calculateButtonProbabilities(const QPointF &position); |
62 virtual void calculateButtonProbabilities(const QPointF &position); |
|
63 virtual int activeButtonIndex(const QPointF &position); |
63 |
64 |
64 void _q_customActionDestroyed(QObject *object); |
65 void _q_customActionDestroyed(QObject *object); |
65 |
66 |
66 protected: |
67 protected: |
67 virtual void createPrimarySingleTextLayout(int index, const QHash<int, QString> &textContent, const QSizeF &size); |
68 virtual void createPrimarySingleTextLayout(int index, const QHash<int, QString> &textContent, const QSizeF &size); |
68 virtual void createPrimaryTextLayout(int index, const QHash<int, QString> &textContent, const QSizeF &size); |
69 virtual void createPrimaryTextLayout(int index, const QHash<int, QString> &textContent, const QSizeF &size); |
69 virtual void createSecondaryTextLayout(int index, const QHash<int, QString> &textContentt, const QSizeF &size); |
70 virtual void createSecondaryTextLayout(int index, const QHash<int, QString> &textContentt, const QSizeF &size); |
70 |
71 |
71 virtual void layoutSecondaryText(int index, HbInputButton *item, QFontMetricsF &fontMetrics, const QSizeF &size, |
72 virtual void layoutSecondaryText(int index, HbInputButton *item, const QSizeF &size, |
72 HbInputButton::HbInputButtonTextIndex firstTextIndex, |
73 HbInputButton::HbInputButtonTextIndex firstTextIndex, |
73 HbInputButton::HbInputButtonIconIndex firstIconIndex, |
74 HbInputButton::HbInputButtonIconIndex firstIconIndex, |
74 HbInputButton::HbInputButtonTextIndex secondTextIndex, |
75 HbInputButton::HbInputButtonTextIndex secondTextIndex, |
75 HbInputButton::HbInputButtonIconIndex secondIconIndex, |
76 HbInputButton::HbInputButtonIconIndex secondIconIndex, |
76 HbInputButtonGroup::HbInputButtonTextType textType); |
77 HbInputButtonGroup::HbInputButtonTextType textType); |
77 |
78 |
78 virtual void layoutTextLine(HbInputButtonGroup::HbInputButtonTextType textType, const HbInputButton *button, const QSizeF &cellSize, |
79 virtual void layoutTextLine(HbInputButtonGroup::HbInputButtonTextType textType, const HbInputButton *button, const QSizeF &cellSize, |
79 QTextLine &textLine, const QSizeF &textSize); |
80 QTextLine &textLine, const QSizeF &textSize, const bool centered = false); |
80 |
81 |
81 virtual QString buttonGraphics(HbInputButton::HbInputButtonType type, HbInputButton::HbInputButtonState state); |
82 virtual QString buttonGraphics(HbInputButton::HbInputButtonType type, HbInputButton::HbInputButtonState state); |
82 virtual QString buttonColor(HbInputButton::HbInputButtonType type, HbInputButton::HbInputButtonState state); |
83 virtual QString buttonColor(HbInputButton::HbInputButtonType type, HbInputButton::HbInputButtonState state); |
83 |
84 |
84 virtual qreal fontSize(HbInputButtonGroup::HbInputButtonTextType textType); |
85 virtual qreal fontSize(HbInputButtonGroup::HbInputButtonTextType textType); |
|
86 virtual void setFontSize(HbInputButtonGroup::HbInputButtonTextType textType,qreal size); |
|
87 virtual void resetFontSizes(); |
85 |
88 |
86 void startLongPress(int index); |
89 void startLongPress(int index); |
87 void cancelLongPress(int index); |
90 void cancelLongPress(int index); |
88 |
91 |
89 public: |
92 public: |
101 qreal mButtonBorderSize; |
104 qreal mButtonBorderSize; |
102 bool mEnabled; |
105 bool mEnabled; |
103 bool mButtonPreviewEnabled; |
106 bool mButtonPreviewEnabled; |
104 bool mCharacterSelectionPreviewEnabled; |
107 bool mCharacterSelectionPreviewEnabled; |
105 bool mMultiTouchEnabled; |
108 bool mMultiTouchEnabled; |
|
109 QList<int> mActiveButtons; |
106 QHash<int, HbInputButtonGroup *> mButtonPreview; |
110 QHash<int, HbInputButtonGroup *> mButtonPreview; |
107 HbDialog *mCharacterSelectionPreview; |
111 HbInputPopupBase *mCharacterSelectionPreview; |
108 HbFrameDrawer *mBackground; |
112 HbFrameDrawer *mBackground; |
109 QList<HbKeyPressProbability> mProbabilities; |
113 QList<HbKeyPressProbability> mProbabilities; |
|
114 qreal mFontSize[HbInputButtonGroup::ButtonTextTypeLabel+1]; |
|
115 bool mHasMouseGrab; |
110 }; |
116 }; |
111 |
117 |
112 #endif // HB_INPUT_BUTTON_GROUP_PRIVATE_H |
118 #endif // HB_INPUT_BUTTON_GROUP_PRIVATE_H |
113 |
119 |
114 // End of file |
120 // End of file |