24 #include "tsdevicedialog.h" |
24 #include "tsdevicedialog.h" |
25 #include "tstasksgrid.h" |
25 #include "tstasksgrid.h" |
26 #include "tstasksgriditem.h" |
26 #include "tstasksgriditem.h" |
27 #include "tsdocumentloader.h" |
27 #include "tsdocumentloader.h" |
28 #include "tsmodel.h" |
28 #include "tsmodel.h" |
29 #include <caservice.h> |
|
30 |
29 |
31 /*! |
30 /*! |
32 \class TsDeviceDialogPlugin |
31 \class TsDeviceDialogPlugin |
33 \ingroup group_tsdevicedialogplugin |
32 \ingroup group_tsdevicedialogplugin |
34 \brief TaskSwitcher Device Dialog Plug-in. |
33 \brief TaskSwitcher Device Dialog Plug-in. |
94 dialog->changeOrientation(dialog->mainWindow()->orientation()); |
97 dialog->changeOrientation(dialog->mainWindow()->orientation()); |
95 |
98 |
96 grid->setItemPrototype(new TsTasksGridItem()); |
99 grid->setItemPrototype(new TsTasksGridItem()); |
97 grid->setModel(mModel); |
100 grid->setModel(mModel); |
98 |
101 |
99 static_cast<TsModel *>(mModel)->updateModel(); |
102 //static_cast<TsModel *>(mModel)->updateModel(); |
100 |
103 |
101 // connect the grid and model |
104 // connect the grid and model |
102 qRegisterMetaType<QModelIndex>("QModelIndex"); |
105 qRegisterMetaType<QModelIndex>("QModelIndex"); |
103 |
106 |
104 disconnect(grid, SIGNAL(activated(QModelIndex)), this, SLOT(activated(QModelIndex))); |
107 disconnect(grid, SIGNAL(activated(QModelIndex)), mModel, SLOT(openApplication(QModelIndex))); |
105 disconnect(grid, SIGNAL(pressed(QModelIndex)), this, SLOT(pressed())); |
108 disconnect(grid, SIGNAL(activated(QModelIndex)), dialog, SLOT(close())); |
106 disconnect(grid, SIGNAL(longPressed(HbAbstractViewItem *, QPointF)), this, SLOT(longPressed())); |
|
107 disconnect(this, SIGNAL(activate(QModelIndex)), mModel, SLOT(openApplication(QModelIndex))); |
|
108 disconnect(this, SIGNAL(activate(QModelIndex)), dialog, SLOT(close())); |
|
109 disconnect(grid, SIGNAL(deleteButtonClicked(QModelIndex)), mModel, SLOT(closeApplication(QModelIndex))); |
109 disconnect(grid, SIGNAL(deleteButtonClicked(QModelIndex)), mModel, SLOT(closeApplication(QModelIndex))); |
110 |
110 |
111 connect(grid, SIGNAL(activated(QModelIndex)), this, SLOT(activated(QModelIndex))); |
111 connect(grid, SIGNAL(activated(QModelIndex)), mModel, SLOT(openApplication(QModelIndex))); |
112 connect(grid, SIGNAL(pressed(QModelIndex)), this, SLOT(pressed())); |
112 connect(grid, SIGNAL(activated(QModelIndex)), dialog, SLOT(close())); |
113 connect(grid, SIGNAL(longPressed(HbAbstractViewItem *, QPointF)), this, SLOT(longPressed())); |
|
114 connect(this, SIGNAL(activate(QModelIndex)), mModel, SLOT(openApplication(QModelIndex))); |
|
115 connect(this, SIGNAL(activate(QModelIndex)), dialog, SLOT(close())); |
|
116 connect(grid, SIGNAL(deleteButtonClicked(QModelIndex)), mModel, SLOT(closeApplication(QModelIndex)), Qt::QueuedConnection); |
113 connect(grid, SIGNAL(deleteButtonClicked(QModelIndex)), mModel, SLOT(closeApplication(QModelIndex)), Qt::QueuedConnection); |
117 } |
114 } |
118 return dialog; |
115 return dialog; |
119 } |
116 } |
120 |
117 |