messagingapp/msgui/unifiedviewer/inc/univiewslidewidget.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Fri, 16 Apr 2010 14:56:15 +0300
changeset 23 238255e8b033
child 25 84d9eb65b26f
permissions -rw-r--r--
Revision: 201011 Kit: 201015

/*
 * 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: This widget holds the message details and silde contents.
 *
 */

#ifndef UNIVIEWSLIDE_WIDGET_H
#define UNIVIEWSLIDE_WIDGET_H

#include <hbwidget.h>
#include <qobject.h>

class QGraphicsLinearLayout;
class UniViewerDetailsWidget;
class UniViewerBodyWidget;
class UniViewerFeeder;
class ConvergedMessage;
class HbGroupBox;
class UniViewerAddressContainer;
class UniViewerAttachmentContainer;

/**
 * This widget is place holder for message headers and body
 */
class UniViewSlideWidget: public HbWidget
{
Q_OBJECT

public:
    /**
     * Constructor
     */
    UniViewSlideWidget(UniViewerFeeder* feeder, int slideNumber, QGraphicsItem * parent = 0);

    /**
     * Destructor
     */
    ~UniViewSlideWidget();

    /**
     * Returns the value of mInsideLayout
     * @return value of mInsideLayout
     */
    bool insideLayout();

    /**
     * Sets the mInsideLayout
     * @param inside which is set to mInsideLayout
     */
    void setInsideLayout(bool inside);

public slots:

    /**
     * Clears the content on the widget
     */
    void clearContent();

    /**
     * Populates the content on the widget
     * @param messageDetails message details
     */
    void populateContent();

    /**
     * Populates the content first slide
     * @param messageDetails message details
     */
    void populateFirstSlide();

signals:
        /**
         * this signal is emitted when sendMessage is emitted. from UniViewerTextItem.
         */
        void sendMessage(const QString& phoneNumber);

private:

    /**
     * This is used only inside the contents widget
     * to find out if the slide widget is inside the
     * layout of contents widget
     */
    bool mInsideLayout;

    /**
     * slide number
     */
    int mSlideNumber;

    /**
     * QGraphicsLinearLayout object
     * Owned
     */
    QGraphicsLinearLayout* mMainLayout;

    /**
     * UniViewerDetailsWidget object
     * Owned
     */
    UniViewerDetailsWidget *mViewerDetails;

    /**
     * UniViewerFeeder object
     * Owned
     */
    UniViewerFeeder* mViewFeeder;

    /**
     * UniViewerBodyWidget object
     * owned.
     */
    UniViewerBodyWidget* mBody;

    /**
     * HbGroupBox object
     * owned.
     */
    HbGroupBox *mHeaderGroupBox;

    /**
     * UniViewerAddressContainer object
     * owned.
     */
    UniViewerAddressContainer *mAddressContainer;

    /**
     * UniViewerAttachmentContainer object
     * owned.
     */
    UniViewerAttachmentContainer *mAttachmentContainer;

};

#endif // UNIVIEWSLIDE_WIDGET_H
// EOF