summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--examples/applet/simpleimpl.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/applet/simpleimpl.cpp b/examples/applet/simpleimpl.cpp
index 62d9bf7..ff651ca 100644
--- a/examples/applet/simpleimpl.cpp
+++ b/examples/applet/simpleimpl.cpp
@@ -42,49 +42,50 @@ SimpleApplet::SimpleApplet(QWidget *parent)
42 42
43 /* 43 /*
44 * Now we will say that we don't want to be bigger than our 44 * Now we will say that we don't want to be bigger than our
45 * Pixmap 45 * Pixmap
46 */ 46 */
47 setFixedHeight(AppLnk::smallIconSize() ); 47 setFixedHeight(AppLnk::smallIconSize() );
48 setFixedWidth( AppLnk::smallIconSize() ); 48 setFixedWidth( AppLnk::smallIconSize() );
49 49
50} 50}
51 51
52SimpleApplet::~SimpleApplet() { 52SimpleApplet::~SimpleApplet() {
53 delete m_pix; 53 delete m_pix;
54} 54}
55 55
56 56
57/* 57/*
58 * here you would normal show or do something 58 * here you would normal show or do something
59 * useful. If you want to show a widget at the top left 59 * useful. If you want to show a widget at the top left
60 * of your icon you need to map your rect().topLeft() to 60 * of your icon you need to map your rect().topLeft() to
61 * global with mapToGlobal(). Then you might also need to 61 * global with mapToGlobal(). Then you might also need to
62 * move the widgets so it is visible 62 * move the widgets so it is visible
63 */ 63 */
64void SimpleApplet::mousePressEvent(QMouseEvent* ) { 64void SimpleApplet::mousePressEvent(QMouseEvent* ) {
65 QMessageBox::information(this, tr("No action taken"), 65 QMessageBox::information(this, tr("No action taken"),
66 tr("<qt>This Plugin does not yet support anything usefule aye.</qt>"), 66 tr("<qt>This Plugin does not yet support anything usefule aye.</qt>"),
67 QMessageBox::Ok ); 67 QMessageBox::Ok );
68 68
69} 69}
70 70
71void SimpleApplet::paintEvent( QPaintEvent* ) { 71void SimpleApplet::paintEvent( QPaintEvent* ) {
72 QPainter p(this); 72 QPainter p(this);
73 73
74 /* simpy draw the pixmap from the start of this widget */ 74 /* simpy draw the pixmap from the start of this widget */
75 p.drawPixmap(0, 0, *m_pix ); 75 p.drawPixmap(0, 0, *m_pix );
76} 76}
77 77
78/* 78/*
79 * We need to add this symbol for the plugin exporter! 79 * We need to add this symbol for the plugin exporter!
80 */ 80 */
81int SimpleApplet::position(){ 81int SimpleApplet::position(){
82 return 1; 82 return 1;
83} 83}
84 84
85 85
86 86
87/* 87/*
88 * Here comes the implementation of the interface 88 * Here comes the implementation of the interface
89 */ 89 */
90EXPORT_OPIE_APPLET_v1( SimpleApplet ) \ No newline at end of file 90EXPORT_OPIE_APPLET_v1( SimpleApplet )
91