WeatherWallpaper::WeatherWallpaper(QObject * parent, const QVariantList & args )
    : Plasma::Wallpaper(parent, args)
    , m_configWidget(0)
    , m_weatherLocation(0)
    , m_advancedDialog(0)
    , m_fileDialog(0)
    , m_fadeValue(0)
    , m_animation(0)
    , m_model(0)
{
    connect(this, SIGNAL(renderCompleted(QImage)), this, SLOT(updateBackground(QImage)));
}
Example #2
0
PoTD::PoTD(QObject *parent, const QVariantList &args)
    : Plasma::Wallpaper(parent, args)
{
    connect(this, SIGNAL(renderCompleted(QImage)), this, SLOT(wallpaperRendered(QImage)));
    dataEngine(QLatin1String("potd"))->connectSource(QLatin1String("Providers"), this);
    setUsingRenderingCache(false);

    QAction *saveFile = KStandardAction::save(this, SLOT(getSaveFileLocation()), this);
    saveFile->setText(i18n("Save wallpaper image..."));
    saveFile->setShortcut(QKeySequence());
    setContextualActions(QList<QAction *>() << saveFile);
}
Example #3
0
Image::Image(QObject *parent, const QVariantList &args)
    : Plasma::Wallpaper(parent, args),
      m_delay(10),
      m_fileWatch(new KDirWatch(this)),
      m_configWidget(0),
      m_wallpaperPackage(0),
      m_currentSlide(-1),
      m_fadeValue(0),
      m_animation(0),
      m_model(0),
      m_dialog(0),
      m_randomize(true),
      m_nextWallpaperAction(0),
      m_openImageAction(0)
{
    connect(this, SIGNAL(renderCompleted(QImage)), this, SLOT(updateBackground(QImage)));
    connect(&m_timer, SIGNAL(timeout()), this, SLOT(nextSlide()));
    connect(m_fileWatch, SIGNAL(dirty(QString)), this, SLOT(imageFileAltered(QString)));
    connect(m_fileWatch, SIGNAL(created(QString)), this, SLOT(imageFileAltered(QString)));
}