1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * |
|
15 * Description: |
|
16 * The source file of filemanager messagebox |
|
17 */ |
|
18 |
|
19 #include "fmmessagebox.h" |
|
20 #include <hbmessagebox.h> |
|
21 |
|
22 /*! |
|
23 This is a convenience function for showing an information dialog with \a informationText |
|
24 */ |
|
25 void FmMessageBox::information( const QString &informationText, |
|
26 HbMessageBox::StandardButtons buttons ) |
|
27 { |
|
28 HbMessageBox::information ( informationText, |
|
29 this, SLOT(dialogClosed(HbAction*)), buttons ); |
|
30 mEventLoop.exec(); |
|
31 } |
|
32 |
|
33 /*! |
|
34 This is a convenience function for showing a question dialog with \a questionText |
|
35 */ |
|
36 bool FmMessageBox::question( const QString &questionText, |
|
37 HbMessageBox::StandardButtons buttons ) |
|
38 { |
|
39 HbMessageBox::question ( questionText, |
|
40 this, SLOT(dialogClosed(HbAction*)), buttons ); |
|
41 mEventLoop.exec(); |
|
42 return mRet; |
|
43 } |
|
44 |
|
45 void FmMessageBox::dialogClosed(HbAction *action) |
|
46 { |
|
47 HbMessageBox *dlg = static_cast<HbMessageBox*>(sender()); |
|
48 if(action == dlg->actions().at(0)) |
|
49 { |
|
50 mRet = true; |
|
51 } |
|
52 else |
|
53 { |
|
54 mRet = false; |
|
55 } |
|
56 mEventLoop.exit(); |
|
57 } |
|