Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

examplepluginwidget.cpp

Go to the documentation of this file.
00001 /*
00002  * examplepluginwidget.cpp
00003  *
00004  * email       : harlekin@handhelds.org
00005  *
00006  */
00007 
00008 #include <qpe/config.h>
00009 #include <qpe/qcopenvelope_qws.h>
00010 
00011 #include "examplepluginwidget.h"
00012 
00013 
00014 ExamplePluginWidget::ExamplePluginWidget( QWidget *parent,  const char* name)
00015     : QWidget(parent,  name ) {
00016 
00017     m_exampleLabel = 0l;
00018     m_layout = 0l;
00019 
00020     if ( m_exampleLabel )  {
00021         delete m_exampleLabel;
00022     }
00023 
00024    // since here a OClickableLabel is used, the plugin part will be clickable, and the actions
00025    // that should be triggered when clicked are defined in  slotClicked()
00026    // of course also normal widgets can be used.
00027     m_exampleLabel = new Opie::Ui::OClickableLabel( this );
00028     connect( m_exampleLabel, SIGNAL( clicked() ), this, SLOT( slotClicked() ) );
00029 
00030     if ( m_layout )  {
00031         delete m_layout;
00032     }
00033     m_layout = new QHBoxLayout( this );
00034     m_layout->setAutoAdd( true );
00035 
00036     readConfig();
00037     getInfo();
00038 }
00039 
00040 
00041 ExamplePluginWidget::~ExamplePluginWidget() {
00042     delete m_exampleLabel;
00043     delete m_layout;
00044 }
00045 
00046 
00047 void ExamplePluginWidget::readConfig() {
00048 // we dont have any config entries in this plugin
00049 // normally this method is used after today config was used
00050 }
00051 
00052 
00053 void ExamplePluginWidget::refresh()  {
00054 
00055 }
00056 
00057 void ExamplePluginWidget::getInfo() {
00058     m_exampleLabel->setText(  tr("Example text")  );
00059 }
00060 
00061 void ExamplePluginWidget::slotClicked() {
00062    getInfo();
00063 }

Generated on Sat Nov 5 16:15:59 2005 for OPIE by  doxygen 1.4.2