homescreenapp/hsutils/inc/hswallpaperimagereader.h
branchGCC_SURGE
changeset 68 4c11ecddf6b2
parent 53 f75922b9e380
parent 61 2b1b11a301d2
equal deleted inserted replaced
53:f75922b9e380 68:4c11ecddf6b2
     1 /*
       
     2 * Copyright (c) 2010 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:  
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef HSWALLPAPERIMAGEREADER_H
       
    19 #define HSWALLPAPERIMAGEREADER_H
       
    20 
       
    21 #include <QObject>
       
    22 #include <QImage>
       
    23 
       
    24 #include "hsutils_global.h"
       
    25 
       
    26 class HSUTILS_EXPORT HsWallpaperImageReader : public QObject
       
    27 {
       
    28     Q_OBJECT
       
    29 
       
    30 public:    
       
    31     HsWallpaperImageReader(QObject *parent = 0);
       
    32     ~HsWallpaperImageReader();
       
    33 
       
    34     void setSourcePath(const QString &sourcePath);
       
    35     QString getSourcePath() const;
       
    36     void setSourceRect(const QRect &sourceRect);
       
    37     QRect getSourceRect() const;
       
    38     void setTargetRect(const QRect &targetRect);
       
    39     QRect getTargetRect() const;
       
    40     void setCenterTarget(bool center);
       
    41     bool getCenterTarget();
       
    42     QImage getProcessedImage() const;
       
    43 
       
    44 private:
       
    45     Q_DISABLE_COPY(HsWallpaperImageReader)
       
    46 
       
    47 signals:
       
    48     void processingFinished();
       
    49 
       
    50 public slots:
       
    51     void processImage();
       
    52 
       
    53 private:
       
    54     QString mSourcePath;
       
    55     QRect mTargetRect;
       
    56     QRect mSourceRect;
       
    57     bool mCenterTarget;
       
    58 
       
    59     QImage mProcessedImage;
       
    60 };
       
    61 
       
    62 #endif // HSWALLPAPERIMAGEREADER_H