contacts_plat/contacts_ui_api/inc/cntabstractview.h
author hgs
Fri, 15 Oct 2010 12:24:46 +0300
changeset 81 640d30f4fb64
parent 61 d30183af6ca6
permissions -rw-r--r--
201041

/*
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:
*
*/
#ifndef CNTABSTRACTVIEW_H_
#define CNTABSTRACTVIEW_H_

#include <cntabstractviewmanager.h>
#include <cntviewparams.h>
#include <cntabstractengine.h>

class HbView;

class CntAbstractView
{
      
public:
    virtual ~CntAbstractView(){}
    
public:
    /**
     * View is activated after its added to main window and is
     * ready to be drawn.
     */
    virtual void activate(const CntViewParameters aArgs) = 0;
    
    /**
     * View details are internalized from stream to view parameters.
     */
    virtual bool internalize(QDataStream &stream, CntViewParameters &viewParameters) 
    { 
        Q_UNUSED(stream); 
        Q_UNUSED(viewParameters);
        return false;  
    }
    
    /**
     * View is externalized parameters and return activity name.
     */
    virtual QString externalize(QDataStream &stream) 
    { 
        Q_UNUSED(stream); 
        return QString(); 
    }
    
    /**
     * View is deactivated just before its removed from
     * main window.
     */
    virtual void deactivate() = 0;
    
    /**
     * Default view is not deleted when its removed from
     * main window. So, if view is NOT default, its deleted
     * after its removed from main window.
     */
    virtual bool isDefault() const = 0;
    
    /**
     * return the view implementation.
     */
    virtual HbView* view() const = 0;
    
    /*!
     * return the view id
     */
    virtual int viewId() const = 0;
	
	/*!
	 * set engine. This must be called right after C'tor.
	 */
	virtual void setEngine( CntAbstractEngine& aEngine ) = 0;
};
#endif /* CNTABSTRACTVIEW_H_ */