smf/smfservermodule/smfcommon/smfpicture.h
author cgandhi
Thu, 23 Sep 2010 17:20:22 +0530
changeset 24 1cee9f1b95e0
parent 18 013a02bf2bb0
permissions -rw-r--r--
taking care of credmgr for RVCT B686 compilation
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
18
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
     1
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
     2
 * Copyright (c) 2010 Sasken Communication Technologies Ltd.
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
     3
 * All rights reserved.
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
     4
 * This component and the accompanying materials are made available
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
     5
 * under the terms of the "Eclipse Public License v1.0" 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
     6
 * which accompanies  this distribution, and is available
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
     7
 * at the URL "http://www.eclipse.org/legal/epl-v10.html"
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
     8
 *
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
     9
 * Initial Contributors:
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    10
 * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    11
 *
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    12
 * Contributors:
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    13
 * Manasij Roy, Nalina Hariharan
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    14
 * 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    15
 * Description:
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    16
 * The picture class represents an instance of a picture
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    17
 *
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    18
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    19
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    20
#ifndef SMFPICTURE_H_
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    21
#define SMFPICTURE_H_
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    22
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    23
#include <QImage>
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    24
#include <QDateTime>
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    25
#include <QStringList>
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    26
#include <QUrl>
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    27
#include <qdatastream.h>
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    28
#include <QSharedData>
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    29
#include <smfclientglobal.h>
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    30
#include <QMetaType>
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    31
#include <smfcomment.h>
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    32
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    33
class SmfPicturePrivate;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    34
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    35
 * Max size for one SmfPicture
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    36
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    37
const int MaxSmfPictureSize = 1000;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    38
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    39
 * SmfPictureVisibility enumeration
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    40
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    41
enum SmfPictureVisibility
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    42
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    43
	SMFVisibilityFriend,
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    44
	SMFVisibilityPersonal,
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    45
	SMFVisibilityFamily,
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    46
	SMFVisibilityGroup,
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    47
	SMFVisibilityPublic
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    48
	};
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    49
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    50
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    51
 * @ingroup smf_common_group
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    52
 * The picture class represents an instance of a picture
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    53
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    54
class SMFCOMMON_EXPORT SmfPicture
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    55
	{
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    56
public:
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    57
	/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    58
	 * Constructor with default argument.
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    59
	 * @param aDownloaded This flag is to know whether the content is downloaded
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    60
	 * in the device(if true). If false it signifies that SmfPicture contains
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    61
	 * a link/url to the location of the content
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    62
	 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    63
	SmfPicture(/*bool aDownloaded = false*/ );
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    64
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    65
	/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    66
	 * Copy Constructor
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    67
	 * @param aOther The reference object
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    68
	 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    69
	SmfPicture( const SmfPicture &aOther );
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    70
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    71
	/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    72
	 * CConstructs SmfPicture from QImage
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    73
	 * @param aImage The QImage
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    74
	 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    75
	SmfPicture( const QImage &aImage );
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    76
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    77
	/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    78
	 * Overloaded = operator
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    79
	 * @param aOther The reference object
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    80
	 * @return The current object reference
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    81
	 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    82
	SmfPicture& operator=(const SmfPicture &aOther);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    83
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    84
	/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    85
	 * Destructor
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    86
	 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    87
	~SmfPicture( );
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    88
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    89
	/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    90
	 * Method to get a picture owner
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    91
	 * @return The owner of the picture
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    92
	 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    93
	QString owner( ) const;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    94
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    95
	/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    96
	 * Method to get a picture title
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    97
	 * @return The title of the picture
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    98
	 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
    99
	QString title( ) const;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   100
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   101
	/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   102
	 * Method to get a picture description
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   103
	 * @return The description of the picture
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   104
	 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   105
	QString description( ) const;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   106
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   107
	/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   108
	 * Method to get a visibility of a picture for public
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   109
	 * @return The visibility mode of this picture for others
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   110
	 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   111
	SmfPictureVisibility visibility( ) const;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   112
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   113
	/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   114
	 * Method to get the date of posting the picture
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   115
	 * @return The posted date of the picture
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   116
	 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   117
	QDateTime postedDate( ) const;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   118
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   119
	/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   120
	 * Method to get the comments for the picture
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   121
	 * @return The comments for the picture
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   122
	 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   123
	QList<SmfComment> comments( ) const;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   124
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   125
	/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   126
	 * Method to get the tags for the picture
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   127
	 * @return The tags for the picture
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   128
	 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   129
	QStringList tags( ) const;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   130
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   131
	/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   132
	 * Method to get the url of the picture
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   133
	 * @return The url of the picture
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   134
	 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   135
	QUrl url( ) const;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   136
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   137
	/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   138
	 * Method to get the picture data as QImage
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   139
	 * @return The picture as QImage
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   140
	 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   141
	QImage picture( ) const;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   142
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   143
	/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   144
	 * Method to get the id of the picture
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   145
	 * @return The ID value 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   146
	 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   147
	QString id( ) const;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   148
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   149
	/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   150
	 * Gets download flag. This flag is to know whether the content is downloaded
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   151
	 * in the device(if true). If false it signifies that SmfPicture contains
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   152
	 * a link/url to the location of the content
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   153
	 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   154
	bool downloadFlag();
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   155
			
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   156
	/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   157
	 * Method to set a picture owner
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   158
	 * @param aOwner The owner of the picture
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   159
	 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   160
	void setOwner( const QString &aOwner );
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   161
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   162
	/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   163
	 * Method to set a picture title
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   164
	 * @param aTitle The title of the picture
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   165
	 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   166
	void setTitle( const QString &aTitle );
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   167
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   168
	/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   169
	 * Method to set a picture description
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   170
	 * @param aDescription The description of the picture
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   171
	 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   172
	void setDescription( const QString &aDescription );
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   173
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   174
	/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   175
	 * Method to set a visibility of a picture for public
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   176
	 * @param aVisibility aVisibility The visibility mode of 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   177
	 * this picture for others
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   178
	 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   179
	void setVisibility( const SmfPictureVisibility &aVisibility );
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   180
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   181
	/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   182
	 * Method to set the date of posting the picture
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   183
	 * @param aDate The post date of the picture
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   184
	 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   185
	void setPostedDate( const QDateTime &aDate );
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   186
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   187
	/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   188
	 * Method to add comment on the picture
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   189
	 * @param aComment The comment for the picture
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   190
	 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   191
	void addComment( const SmfComment &aComment );
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   192
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   193
	/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   194
	 * Method to add tags for the picture
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   195
	 * @param aTag The tag for the picture
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   196
	 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   197
	void addTags( const QStringList &aTags );
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   198
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   199
	/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   200
	 * Method to set the url of the picture
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   201
	 * @param aUrl The url of the picture
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   202
	 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   203
	void setUrl( const QUrl &aUrl );
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   204
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   205
	/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   206
	 * Method to set the picture data as QImage
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   207
	 * @param aData The picture as QImage
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   208
	 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   209
	void setPicture( const QImage &aData );
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   210
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   211
	/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   212
	 * Method to set the id of the picture
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   213
	 * @param aId The ID value 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   214
	 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   215
	void setId( const QString &aId );
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   216
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   217
private:
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   218
	QSharedDataPointer<SmfPicturePrivate> d;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   219
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   220
	friend QDataStream& operator<<( QDataStream &aDataStream, 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   221
			const SmfPicture &aPic );
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   222
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   223
	friend QDataStream& operator>>( QDataStream &aDataStream, 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   224
			SmfPicture &aPic );
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   225
	
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   226
	};
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   227
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   228
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   229
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   230
 * Method for Externalization. Writes the SmfPicture object to 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   231
 * the stream and returns a reference to the stream.
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   232
 * @param aDataStream Stream to be written
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   233
 * @param aPic The SmfPicture object to be externalized
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   234
 * @return reference to the written stream
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   235
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   236
SMFCOMMON_EXPORT QDataStream& operator<<( QDataStream &aDataStream, 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   237
		const SmfPicture &aPic );
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   238
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   239
/**
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   240
 * Method for Internalization. Reads a SmfPicture object from 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   241
 * the stream and returns a reference to the stream.
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   242
 * @param aDataStream Stream to be read
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   243
 * @param aPic The SmfPicture object to be internalized
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   244
 * @return reference to the stream
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   245
 */
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   246
SMFCOMMON_EXPORT QDataStream& operator>>( QDataStream &aDataStream, 
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   247
		SmfPicture &aPic);
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   248
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   249
typedef QList<SmfPicture> SmfPictureList;
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   250
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   251
// Make the class SmfPicture known to QMetaType, so that as to register it.
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   252
Q_DECLARE_METATYPE(SmfPicture)
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   253
Q_DECLARE_METATYPE(QList<SmfPicture>)
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   254
013a02bf2bb0 pushing changes for common libs and trace messages
cgandhi
parents:
diff changeset
   255
#endif /* SMFPICTURE_H_ */