forked from ruphy/raptor
-
Notifications
You must be signed in to change notification settings - Fork 1
/
raptor.h
53 lines (40 loc) · 1.32 KB
/
raptor.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/* This file is part of the KDE project
Copyright (C) 2008 Lukas Appelhans <l.appelhans@gmx.de>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
*/
// Here we avoid loading the header multiple times
#ifndef RAPTOR_HEADER
#define RAPTOR_HEADER
// We need the Plasma Applet headers
#include <KIcon>
#include <Plasma/PopupApplet>
#include <Plasma/Svg>
class RaptorGraphicsWidget;
class QSizeF;
// Define our plasma Applet
class Raptor : public Plasma::PopupApplet
{
Q_OBJECT
public:
// Basic Create/Destroy
Raptor(QObject *parent, const QVariantList &args);
~Raptor();
// The paintInterface procedure paints the applet to screen
void paintInterface(QPainter *painter,
const QStyleOptionGraphicsItem *option,
const QRect& contentsRect);
void init();
QGraphicsWidget *graphicsWidget();
protected:
void setupView();
private:
Plasma::Svg m_svg;
KIcon m_icon;
RaptorGraphicsWidget *m_gwidget;
};
// This is the command that links your applet to the .desktop file
K_EXPORT_PLASMA_APPLET(raptor, Raptor)
#endif