homescreenapp/hsdomainmodel/inc/hswallpaper.h
changeset 35 f9ce957a272c
child 36 cdae8c6c3876
equal deleted inserted replaced
5:c743ef5928ba 35:f9ce957a272c
       
     1 /*
       
     2 * Copyright (c) 2009 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 HSWALLPAPER_H
       
    19 #define HSWALLPAPER_H
       
    20 
       
    21 #include <HbWidget>
       
    22 #include <QScopedPointer>
       
    23 #include "hsdomainmodel_global.h"
       
    24 #include "hstest_global.h"
       
    25 
       
    26 HOMESCREEN_TEST_CLASS(TestRuntimeServices)
       
    27 
       
    28 class HsWallpaperPrivate;
       
    29 class HSDOMAINMODEL_EXPORT HsWallpaper : public HbWidget
       
    30 {
       
    31     Q_OBJECT
       
    32 
       
    33 public:
       
    34     HsWallpaper(QGraphicsItem *parent = 0);
       
    35     ~HsWallpaper();
       
    36 
       
    37     void paint(QPainter *painter,
       
    38                const QStyleOptionGraphicsItem *option, 
       
    39                QWidget *widget = 0);
       
    40 
       
    41     bool setImagesById(const QString &id = "d",
       
    42                        const QString &ext = "png");
       
    43     bool setImagesByPaths(const QString &landscapeImagePath,
       
    44                           const QString &portraitImagePath);
       
    45 
       
    46     bool removeImages();
       
    47 
       
    48     static QString wallpaperDirectory();
       
    49     static QString wallpaperPath(Qt::Orientation orientation,
       
    50                                  const QString &id = "d",
       
    51                                  const QString &ext = "png");
       
    52 
       
    53 private:    
       
    54     Q_DISABLE_COPY(HsWallpaper)
       
    55 
       
    56 private:
       
    57     QScopedPointer<HsWallpaperPrivate> mD;
       
    58     
       
    59     HOMESCREEN_TEST_FRIEND_CLASS(TestRuntimeServices)
       
    60 };
       
    61 
       
    62 #endif // HSWALLPAPER_H