21 |
21 |
22 /*! |
22 /*! |
23 This is a convenience function for showing an information dialog with \a informationText |
23 This is a convenience function for showing an information dialog with \a informationText |
24 */ |
24 */ |
25 void FmMessageBox::information( const QString &informationText, |
25 void FmMessageBox::information( const QString &informationText, |
26 HbMessageBox::StandardButtons buttons ) |
26 HbMessageBox::StandardButtons buttons, bool isBlocking ) |
27 { |
27 { |
28 HbMessageBox::information ( informationText, |
28 HbMessageBox::information( informationText, |
29 this, SLOT(dialogClosed(HbAction*)), buttons ); |
29 this, SLOT(dialogClosed(HbAction*)), buttons ); |
30 mEventLoop.exec(); |
30 if ( isBlocking ) { |
|
31 mEventLoop.exec(); |
|
32 } |
|
33 |
31 } |
34 } |
32 |
35 |
33 /*! |
36 /*! |
34 This is a convenience function for showing a question dialog with \a questionText |
37 This is a convenience function for showing a question dialog with \a questionText |
35 */ |
38 */ |
36 bool FmMessageBox::question( const QString &questionText, |
39 bool FmMessageBox::question( const QString &questionText, |
37 HbMessageBox::StandardButtons buttons ) |
40 HbMessageBox::StandardButtons buttons ) |
38 { |
41 { |
39 HbMessageBox::question ( questionText, |
42 HbMessageBox::question( questionText, |
40 this, SLOT(dialogClosed(HbAction*)), buttons ); |
43 this, SLOT(dialogClosed(HbAction*)), buttons ); |
41 mEventLoop.exec(); |
44 mEventLoop.exec(); |
42 return mRet; |
45 return mRet; |
|
46 } |
|
47 |
|
48 /*! |
|
49 This is a convenience function for showing a warning dialog with \a warningText |
|
50 */ |
|
51 void FmMessageBox::warning( const QString &warningText, |
|
52 HbMessageBox::StandardButtons buttons, bool isBlocking ) |
|
53 { |
|
54 HbMessageBox::warning( warningText, |
|
55 this, SLOT(dialogClosed(HbAction*)), buttons ); |
|
56 if ( isBlocking ) { |
|
57 mEventLoop.exec(); |
|
58 } |
43 } |
59 } |
44 |
60 |
45 void FmMessageBox::dialogClosed(HbAction *action) |
61 void FmMessageBox::dialogClosed(HbAction *action) |
46 { |
62 { |
47 HbMessageBox *dlg = static_cast<HbMessageBox*>(sender()); |
63 HbMessageBox *dlg = static_cast<HbMessageBox*>(sender()); |