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.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/examples/todayplugin/exampleplugin.cpp b/examples/todayplugin/exampleplugin.cpp
index 94a5836..41bbfe2 100644
--- a/examples/todayplugin/exampleplugin.cpp
+++ b/examples/todayplugin/exampleplugin.cpp
@@ -3,18 +3,18 @@
3 * 3 *
4 * email : harlekin@handhelds.org 4 * email : harlekin@handhelds.org
5 * 5 *
6 */ 6 */
7#include "exampleplugin.h" 7#include "exampleplugin.h"
8 8
9ExamplePlugin::ExamplePlugin() { 9ExamplePlugin::ExamplePlugin()
10 m_widget = 0l; 10 : m_widget(0l)
11{
11} 12}
12 13
13ExamplePlugin::~ExamplePlugin() { 14ExamplePlugin::~ExamplePlugin() {
14 delete (ExamplePluginWidget*)m_widget;
15} 15}
16 16
17QString ExamplePlugin::pluginName() const { 17QString ExamplePlugin::pluginName() const {
18 return QObject::tr( "Example plugin" ); 18 return QObject::tr( "Example plugin" );
19} 19}
20 20
@@ -25,15 +25,13 @@ double ExamplePlugin::versionNumber() const {
25// 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
26QString ExamplePlugin::pixmapNameWidget() const { 26QString ExamplePlugin::pixmapNameWidget() const {
27 return QString::fromLatin1("Tux"); 27 return QString::fromLatin1("Tux");
28} 28}
29 29
30QWidget* ExamplePlugin::widget( QWidget * wid ) { 30QWidget* ExamplePlugin::widget( QWidget * wid ) {
31 if(!m_widget) { 31 m_widget = new ExamplePluginWidget( wid, "Example" );
32 m_widget = new ExamplePluginWidget( wid, "Example" );
33 }
34 return m_widget; 32 return m_widget;
35} 33}
36 34
37 35
38// that would be the icon of the config widget in todays config view 36// that would be the icon of the config widget in todays config view
39QString ExamplePlugin::pixmapNameConfig() const { 37QString ExamplePlugin::pixmapNameConfig() const {