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