~ubuntu-branches/debian/jessie/apper/jessie

« back to all changes in this revision

Viewing changes to plasmoid/updaterapplet.h

  • Committer: Package Import Robot
  • Author(s): Matthias Klumpp
  • Date: 2013-07-30 12:34:46 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20130730123446-cgzujaj03pc61drn
Tags: 0.8.1-1
* New upstream release: 0.8.1
* Depend on software-properties-kde instead of suggesting it (Closes: #696583)
* Add patch to make AppStream loading more failsafe

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/***************************************************************************
2
 
 *   Copyright (C) 2007-2009 by Shawn Starr <shawn.starr@rogers.com>       *
3
 
 *   Copyright (C) 2012 by Luís Gabriel Lima <lampih@gmail.com>            *
4
 
 *   Copyright (C) 2012 by Daniel Nicoletti <dantti12@gmail.com>           *
5
 
 *                                                                         *
6
 
 *   This program is free software; you can redistribute it and/or modify  *
7
 
 *   it under the terms of the GNU General Public License as published by  *
8
 
 *   the Free Software Foundation; either version 2 of the License, or     *
9
 
 *   (at your option) any later version.                                   *
10
 
 *                                                                         *
11
 
 *   This program is distributed in the hope that it will be useful,       *
12
 
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
13
 
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
14
 
 *   GNU General Public License for more details.                          *
15
 
 *                                                                         *
16
 
 *   You should have received a copy of the GNU General Public License     *
17
 
 *   along with this program; if not, write to the                         *
18
 
 *   Free Software Foundation, Inc.,                                       *
19
 
 *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA .        *
20
 
 ***************************************************************************/
21
 
 
22
 
#ifndef UPDATERAPPLET_H
23
 
#define UPDATERAPPLET_H
24
 
 
25
 
#include <Plasma/PopupApplet>
26
 
 
27
 
namespace Plasma
28
 
{
29
 
    class DeclarativeWidget;
30
 
}
31
 
 
32
 
class PackageModel;
33
 
class DBusUpdaterInterface;
34
 
class UpdaterApplet : public Plasma::PopupApplet
35
 
{
36
 
    Q_OBJECT
37
 
public:
38
 
    UpdaterApplet(QObject *parent, const QVariantList &args);
39
 
    ~UpdaterApplet();
40
 
 
41
 
    void init();
42
 
    virtual QList<QAction*> contextualActions();
43
 
    QGraphicsWidget *graphicsWidget();
44
 
 
45
 
signals:
46
 
    void getUpdates();
47
 
    void checkForNewUpdates();
48
 
    void reviewUpdates();
49
 
    void installUpdates();
50
 
 
51
 
protected Q_SLOTS:
52
 
    void updateIcon();
53
 
    void toolTipAboutToShow();
54
 
    void setActive(bool active = true);
55
 
    uint getTimeSinceLastRefresh();
56
 
 
57
 
protected:
58
 
    void constraintsEvent(Plasma::Constraints constraints);
59
 
    virtual void popupEvent(bool show);
60
 
 
61
 
private:
62
 
    QTimer *m_getUpdatesTimer;
63
 
    QList<QAction*> m_actions;
64
 
    Plasma::DeclarativeWidget *m_declarativeWidget;
65
 
    PackageModel *m_updatesModel;
66
 
    DBusUpdaterInterface *m_interface;
67
 
    bool m_initted;
68
 
};
69
 
 
70
 
K_EXPORT_PLASMA_APPLET(updater, UpdaterApplet)
71
 
 
72
 
#endif // UPDATERAPPLET_H