homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hscollectionslistdialog.h
changeset 77 4b195f3bea29
parent 61 2b1b11a301d2
child 85 35368b604b28
equal deleted inserted replaced
61:2b1b11a301d2 77:4b195f3bea29
     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 
       
    18 #ifndef HS_LIST_DIALOG_H
       
    19 #define HS_LIST_DIALOG_H
       
    20 
       
    21 #include <HbSelectionDialog>
       
    22 #include <hsmenuservice.h>
       
    23 
       
    24 #include "hsmenustates_global.h"
       
    25 HS_STATES_TEST_CLASS(MenuStatesTest)
       
    26 class QStandardItemModel;
       
    27 
       
    28 class HsCollectionsListDialog: public HbSelectionDialog
       
    29 {
       
    30     Q_OBJECT
       
    31 
       
    32     HS_STATES_TEST_FRIEND_CLASS(MenuStatesTest)
       
    33 
       
    34 public:
       
    35 
       
    36     HsCollectionsListDialog(HsSortAttribute sortOrder,
       
    37                             int collectionId = 0);
       
    38 
       
    39     virtual ~HsCollectionsListDialog();
       
    40 
       
    41     void open(QObject* receiver, const char* member );
       
    42 
       
    43     int getItemId();
       
    44 
       
    45 protected:
       
    46     void closeEvent( QCloseEvent * event );
       
    47 
       
    48 private:
       
    49 
       
    50     void makeConnect();
       
    51 
       
    52     void makeDisconnect();
       
    53 
       
    54     QStandardItemModel *standartItemModel(HsSortAttribute sortOrder,
       
    55                                           int collectionId);
       
    56 
       
    57     void insertNewCollectionItem(QStandardItemModel *model);
       
    58 
       
    59 private:
       
    60 
       
    61     QStandardItemModel *mModel;
       
    62 
       
    63     int mItemId;
       
    64 };
       
    65 
       
    66 #endif /* HS_LIST_DIALOG_H */