changeset 44 | 329d304c1aa1 |
parent 42 | d17dc5398051 |
child 77 | d1838696558c |
42:d17dc5398051 | 44:329d304c1aa1 |
---|---|
17 |
17 |
18 |
18 |
19 |
19 |
20 // INCLUDE FILES |
20 // INCLUDE FILES |
21 |
21 |
22 #include <hbaction.h> |
22 #include <hbmessagebox.h> |
23 #include <hbdialog.h> |
23 #include <hblabel.h> |
24 #include <hbtextitem.h> |
|
25 |
24 |
26 #include "iaupdateresultsdialog.h" |
25 #include "iaupdateresultsdialog.h" |
27 #include "iaupdateresultsinfo.h" |
26 #include "iaupdateresultsinfo.h" |
28 #include "iaupdatedebug.h" |
27 #include "iaupdatedebug.h" |
29 |
28 |
36 |
35 |
37 IAUpdateResultsDialog::~IAUpdateResultsDialog() |
36 IAUpdateResultsDialog::~IAUpdateResultsDialog() |
38 { |
37 { |
39 } |
38 } |
40 |
39 |
41 void IAUpdateResultsDialog::showResults(const TIAUpdateResultsInfo ¶m, QObject* receiver, const char* member ) |
40 void IAUpdateResultsDialog::showResults(const TIAUpdateResultsInfo ¶m, QObject *receiver, const char *member) |
42 { |
41 { |
42 HbMessageBox *messageBox = new HbMessageBox(HbMessageBox::MessageTypeInformation); |
|
43 |
|
44 HbLabel *label = new HbLabel(messageBox); |
|
45 label->setHtml(QString("Update results")); |
|
46 messageBox->setHeadingWidget(label); |
|
47 |
|
48 messageBox->setIconVisible(false); |
|
49 |
|
43 QString buf; |
50 QString buf; |
44 constructText(param,buf); |
51 constructText(param,buf); |
45 HbDialog *dialog = new HbDialog; |
52 messageBox->setText(buf); |
46 HbTextItem *text = new HbTextItem(dialog); |
53 messageBox->setTimeout(HbPopup::NoTimeout); |
47 text->setFontSpec(HbFontSpec(HbFontSpec::Primary)); |
54 messageBox->setAttribute(Qt::WA_DeleteOnClose); |
48 text->setText(buf); |
55 messageBox->open(receiver, member); |
49 dialog->setContentWidget(text); |
|
50 HbAction *primaryAction = new HbAction("Ok"); |
|
51 dialog->addAction(primaryAction); |
|
52 dialog->setTimeout(HbPopup::NoTimeout); |
|
53 dialog->setAttribute(Qt::WA_DeleteOnClose); |
|
54 dialog->open(receiver, member); |
|
55 return; |
56 return; |
56 } |
57 } |
57 |
58 |
58 // ----------------------------------------------------------------------------- |
59 // ----------------------------------------------------------------------------- |
59 // IAUpdateResultsDialog::constructText |
60 // IAUpdateResultsDialog::constructText |
67 { |
68 { |
68 QString stringCount; |
69 QString stringCount; |
69 stringCount.setNum(param.iCountSuccessfull); |
70 stringCount.setNum(param.iCountSuccessfull); |
70 buf.append(stringCount); |
71 buf.append(stringCount); |
71 buf.append(" updates successful"); |
72 buf.append(" updates successful"); |
72 buf.append("\n"); |
73 buf.append("<br />"); |
73 return; |
74 return; |
74 } |
75 } |
75 |
76 |
76 if (param.iCountSuccessfull != 0) |
77 if (param.iCountSuccessfull != 0) |
77 { |
78 { |
84 } |
85 } |
85 else |
86 else |
86 { |
87 { |
87 buf.append(" applications updated"); |
88 buf.append(" applications updated"); |
88 } |
89 } |
89 buf.append("\n"); |
90 buf.append("<br />"); |
90 } |
91 } |
91 |
92 |
92 if (param.iCountCancelled != 0) |
93 if (param.iCountCancelled != 0) |
93 { |
94 { |
94 QString stringCount; |
95 QString stringCount; |
100 } |
101 } |
101 else |
102 else |
102 { |
103 { |
103 buf.append(" updates cancelled"); |
104 buf.append(" updates cancelled"); |
104 } |
105 } |
105 buf.append("\n"); |
106 buf.append("<br />"); |
106 } |
107 } |
107 |
108 |
108 if (param.iCountFailed != 0) |
109 if (param.iCountFailed != 0) |
109 { |
110 { |
110 QString stringCount; |
111 QString stringCount; |
116 } |
117 } |
117 else |
118 else |
118 { |
119 { |
119 buf.append(" updates failed"); |
120 buf.append(" updates failed"); |
120 } |
121 } |
121 buf.append("\n"); |
122 buf.append("<br />"); |
122 } |
123 } |
123 |
124 |
124 if (param.iFileInUseError) |
125 if (param.iFileInUseError) |
125 { |
126 { |
126 buf.append("Close all applications and try again."); |
127 buf.append("Close all applications and try again."); |
127 buf.append("\n"); |
128 buf.append("<br />"); |
128 } |
129 } |
129 } |
130 } |
130 |
131 |
131 // End of File |
132 // End of File |