2
Copyright (c) 2007 Paolo Capriotti <p.capriotti@gmail.com>
3
Copyright (c) 2008 by Petri Damsten <damu@iki.fi>
5
This program is free software; you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation; either version 2 of the License, or
8
(at your option) any later version.
16
#include <QStringList>
18
#include <Plasma/Wallpaper>
19
#include <Plasma/Package>
21
#include "ui_imageconfig.h"
22
#include "ui_slideshowconfig.h"
24
class QPropertyAnimation;
34
class BackgroundListModel;
36
class Image : public Plasma::Wallpaper
39
Q_PROPERTY(qreal fadeValue READ fadeValue WRITE setFadeValue)
42
Image(QObject* parent, const QVariantList& args);
45
virtual void save(KConfigGroup &config);
46
virtual void paint(QPainter* painter, const QRectF& exposedRect);
47
virtual QWidget* createConfigurationInterface(QWidget* parent);
48
void updateScreenshot(QPersistentModelIndex index);
49
qreal fadeValue() const;
52
void settingsChanged(bool);
55
void removeWallpaper(QString name);
56
void timeChanged(const QTime& time);
57
void positioningChanged(int index);
60
void getNewWallpaper();
61
void colorChanged(const QColor& color);
62
void pictureChanged(const QModelIndex &);
63
void wallpaperBrowseCompleted();
66
* Open the current slide in the default image application
69
void updateBackground(const QImage &img);
70
void showFileDialog();
71
void setFadeValue(qreal value);
72
void configWidgetDestroyed();
73
void startSlideshow();
75
void fileDialogFinished();
76
void addUrl(const KUrl &url, bool setAsCurrent);
77
void addUrls(const KUrl::List &urls);
78
void setWallpaper(const QString &path);
79
void setWallpaperRetrieved(KJob *job);
80
void addWallpaperRetrieved(KJob *job);
81
void newStuffFinished();
82
void setConfigurationInterfaceModel();
84
void addDirFromSelectionDialog();
85
void systemCheckBoxToggled(bool);
86
void downloadedCheckBoxToggled(bool);
87
void imageFileAltered(const QString &path);
88
void backgroundsFound(const QStringList &paths, const QString &token);
91
void init(const KConfigGroup &config);
92
void renderWallpaper(const QString& image = QString());
93
void suspendStartup(bool suspend); // for ksmserver
94
void calculateGeometry();
95
void setSingleImage();
96
void updateWallpaperActions();
97
void useSingleImageDefaults();
100
static bool s_startupResumed;
101
static bool s_startupSuspended;
104
Plasma::Wallpaper::ResizeMethod m_resizeMethod;
108
QStringList m_usersWallpapers;
109
KDirWatch *m_fileWatch;
111
QWidget* m_configWidget;
112
Ui::ImageConfig m_uiImage;
113
Ui::SlideshowConfig m_uiSlideshow;
115
Plasma::Package *m_wallpaperPackage;
116
QStringList m_slideshowBackgrounds;
120
QPixmap m_oldFadedPixmap;
123
QPropertyAnimation *m_animation;
124
BackgroundListModel *m_model;
125
KFileDialog *m_dialog;
128
QDateTime m_previousModified;
130
QWeakPointer<KNS3::DownloadDialog> m_newStuffDialog;
133
QAction* m_nextWallpaperAction;
134
QAction* m_openImageAction;