videocollection/tsrc/stubs/inc/hbselectiondialog.h
changeset 67 72c709219fcd
equal deleted inserted replaced
66:adb51f74b890 67:72c709219fcd
       
     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:  stub HbSelectionDialog
       
    15 * 
       
    16 */
       
    17 
       
    18 #ifndef HBSELECTIONDIALOG_H
       
    19 #define HBSELECTIONDIALOG_H
       
    20 
       
    21 #include <QObject>
       
    22 #include "hbwidget.h"
       
    23 #include "hbdialog.h"
       
    24 #include "hbselectiondialog.h"
       
    25 #include "hbabstractitemview.h"
       
    26 
       
    27 class HbListView;
       
    28 class QGraphicsItem;
       
    29 class QGraphicsWidget;
       
    30 class HbAction;
       
    31 class QAbstractItemModel;
       
    32 
       
    33 
       
    34 class HbSelectionDialog :  public HbDialog
       
    35 {
       
    36    Q_OBJECT
       
    37    
       
    38 signals:
       
    39 
       
    40    void selectionChanged(); 
       
    41    
       
    42 public:
       
    43 
       
    44     
       
    45     /**
       
    46      * contructor
       
    47      */
       
    48     HbSelectionDialog(QGraphicsItem *parent=0);
       
    49     
       
    50     /**
       
    51      * destructor
       
    52      */
       
    53     ~HbSelectionDialog();
       
    54 
       
    55 public:
       
    56     
       
    57     void setSelectionMode(HbAbstractItemView::SelectionMode mode);
       
    58     HbAbstractItemView::SelectionMode selectionMode() const;
       
    59 
       
    60     void setModel(QAbstractItemModel* model);
       
    61     QAbstractItemModel* model() const;
       
    62     QModelIndexList selectedModelIndexes() const;
       
    63     void setSelectedModelIndexes(QModelIndexList list);
       
    64     QString selectionTitle() const;
       
    65     void setSelectionTitle(const QString& title);
       
    66     void setListView(HbListView* list);
       
    67     virtual QGraphicsItem *primitive(const QString &itemName) const;
       
    68 
       
    69     HbAbstractItemView::SelectionMode mSelectionMode;
       
    70     QAbstractItemModel* mModel;
       
    71     QModelIndexList mModelIndexList;
       
    72     HbListView* mListView;
       
    73     
       
    74     /**
       
    75      * address of current instance zeroed during destcructor
       
    76      * this is for making sure object is removed correctly
       
    77      */
       
    78     static HbSelectionDialog *currentInstance;
       
    79         
       
    80     /**
       
    81      * if true, exec returns mPrimaryAction
       
    82      */
       
    83     static bool execReturnPrimary;
       
    84     
       
    85     /**
       
    86      * if true, primaryAction() -method returns null
       
    87      */
       
    88     static bool primaryReturnNull;   
       
    89     
       
    90     /**
       
    91      * if true, secondaryAction() -method returns null
       
    92      */
       
    93     static bool secondaryReturnNull;
       
    94     
       
    95     /**
       
    96      * the amount how many times the open has been called.
       
    97      */
       
    98     static int openAmount;
       
    99     
       
   100 };
       
   101 
       
   102 #endif