equal
deleted
inserted
replaced
48 |
48 |
49 } |
49 } |
50 |
50 |
51 void FmDialog::setPrimaryAction( HbAction *action ) |
51 void FmDialog::setPrimaryAction( HbAction *action ) |
52 { |
52 { |
|
53 action->setObjectName( "primaryAction" ); |
53 QList<QAction *> actionList = QGraphicsWidget::actions(); |
54 QList<QAction *> actionList = QGraphicsWidget::actions(); |
54 if (actionList.size() == 0) { |
55 if (actionList.size() == 0) { |
55 QGraphicsWidget::addAction(action); |
56 QGraphicsWidget::addAction(action); |
56 } else if (actionList.size() == 1) { |
57 } else if (actionList.size() == 1) { |
57 actionList.clear(); |
58 actionList.clear(); |
72 } |
73 } |
73 } |
74 } |
74 |
75 |
75 void FmDialog::setSecondaryAction( HbAction *action ) |
76 void FmDialog::setSecondaryAction( HbAction *action ) |
76 { |
77 { |
|
78 action->setObjectName( "secondaryAction" ); |
77 QList<QAction *> actionList = QGraphicsWidget::actions(); |
79 QList<QAction *> actionList = QGraphicsWidget::actions(); |
78 if (actionList.size() == 0) { |
80 if (actionList.size() == 0) { |
79 QGraphicsWidget::addAction(new HbAction(hbTrId("Ok"))); |
81 HbAction *primaryAction = new HbAction(hbTrId("txt_common_button_ok")); |
|
82 primaryAction->setObjectName( "primaryAction" ); |
|
83 QGraphicsWidget::addAction(primaryAction); |
80 QGraphicsWidget::addAction(action); |
84 QGraphicsWidget::addAction(action); |
81 } else if (actionList.size() == 1) { |
85 } else if (actionList.size() == 1) { |
82 QGraphicsWidget::addAction(action); |
86 QGraphicsWidget::addAction(action); |
83 } else if (actionList.size() == 2) { |
87 } else if (actionList.size() == 2) { |
84 actionList.removeAt(1); |
88 actionList.removeAt(1); |