telutils/dialpad/src/dialpadkeypad.cpp
changeset 19 e44a8c097b15
parent 15 d7fc66ccd6fb
child 27 7eb70891911c
--- a/telutils/dialpad/src/dialpadkeypad.cpp	Mon May 03 13:01:45 2010 +0300
+++ b/telutils/dialpad/src/dialpadkeypad.cpp	Fri May 14 16:24:46 2010 +0300
@@ -26,7 +26,6 @@
 #include <hblineedit.h>
 
 #include "dialpadkeypad.h"
-#include "dialpadbuttonstyle.h"
 #include "dialpadbutton.h"
 #include "dialpadinputfield.h"
 
@@ -71,10 +70,6 @@
                                         Qt::Key_Backspace);
 
     // create keypad
-    mNormalButtonStyle = new DialpadButtonStyle();
-    mCallButtonStyle = new DialpadButtonStyle();
-    mCallButtonStyle->setButtonStyle(DialpadButtonStyle::CallButtonStyle);
-
     for (int i = 0; i < DialpadButtonCount; i++) {
         int keyCode = DialpadButtonToKeyCodeTable[i];
 
@@ -90,12 +85,10 @@
         button->setObjectName(buttonName);
 
         if (keyCode==Qt::Key_Yes) {
-            button->setStyle(mCallButtonStyle);
             HbIcon callIcon(handsetIcon); // todo correct icon
             button->setIcon(callIcon);
             button->setButtonType(DialpadButton::CallButton); // for css
         } else {
-            button->setStyle(mNormalButtonStyle);
             button->setButtonType(DialpadButton::NumericButton); // for css
         }
 
@@ -136,8 +129,6 @@
 
 DialpadKeypad::~DialpadKeypad()
 {
-    delete mCallButtonStyle;
-    delete mNormalButtonStyle;
 }
 
 void DialpadKeypad::createButtonGrid()
@@ -322,3 +313,10 @@
         }
     }
 }
+
+void DialpadKeypad::resetButtons()
+{
+    for(int i = 0; i < DialpadButtonCount; i++) {
+        mButtons[i]->setDown(false);
+    }
+}