summaryrefslogtreecommitdiff
path: root/examples/todayplugin/exampleplugin.cpp
Unidiff
Diffstat (limited to 'examples/todayplugin/exampleplugin.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--examples/todayplugin/exampleplugin.cpp17
1 files changed, 3 insertions, 14 deletions
diff --git a/examples/todayplugin/exampleplugin.cpp b/examples/todayplugin/exampleplugin.cpp
index e5d75df..94a5836 100644
--- a/examples/todayplugin/exampleplugin.cpp
+++ b/examples/todayplugin/exampleplugin.cpp
@@ -1,23 +1,12 @@
1/* 1/*
2 * exampleplugin.cpp 2 * exampleplugin.cpp
3 * 3 *
4 * copyright : (c) 2002,2003,2004 by Maximilian Reiß
5 * email : harlekin@handhelds.org 4 * email : harlekin@handhelds.org
6 * 5 *
7 */ 6 */
8/***************************************************************************
9 * *
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. *
14 * *
15 ***************************************************************************/
16
17
18#include "exampleplugin.h" 7#include "exampleplugin.h"
19 8
20ExamplePlugin::ExamplePlugin() { 9ExamplePlugin::ExamplePlugin() {
21 m_widget = 0l; 10 m_widget = 0l;
22} 11}
23 12
@@ -32,13 +21,13 @@ QString ExamplePlugin::pluginName() const {
32double ExamplePlugin::versionNumber() const { 21double ExamplePlugin::versionNumber() const {
33 return 0.1; 22 return 0.1;
34} 23}
35 24
36// this sets the image that will be shown on the left side of the plugin 25// this sets the image that will be shown on the left side of the plugin
37QString ExamplePlugin::pixmapNameWidget() const { 26QString ExamplePlugin::pixmapNameWidget() const {
38 return "Tux"; 27 return QString::fromLatin1("Tux");
39} 28}
40 29
41QWidget* ExamplePlugin::widget( QWidget * wid ) { 30QWidget* ExamplePlugin::widget( QWidget * wid ) {
42 if(!m_widget) { 31 if(!m_widget) {
43 m_widget = new ExamplePluginWidget( wid, "Example" ); 32 m_widget = new ExamplePluginWidget( wid, "Example" );
44 } 33 }
@@ -49,19 +38,19 @@ QWidget* ExamplePlugin::widget( QWidget * wid ) {
49// that would be the icon of the config widget in todays config view 38// that would be the icon of the config widget in todays config view
50QString ExamplePlugin::pixmapNameConfig() const { 39QString ExamplePlugin::pixmapNameConfig() const {
51 return 0l; 40 return 0l;
52} 41}
53 42
54// No config widget yet, look at the datebook plugin for an example of that 43// No config widget yet, look at the datebook plugin for an example of that
55TodayConfigWidget* ExamplePlugin::configWidget( QWidget* ) { 44TodayConfigWidget* ExamplePlugin::configWidget( QWidget* /*parent*/ ) {
56 return 0l; 45 return 0l;
57} 46}
58 47
59// add the binary name of the app to launch here 48// add the binary name of the app to launch here
60QString ExamplePlugin::appName() const { 49QString ExamplePlugin::appName() const {
61 return ""; 50 return QString::null;
62} 51}
63 52
64// if the plugin should be excluded form the refresh cycles that can be set in the today app 53// if the plugin should be excluded form the refresh cycles that can be set in the today app
65bool ExamplePlugin::excludeFromRefresh() const { 54bool ExamplePlugin::excludeFromRefresh() const {
66 return false; 55 return false;
67} 56}