~ubuntu-branches/ubuntu/quantal/kpackagekit/quantal

« back to all changes in this revision

Viewing changes to libkpackagekit/KpkTransaction.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Rohan Garg
  • Date: 2011-01-10 17:20:02 UTC
  • mfrom: (1.2.13 upstream)
  • Revision ID: james.westby@ubuntu.com-20110110172002-64acog2s0tk4iav9
Tags: 0.6.3.3-0ubuntu1
* New upstream release
  - Refresh kubuntu_06_no_automatic_updates.diff
  - Drop kubuntu_08_updates_info.diff, applied upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
#include <KMessageBox>
27
27
#include <KPushButton>
28
28
#include <KService>
 
29
#include <KPixmapSequence>
 
30
#include <KPixmapSequenceOverlayPainter>
29
31
 
30
32
#include <KDebug>
31
33
 
32
 
#include <QMovie>
33
34
#include <QPropertyAnimation>
34
35
#include <QtDBus/QDBusMessage>
35
36
#include <QtDBus/QDBusConnection>
65
66
    QVector<KService*> applications;
66
67
    KpkSimulateModel *simulateModel;
67
68
    ProgressView *progressView;
 
69
    KPixmapSequenceOverlayPainter *busySeq;
68
70
 
69
71
    void clearApplications()
70
72
    {
87
89
{
88
90
    d->ui.setupUi(mainWidget());
89
91
 
 
92
    d->busySeq = new KPixmapSequenceOverlayPainter(this);
 
93
    d->busySeq->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
 
94
    d->busySeq->setWidget(d->ui.label);
 
95
    d->ui.label->clear();
 
96
 
90
97
    d->finished = true; // for sanity we are finished till some transaction is set
91
98
    d->onlyTrusted = true; // for sanity we are trusted till an error is given and the user accepts
92
99
    d->simulateModel = 0;
354
361
        m_status = status;
355
362
        d->ui.currentL->setText(KpkStrings::status(status));
356
363
 
357
 
        QMovie *movie;
358
 
        // Grab the right icon name
359
 
        QString icon(KpkIcons::statusAnimation(status));
360
 
        movie = KIconLoader::global()->loadMovie(icon,
361
 
                                                KIconLoader::NoGroup,
362
 
                                                48,
363
 
                                                this);
364
 
        if (movie) {
365
 
            // If the movie is set we KIconLoader it,
366
 
            // set it and start
367
 
            d->ui.label->setMovie(movie);
368
 
            movie->start();
369
 
        } else {
370
 
            // Else it's probably a static icon so try to load
371
 
            d->ui.label->setPixmap(KpkIcons::getIcon(icon).pixmap(48,48));
 
364
//         kDebug() << KIconLoader::global()->iconPath(KpkIcons::statusAnimation(status), -KIconLoader::SizeLarge);
 
365
        KPixmapSequence sequence = KPixmapSequence(KpkIcons::statusAnimation(status),
 
366
                                                   KIconLoader::SizeLarge);
 
367
        if (sequence.isValid()) {
 
368
            d->busySeq->setSequence(sequence);
 
369
            d->busySeq->start();
372
370
        }
373
371
    } else if (status == Enum::StatusDownload && m_trans->speed() != 0) {
374
372
        uint speed = m_trans->speed();