ui/views/viewbase/inc/glxview.h
changeset 23 74c9f037fd5d
child 24 99ad1390cd33
equal deleted inserted replaced
5:f7f0874bfe7d 23:74c9f037fd5d
       
     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:   ?Description
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef GLXVIEW_H_
       
    21 #define GLXVIEW_H_
       
    22 
       
    23 
       
    24 //Includes
       
    25 #include <hbview.h>
       
    26 
       
    27 //User Includes
       
    28 #include "glxuistd.h"
       
    29 
       
    30 
       
    31 //Qt/Orbit forward declartion
       
    32 class QAbstractItemModel;
       
    33 class QItemSelectionModel;
       
    34 
       
    35 class GlxView :public HbView
       
    36 {
       
    37 Q_OBJECT
       
    38     
       
    39 public :
       
    40     GlxView(qint32 id, QGraphicsItem *parent = 0 ) : HbView(parent), mId(id)
       
    41     { 
       
    42     
       
    43     }
       
    44 	
       
    45     virtual void activate() = 0;
       
    46     virtual void deActivate() = 0;
       
    47     virtual void setModel(QAbstractItemModel *model) = 0;
       
    48     virtual bool compare (qint32 id)
       
    49     { 
       
    50         return mId == id;
       
    51     }
       
    52     virtual void addToolBar( HbToolBar *toolBar ) { Q_UNUSED(toolBar) }
       
    53     virtual void enableMarking() { }
       
    54     virtual void disableMarking() { }
       
    55     virtual void handleUserAction(qint32 commandId) { Q_UNUSED(commandId) }
       
    56     virtual QItemSelectionModel * getSelectionModel() { return NULL ; }
       
    57     virtual void resetView() {}
       
    58     virtual void initializeView(QAbstractItemModel *model) {Q_UNUSED(model)}
       
    59     inline qint32 viewId() { return mId;}
       
    60     virtual QGraphicsItem * getAnimationItem( GlxEffect transtionEffect ) 
       
    61     {
       
    62         Q_UNUSED(transtionEffect)
       
    63         return NULL; 
       
    64     }
       
    65     
       
    66     virtual ~GlxView()
       
    67     {
       
    68     	
       
    69     }
       
    70 	
       
    71 signals:
       
    72     void actionTriggered(qint32 id);
       
    73     void itemSpecificMenuTriggered(qint32,QPointF );	
       
    74 
       
    75     void gridItemSelected(const QModelIndex &);
       
    76     
       
    77 private :
       
    78 	qint32 mId;
       
    79 	
       
    80 };
       
    81 
       
    82 #endif /* GLXVIEW_H_ */