~ubuntu-branches/ubuntu/precise/kalzium/precise

« back to all changes in this revision

Viewing changes to plasmoid/applet/didyouknow/didyouknow.h

  • Committer: Bazaar Package Importer
  • Author(s): Philip Muškovac
  • Date: 2011-07-03 12:28:58 UTC
  • Revision ID: james.westby@ubuntu.com-20110703122858-q1yyxncs89e4w0hs
Tags: upstream-4.6.90+repack
Import upstream version 4.6.90+repack

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef DIDYOUKNOW_H
 
2
#define DIDYOUKNOW_H
 
3
/***************************************************************************
 
4
    copyright            : (C) 2008 by Carsten Niehaus
 
5
    email                : cniehaus@kde.org
 
6
 ***************************************************************************/
 
7
/***************************************************************************
 
8
 *                                                                         *
 
9
 *   This program is free software; you can redistribute it and/or modify  *
 
10
 *   it under the terms of the GNU General Public License as published by  *
 
11
 *   the Free Software Foundation; either version 2 of the License, or     *
 
12
 *   (at your option) any later version.                                   *
 
13
 *                                                                         *
 
14
 ***************************************************************************/
 
15
 
 
16
#include <Plasma/Applet>
 
17
#include <Plasma/Svg>
 
18
 
 
19
#include <plasma/dataengine.h>
 
20
 
 
21
#include <QGraphicsTextItem>
 
22
 
 
23
#include <KRandomSequence>
 
24
 
 
25
class QSizeF;
 
26
 
 
27
class KalziumDidyouknow : public Plasma::Applet
 
28
{
 
29
    Q_OBJECT
 
30
 
 
31
    public:
 
32
        KalziumDidyouknow(QObject *parent, const QVariantList &args);
 
33
        ~KalziumDidyouknow();
 
34
        void init();
 
35
 
 
36
        void paintInterface(QPainter *painter,
 
37
                            const QStyleOptionGraphicsItem *option,
 
38
                            const QRect& contentsRect);
 
39
        void constraintsUpdated(Plasma::Constraints constraints);
 
40
 
 
41
    public slots:
 
42
        void dataUpdated(const QString &name, const Plasma::DataEngine::Data &data);
 
43
 
 
44
    private:
 
45
        Plasma::Svg m_theme;
 
46
        QGraphicsTextItem *m_label1;
 
47
        Plasma::DataEngine* m_engine;
 
48
    
 
49
        KRandomSequence * m_random;
 
50
        
 
51
        QSizeF m_size;
 
52
};
 
53
 
 
54
K_EXPORT_PLASMA_APPLET(didyouknow_kalzium, KalziumDidyouknow)
 
55
 
 
56
#endif // DIDYOUKNOW_H