controlpanel/tsrc/unit/pluginfortest/secondpluginfortest/src/secondpluginviewfortest.cpp
branchRCL_3
changeset 24 8ee96d21d9bf
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/controlpanel/tsrc/unit/pluginfortest/secondpluginfortest/src/secondpluginviewfortest.cpp	Tue Aug 31 15:29:50 2010 +0300
@@ -0,0 +1,45 @@
+#include "secondpluginviewfortest.h"
+
+#include <hbdataform.h>
+#include <qstringlist>
+#include <QDebug>
+#include <hbdataformmodel.h>
+#include <cpsettingformitemdata.h>
+#include <hbmessagebox.h>
+
+SecondPluginViewForTest::SecondPluginViewForTest(QGraphicsItem *parent) 
+    : CpBaseSettingView(0,parent),
+    mGroupItem(0),
+    mSliderItem(0)
+{
+    HbDataForm *form = qobject_cast<HbDataForm*>(widget());
+    if (form) {
+        HbDataFormModel *model = new HbDataFormModel;
+        
+        form->setHeading(tr("View from test plugin"));
+        mGroupItem = new HbDataFormModelItem(HbDataFormModelItem::GroupItem, QString("Group"));
+        
+        model->appendDataFormItem(mGroupItem);
+        
+        mSliderItem = new CpSettingFormItemData(HbDataFormModelItem::SliderItem,
+                QString("New Slider"));
+        mSliderItem->setContentWidgetData("iconEnabled","FALSE");
+        form->addConnection(mSliderItem,SIGNAL(valueChanged(int)),this,SLOT(sliderValueChanged(int)));
+        mGroupItem->appendChild(mSliderItem);      
+        
+        form->setModel(model);
+    }
+}
+SecondPluginViewForTest::~SecondPluginViewForTest()
+{
+}
+
+void SecondPluginViewForTest::testClose()
+{
+    close();
+}
+void SecondPluginViewForTest::sliderValueChanged(int value)
+{
+    //Disable the slider alert.
+	HbMessageBox::information(QString("slider value changed to:%1").arg(value));
+}