90
|
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 |
* Description:
|
|
15 |
*
|
|
16 |
*/
|
97
|
17 |
|
90
|
18 |
#ifndef HS_DIALOG_CONTROLLER_H
|
|
19 |
#define HS_DIALOG_CONTROLLER_H
|
|
20 |
|
|
21 |
#include <QObject>
|
|
22 |
#include <QPair>
|
|
23 |
#include <QMap>
|
|
24 |
|
97
|
25 |
#include "hsmenudialogfactory.h"
|
|
26 |
#include "hsmenuentryremovedhandler.h"
|
|
27 |
|
90
|
28 |
class QAction;
|
|
29 |
class QString;
|
|
30 |
class HbDialog;
|
|
31 |
|
|
32 |
class HsDialogController: public QObject
|
|
33 |
{
|
|
34 |
Q_OBJECT
|
|
35 |
public:
|
|
36 |
HsDialogController(
|
|
37 |
const QString &message,
|
|
38 |
HsMenuDialogFactory::Options =
|
|
39 |
HsMenuDialogFactory::OkCancel);
|
|
40 |
|
|
41 |
HsDialogController(HbDialog *dialog, int acceptActionIndex,
|
|
42 |
int rejectActionIndex);
|
|
43 |
|
|
44 |
~HsDialogController();
|
|
45 |
|
|
46 |
void openDialog(int entryId = 0);
|
|
47 |
|
|
48 |
|
|
49 |
signals:
|
|
50 |
void acceptActionTriggered(QAction* action);
|
|
51 |
void rejectActionTriggered(QAction* action);
|
|
52 |
void dialogCompleted();
|
|
53 |
|
|
54 |
public slots:
|
|
55 |
void dismissDialog();
|
|
56 |
|
|
57 |
private slots:
|
|
58 |
void onDialogFinished(HbAction* action);
|
|
59 |
private:
|
|
60 |
HbDialog *mDialog;
|
|
61 |
|
|
62 |
const int mAcceptActionIndex;
|
|
63 |
const int mRejectActionIndex;
|
|
64 |
};
|
|
65 |
|
|
66 |
#endif
|