18 #include "cntgroupdeletepopup.h" |
18 #include "cntgroupdeletepopup.h" |
19 |
19 |
20 #include <hbgroupbox.h> |
20 #include <hbgroupbox.h> |
21 #include <hbaction.h> |
21 #include <hbaction.h> |
22 #include <hblistview.h> |
22 #include <hblistview.h> |
|
23 #include <hblistviewitem.h> |
23 #include <qtcontacts.h> |
24 #include <qtcontacts.h> |
24 |
25 |
25 CntGroupDeletePopup::CntGroupDeletePopup(QContactManager *manager, QGraphicsItem *parent): |
26 CntGroupDeletePopup::CntGroupDeletePopup(QContactManager *manager, QGraphicsItem *parent): |
26 HbDialog(parent), |
27 HbSelectionDialog(parent), |
27 mListView(0), |
28 mListView(0), |
28 mContactManager(manager), |
29 mContactManager(manager), |
29 mModel(0) |
30 mModel(0) |
30 { |
31 { |
31 mModel = new CntGroupDeletePopupModel(mContactManager, this); |
32 mModel = new CntGroupDeletePopupModel(mContactManager, this); |
54 // set the listview to multiSelection mode, this will bring MarkAll functionality (from Orbit) |
55 // set the listview to multiSelection mode, this will bring MarkAll functionality (from Orbit) |
55 mListView->setSelectionMode(HbAbstractItemView::MultiSelection); |
56 mListView->setSelectionMode(HbAbstractItemView::MultiSelection); |
56 mListView->setFrictionEnabled(true); |
57 mListView->setFrictionEnabled(true); |
57 mListView->setScrollingStyle(HbScrollArea::PanWithFollowOn); |
58 mListView->setScrollingStyle(HbScrollArea::PanWithFollowOn); |
58 |
59 |
|
60 HbListViewItem *prototype = mListView->listItemPrototype(); |
|
61 prototype->setGraphicsSize(HbListViewItem::Thumbnail); |
|
62 prototype->setStretchingStyle(HbListViewItem::StretchLandscape); |
|
63 |
59 setContentWidget(mListView); |
64 setContentWidget(mListView); |
60 |
65 |
61 setTimeout(HbDialog::NoTimeout); |
66 setTimeout(HbDialog::NoTimeout); |
62 setDismissPolicy(HbDialog::NoDismiss); |
67 setDismissPolicy(HbDialog::NoDismiss); |
63 setModal(true); |
68 setModal(true); |
64 setAttribute(Qt::WA_DeleteOnClose, true); |
69 setAttribute(Qt::WA_DeleteOnClose, true); |
65 |
70 |
|
71 clearActions(); |
66 HbAction *mPrimaryAction = new HbAction(hbTrId("txt_phob_button_delete_selected"), this); |
72 HbAction *mPrimaryAction = new HbAction(hbTrId("txt_phob_button_delete_selected"), this); |
67 addAction(mPrimaryAction); |
73 addAction(mPrimaryAction); |
68 |
74 |
69 HbAction *mSecondaryAction = new HbAction(hbTrId("txt_common_button_cancel"), this); |
75 HbAction *mSecondaryAction = new HbAction(hbTrId("txt_common_button_cancel"), this); |
70 addAction(mSecondaryAction); |
76 addAction(mSecondaryAction); |