homescreenapp/hsdomainmodel/inc/hswallpaperloaderthread.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Wed, 23 Jun 2010 18:03:36 +0300
changeset 60 30f14686fb04
permissions -rw-r--r--
Revision: 201023 Kit: 2010125

/*
* Copyright (c) 2010 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 HSWALLPAPERLOADERTHREAD_H
#define HSWALLPAPERLOADERTHREAD_H

#include <QThread>
#include <QString>
#include <QRect>
#include "hsdomainmodel_global.h"
#include "hstest_global.h"

HOMESCREEN_TEST_CLASS(TestHsDomainModel)

class HSDOMAINMODEL_EXPORT HsWallpaperLoaderThread : public QThread
{
    Q_OBJECT

public:
    HsWallpaperLoaderThread(QObject *parent = 0);
    ~HsWallpaperLoaderThread();

    void setSourcePath(const QString &path) { mSourcePath = path; }
    QString sourcePath() const { return mSourcePath; }

    void setTargetPath(const QString &path) { mTargetPath = path; }
    QString targetPath() const { return mTargetPath; }

    void setTargetSize(const QSize &size) { mTargetSize = size; }
    QSize targetSize() const { return mTargetSize; }

    bool result() const { return mResult; }

protected:
    void run();

private:
    Q_DISABLE_COPY(HsWallpaperLoaderThread)

private:
    QString mSourcePath;
    QString mTargetPath;
    QSize mTargetSize;
    bool mResult;
    HOMESCREEN_TEST_FRIEND_CLASS(TestHsDomainModel)
};

#endif // HSWALLPAPERLOADERTHREAD_H