add a wallpaper package definition

svn path=/trunk/KDE/kdelibs/; revision=948063
This commit is contained in:
Aaron J. Seigo 2009-04-02 06:29:46 +00:00
parent de4602c113
commit e309bf2da3
2 changed files with 20 additions and 0 deletions

View File

@ -154,6 +154,18 @@ ThemePackage::ThemePackage(QObject *parent)
setDefaultMimetypes(mimetypes); setDefaultMimetypes(mimetypes);
} }
WallpaperPackage::WallpaperPackage(QObject *parent)
: PackageStructure(parent, "Background")
{
QStringList mimetypes;
mimetypes << "image/svg" << "image/png" << "image/jpeg" << "image/jpg";
setDefaultMimetypes(mimetypes);
addDirectoryDefinition("images", "images", i18n("Images"));
addFileDefinition("screenshot", "screenshot.png", i18n("Screenshot"));
setAllowExternalPaths(true);
}
} // namespace Plasma } // namespace Plasma
#include "packages_p.moc" #include "packages_p.moc"

View File

@ -44,6 +44,14 @@ public:
explicit ThemePackage(QObject *parent = 0); explicit ThemePackage(QObject *parent = 0);
}; };
class WallpaperPackage : public PackageStructure
{
Q_OBJECT
public:
explicit WallpaperPackage(QObject *parent = 0);
};
PackageStructure::Ptr defaultPackageStructure(ComponentType type); PackageStructure::Ptr defaultPackageStructure(ComponentType type);
} // namespace Plasma } // namespace Plasma