00001 /* 00002 * exampleplugin.cpp 00003 * 00004 * email : harlekin@handhelds.org 00005 * 00006 */ 00007 #include "exampleplugin.h" 00008 00009 ExamplePlugin::ExamplePlugin() 00010 : m_widget(0l) 00011 { 00012 } 00013 00014 ExamplePlugin::~ExamplePlugin() { 00015 } 00016 00017 QString ExamplePlugin::pluginName() const { 00018 return QObject::tr( "Example plugin" ); 00019 } 00020 00021 double ExamplePlugin::versionNumber() const { 00022 return 0.1; 00023 } 00024 00025 // this sets the image that will be shown on the left side of the plugin 00026 QString ExamplePlugin::pixmapNameWidget() const { 00027 return QString::fromLatin1("Tux"); 00028 } 00029 00030 QWidget* ExamplePlugin::widget( QWidget * wid ) { 00031 m_widget = new ExamplePluginWidget( wid, "Example" ); 00032 return m_widget; 00033 } 00034 00035 00036 // that would be the icon of the config widget in todays config view 00037 QString ExamplePlugin::pixmapNameConfig() const { 00038 return 0l; 00039 } 00040 00041 // No config widget yet, look at the datebook plugin for an example of that 00042 TodayConfigWidget* ExamplePlugin::configWidget( QWidget* /*parent*/ ) { 00043 return 0l; 00044 } 00045 00046 // add the binary name of the app to launch here 00047 QString ExamplePlugin::appName() const { 00048 return QString::null; 00049 } 00050 00051 // if the plugin should be excluded form the refresh cycles that can be set in the today app 00052 bool ExamplePlugin::excludeFromRefresh() const { 00053 return false; 00054 } 00055 00056 void ExamplePlugin::refresh() { 00057 if ( m_widget ) { 00058 m_widget->refresh(); 00059 } 00060 } 00061 00062 void ExamplePlugin::reinitialize() { 00063 }
1.4.2