27 |
27 |
28 void Notifications::showMessageBox(HbMessageBox::MessageBoxType type, const QString &text, const QString &label, int timeout) |
28 void Notifications::showMessageBox(HbMessageBox::MessageBoxType type, const QString &text, const QString &label, int timeout) |
29 { |
29 { |
30 HbMessageBox *messageBox = new HbMessageBox(type); |
30 HbMessageBox *messageBox = new HbMessageBox(type); |
31 messageBox->setText(text); |
31 messageBox->setText(text); |
32 if(label.length()) |
32 if (label.length()) { |
33 { |
|
34 HbLabel *header = new HbLabel(label, messageBox); |
33 HbLabel *header = new HbLabel(label, messageBox); |
35 messageBox->setHeadingWidget(header); |
34 messageBox->setHeadingWidget(header); |
36 } |
35 } |
37 messageBox->setAttribute(Qt::WA_DeleteOnClose); |
36 messageBox->setAttribute(Qt::WA_DeleteOnClose); |
38 messageBox->setTimeout(timeout); |
37 messageBox->setTimeout(timeout); |
39 messageBox->open(); |
38 messageBox->open(); |
40 } |
39 } |
41 |
40 |
42 void Notifications::about() |
41 void Notifications::showAboutNote() |
43 { |
42 { |
44 showMessageBox( |
43 showMessageBox(HbMessageBox::MessageTypeInformation, |
45 HbMessageBox::MessageTypeInformation, |
44 "Version 5.0.0 - 23h April 2010. Copyright © 2010 Nokia Corporation" |
46 "Version 5.0.0 - 23h April 2010. Copyright © 2010 Nokia Corporation" |
45 "and/or its subsidiary(-ies). All rights reserved." |
47 "and/or its subsidiary(-ies). All rights reserved." |
46 "Licensed under Eclipse Public License v1.0.", |
48 "Licensed under Eclipse Public License v1.0.", |
47 "About File Browser" |
49 "About File Browser" |
|
50 ); |
48 ); |
51 } |
49 } |
52 |
50 |
53 // --------------------------------------------------------------------------- |
51 // --------------------------------------------------------------------------- |
54 |
52 |
60 // return note; |
58 // return note; |
61 //} |
59 //} |
62 |
60 |
63 // --------------------------------------------------------------------------- |
61 // --------------------------------------------------------------------------- |
64 |
62 |
65 void Notifications::showInformationNote(const QString &text) |
63 void Notifications::showInformationNote(const QString &text, const QString &title) |
66 { |
64 { |
67 showMessageBox(HbMessageBox::MessageTypeInformation, text, "", false); |
65 showMessageBox(HbMessageBox::MessageTypeInformation, text, title, false); |
68 } |
66 } |
69 |
67 |
70 // --------------------------------------------------------------------------- |
68 // --------------------------------------------------------------------------- |
71 |
69 |
72 void Notifications::showErrorNote(const QString &text, bool noTimeout) |
70 void Notifications::showErrorNote(const QString &text, bool noTimeout) |
73 { |
71 { |
74 showMessageBox(HbMessageBox::MessageTypeWarning, text, "", noTimeout ? HbPopup::NoTimeout : 3000); |
72 showMessageBox(HbMessageBox::MessageTypeWarning, text, "", noTimeout ? HbPopup::NoTimeout : HbPopup::StandardTimeout); |
75 } |
73 } |
76 |
74 |
77 // --------------------------------------------------------------------------- |
75 // --------------------------------------------------------------------------- |
78 |
76 |
79 void Notifications::showConfirmationNote(const QString &text, bool noTimeout) |
77 void Notifications::showConfirmationNote(const QString &text, bool noTimeout) |
83 |
81 |
84 // --------------------------------------------------------------------------- |
82 // --------------------------------------------------------------------------- |
85 |
83 |
86 bool Notifications::showConfirmationQuery(const QString &aText) |
84 bool Notifications::showConfirmationQuery(const QString &aText) |
87 { |
85 { |
88 return HbMessageBox::question(aText); |
86 return false; //HbMessageBox::question(aText); |
89 } |
87 } |
90 |
88 |
91 // --------------------------------------------------------------------------- |
89 // --------------------------------------------------------------------------- |