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