~ubuntu-branches/debian/stretch/apper/stretch

« back to all changes in this revision

Viewing changes to Sentinel/TransactionJob.h

  • Committer: Package Import Robot
  • Author(s): Matthias Klumpp
  • Date: 2013-06-24 14:32:36 UTC
  • mfrom: (8.1.1 experimental)
  • Revision ID: package-import@ubuntu.com-20130624143236-8259lpdjgnrjxiik
Tags: 0.8.0-2
* Upload to unstable (Closes: #696585, #697996, #708090)
* Add patch to compile against new QPK API

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/***************************************************************************
2
 
 *   Copyright (C) 2008-2011 by Daniel Nicoletti                           *
3
 
 *   dantti12@gmail.com                                                    *
4
 
 *                                                                         *
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.                                   *
9
 
 *                                                                         *
10
 
 *   This program is distributed in the hope that it will be useful,       *
11
 
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
12
 
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
13
 
 *   GNU General Public License for more details.                          *
14
 
 *                                                                         *
15
 
 *   You should have received a copy of the GNU General Public License     *
16
 
 *   along with this program; see the file COPYING. If not, write to       *
17
 
 *   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,  *
18
 
 *   Boston, MA 02110-1301, USA.                                           *
19
 
 ***************************************************************************/
20
 
 
21
 
#ifndef TRANSACTION_JOB_H
22
 
#define TRANSACTION_JOB_H
23
 
 
24
 
#include <KJob>
25
 
 
26
 
#include <Transaction>
27
 
 
28
 
#include <QAction>
29
 
 
30
 
using namespace PackageKit;
31
 
 
32
 
class PkTransactionDialog;
33
 
class TransactionTrayIcon;
34
 
class TransactionJob : public KJob
35
 
{
36
 
    Q_OBJECT
37
 
public:
38
 
    explicit TransactionJob(Transaction *transaction, QObject *parent = 0);
39
 
    ~TransactionJob();
40
 
 
41
 
    virtual void start();
42
 
 
43
 
private slots:
44
 
    void transactionDestroyed();
45
 
    void finished(PackageKit::Transaction::Exit exit = Transaction::ExitSuccess);
46
 
    void package(const PackageKit::Package &package);
47
 
    void repoDetail(const QString &repoId, const QString &repoDescription);
48
 
    void updateJob();
49
 
 
50
 
protected:
51
 
    virtual bool doKill();
52
 
    void emitDescription();
53
 
 
54
 
private:
55
 
    Transaction  *m_transaction;
56
 
    Transaction::Status  m_status;
57
 
    Transaction::Role m_role;
58
 
    uint          m_percentage;
59
 
    uint          m_speed;
60
 
    QString       m_details;
61
 
    QStringList   m_packages;
62
 
};
63
 
 
64
 
#endif