src/hbwidgets/widgets/hbgroupboxcontentwidget_p.cpp
changeset 21 4633027730f5
parent 7 923ff622b8b9
child 23 e6ad4ef83b23
--- a/src/hbwidgets/widgets/hbgroupboxcontentwidget_p.cpp	Tue Jul 06 14:36:53 2010 +0300
+++ b/src/hbwidgets/widgets/hbgroupboxcontentwidget_p.cpp	Wed Aug 18 10:05:37 2010 +0300
@@ -77,7 +77,7 @@
 {
     if( groupBoxType == GroupBoxRichLabel ){
         if ( !mBackgroundItem ) {
-            mBackgroundItem = style()->createPrimitive( HbStyle::P_GroupBoxContent_background , this );
+            mBackgroundItem = HbStylePrivate::createPrimitive( HbStylePrivate::P_GroupBoxContent_background , this );
         }
     }else if ( mBackgroundItem ) {
             delete mBackgroundItem;
@@ -94,7 +94,7 @@
    initStyleOption( &option );
 
     if ( mBackgroundItem ) {
-        style()->updatePrimitive( mBackgroundItem , HbStyle::P_GroupBoxContent_background , &option );
+        HbStylePrivate::updatePrimitive( mBackgroundItem , HbStylePrivate::P_GroupBoxContent_background , &option );
     }
 }
 
@@ -106,11 +106,11 @@
 void HbGroupBoxContentWidget::createConnection()
 {
     // to avoid duplicate signals getting emitted from groupBox contentWidget
-    disconnect( this , SIGNAL ( clicked() ) , groupBox , SIGNAL ( clicked() ));
-    disconnect ( this , SIGNAL( longPress( QPointF ) ) , groupBox , SIGNAL( longPress( QPointF ) ));
+    disconnect(this, SIGNAL(clicked()), groupBox, SIGNAL(clicked()));
+    disconnect(this, SIGNAL(longPress(QPointF)), groupBox , SIGNAL(longPress(QPointF)));
 
-    connect ( this , SIGNAL ( clicked() ) , groupBox , SIGNAL ( clicked() ));
-    connect ( this , SIGNAL( longPress( QPointF ) ) , groupBox , SIGNAL( longPress( QPointF ) ));
+    connect(this, SIGNAL(clicked()), groupBox, SIGNAL(clicked()));
+    connect(this, SIGNAL(longPress(QPointF)), groupBox, SIGNAL(longPress(QPointF)));
 }
 
 /*!
@@ -152,7 +152,7 @@
             mContent = 0;
         }
         mContent = widget;
-        style()->setItemName( mContent , "content" );
+        HbStyle::setItemName( mContent , "content" );
         mContent->setParentItem( this);
     }
 }
@@ -164,7 +164,7 @@
 QGraphicsItem* HbGroupBoxContentWidget::primitive(HbStyle::Primitive primitive) const
 {
     switch (primitive) {
-        case HbStyle::P_GroupBoxContent_background:
+        case HbStylePrivate::P_GroupBoxContent_background:
             return mBackgroundItem;
         default:
             return 0;
@@ -276,6 +276,7 @@
 
             contentPressed=true;
             updatePrimitives();
+            HbWidgetFeedback::triggered(this, Hb::InstantPressed);
             break;
         case Qt::GestureCanceled: // Reset state
             scene()->setProperty(HbPrivate::OverridingGesture.latin1(),QVariant());
@@ -292,6 +293,7 @@
             scene()->setProperty(HbPrivate::OverridingGesture.latin1(),QVariant());
             contentPressed=false;
             updatePrimitives();
+            HbWidgetFeedback::triggered(this, Hb::InstantReleased);
             if(tap->tapStyleHint() == HbTapGesture::Tap) {
                 emit clicked();
             }