equal
deleted
inserted
replaced
71 |
71 |
72 // ----------------------------------------------------------------------------- |
72 // ----------------------------------------------------------------------------- |
73 // |
73 // |
74 // ----------------------------------------------------------------------------- |
74 // ----------------------------------------------------------------------------- |
75 // |
75 // |
76 void LogsDetailsView::activated(bool showDialer, QVariant args) |
76 void LogsDetailsView::activated(bool showDialer, QVariant args, const QString& dialpadText) |
77 { |
77 { |
78 LOGS_QDEBUG( "logs [UI] -> LogsDetailsView::activated()" ); |
78 LOGS_QDEBUG( "logs [UI] -> LogsDetailsView::activated()" ); |
79 //base class handling first |
79 //base class handling first |
80 LogsBaseView::activated(showDialer, args); |
80 LogsBaseView::activated(showDialer, args, dialpadText); |
81 |
81 |
82 LogsDetailsModel* model = qVariantValue<LogsDetailsModel*>(args); |
82 LogsDetailsModel* model = qVariantValue<LogsDetailsModel*>(args); |
83 if ( !model ){ |
83 if ( !model ){ |
84 LOGS_QDEBUG( "logs [UI] <- LogsDetailsView::activated(), no model" ); |
84 LOGS_QDEBUG( "logs [UI] <- LogsDetailsView::activated(), no model" ); |
85 return; |
85 return; |
229 // |
229 // |
230 void LogsDetailsView::copyNumberToClipboard() |
230 void LogsDetailsView::copyNumberToClipboard() |
231 { |
231 { |
232 LOGS_QDEBUG( "logs [UI] -> LogsDetailsView::copyNumberToClipboard()" ); |
232 LOGS_QDEBUG( "logs [UI] -> LogsDetailsView::copyNumberToClipboard()" ); |
233 if ( isDialpadInput() ){ |
233 if ( isDialpadInput() ){ |
234 mDialpad->editor().setSelection(0, mDialpad->editor().text().length()); |
234 mDialpad->editor().setSelection(0, currDialpadText().length()); |
235 mDialpad->editor().copy(); |
235 mDialpad->editor().copy(); |
236 mDialpad->editor().setSelection(0, 0); |
236 mDialpad->editor().setSelection(0, 0); |
237 } else if ( mDetailsModel ) { |
237 } else if ( mDetailsModel ) { |
238 mDetailsModel->getNumberToClipboard(); |
238 mDetailsModel->getNumberToClipboard(); |
239 } |
239 } |
266 // LogsDetailsView::handleBackSoftkey |
266 // LogsDetailsView::handleBackSoftkey |
267 // ----------------------------------------------------------------------------- |
267 // ----------------------------------------------------------------------------- |
268 // |
268 // |
269 void LogsDetailsView::handleBackSoftkey() |
269 void LogsDetailsView::handleBackSoftkey() |
270 { |
270 { |
271 mViewManager.activatePreviousView(); |
271 mViewManager.activatePreviousView(mDialpad->isOpen(), currDialpadText()); |
272 } |
272 } |
273 |
273 |
274 // ----------------------------------------------------------------------------- |
274 // ----------------------------------------------------------------------------- |
275 // |
275 // |
276 // ----------------------------------------------------------------------------- |
276 // ----------------------------------------------------------------------------- |
475 QVariant customData = modelIndex().data(LogsDetailsModel::RoleDuplicatesSeparator); |
475 QVariant customData = modelIndex().data(LogsDetailsModel::RoleDuplicatesSeparator); |
476 if (customData.isValid() && customData.toBool()) { |
476 if (customData.isValid() && customData.toBool()) { |
477 LOGS_QDEBUG( "logs [UI] -> LogsDetailsViewItem::updateChildItems(), groupbox" ); |
477 LOGS_QDEBUG( "logs [UI] -> LogsDetailsViewItem::updateChildItems(), groupbox" ); |
478 HbGroupBox* groupBox = new HbGroupBox(this); |
478 HbGroupBox* groupBox = new HbGroupBox(this); |
479 groupBox->setHeading(modelIndex().data(Qt::DisplayRole).toString()); |
479 groupBox->setHeading(modelIndex().data(Qt::DisplayRole).toString()); |
480 //groupBox->setCollapsable(true); |
|
481 |
480 |
482 HbWidget* content = new HbWidget(); |
481 HbWidget* content = new HbWidget(); |
483 content->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); |
482 content->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); |
484 content->setMaximumHeight(0); |
483 content->setMaximumHeight(0); |
485 groupBox->setContentWidget(content); |
484 groupBox->setContentWidget(content); |
490 if (!mLayout) { |
489 if (!mLayout) { |
491 mLayout = new QGraphicsLinearLayout(Qt::Horizontal, 0); |
490 mLayout = new QGraphicsLinearLayout(Qt::Horizontal, 0); |
492 mLayout->setContentsMargins(0,0,0,0); |
491 mLayout->setContentsMargins(0,0,0,0); |
493 } |
492 } |
494 |
493 |
495 mLayout->addItem(layout()); |
|
496 mLayout->addItem(groupBox); |
494 mLayout->addItem(groupBox); |
497 mLayout->setItemSpacing(0,0); |
495 mLayout->setItemSpacing(0,0); |
498 setLayout(mLayout); |
496 setLayout(mLayout); |
499 } |
497 } |
500 } |
498 } |
508 LOGS_QDEBUG_2( "logs [UI] -> LogsDetailsViewItem::groupBoxClicked(): ", collapsed ); |
506 LOGS_QDEBUG_2( "logs [UI] -> LogsDetailsViewItem::groupBoxClicked(): ", collapsed ); |
509 QAbstractItemModel* model = const_cast <QAbstractItemModel*>(modelIndex().model()); |
507 QAbstractItemModel* model = const_cast <QAbstractItemModel*>(modelIndex().model()); |
510 model->setData(modelIndex(), QVariant(collapsed)); |
508 model->setData(modelIndex(), QVariant(collapsed)); |
511 LOGS_QDEBUG( "logs [UI] <- LogsDetailsViewItem::groupBoxClicked()" ); |
509 LOGS_QDEBUG( "logs [UI] <- LogsDetailsViewItem::groupBoxClicked()" ); |
512 } |
510 } |
|
511 |