homescreenapp/hsdomainmodel/src/hswallpaper.cpp
changeset 51 4785f57bf3d4
parent 46 23b5d6a29cce
child 60 30f14686fb04
equal deleted inserted replaced
46:23b5d6a29cce 51:4785f57bf3d4
    54                                    const QString &portraitImagePath)
    54                                    const QString &portraitImagePath)
    55 {
    55 {
    56     mLImagePath = landscapeImagePath;
    56     mLImagePath = landscapeImagePath;
    57     mPImagePath = portraitImagePath;
    57     mPImagePath = portraitImagePath;
    58     mOrientation = HsScene::orientation();
    58     mOrientation = HsScene::orientation();
    59     
    59 
    60     if (mOrientation == Qt::Horizontal) {
    60     if (mOrientation == Qt::Horizontal) {
    61         setLandscapeImage(mLImagePath, true);
    61         setLandscapeImage(mLImagePath, true);
    62     } else {
    62     } else {
    63         setPortraitImage(mPImagePath, true);
    63         setPortraitImage(mPImagePath, true);
    64     }
    64     }
    88         mLImagePath.clear();
    88         mLImagePath.clear();
    89     }
    89     }
    90     if (mPImagePath != wallpaperPath(Qt::Vertical)) {
    90     if (mPImagePath != wallpaperPath(Qt::Vertical)) {
    91         QFile::remove(mPImagePath);
    91         QFile::remove(mPImagePath);
    92         mPImagePath.clear();
    92         mPImagePath.clear();
    93     }    
    93     }
    94     return true;
    94     return true;
    95 }
    95 }
    96 
    96 
    97 QString HsWallpaper::wallpaperDirectory()
    97 QString HsWallpaper::wallpaperDirectory()
    98 {
    98 {
    99 #ifdef Q_OS_SYMBIAN
    99 #ifdef Q_OS_SYMBIAN
   100     static QString directory =
   100     static QString directory =
   101         QDir::toNativeSeparators("c:/private/20022f35/wallpapers/");
   101         QDir::toNativeSeparators("c:/private/20022f35/wallpapers/");
   102 #else
   102 #else
   103     static QString directory = 
   103     static QString directory =
   104         QDir::toNativeSeparators(QDir::currentPath() + "/private/20022f35/wallpapers/");
   104         QDir::toNativeSeparators(QDir::currentPath() + "/private/20022f35/wallpapers/");
   105 #endif
   105 #endif
   106 
   106 
   107     return directory;
   107     return directory;
   108 }
   108 }