summaryrefslogtreecommitdiff
path: root/examples/todayplugin
Side-by-side diff
Diffstat (limited to 'examples/todayplugin') (more/less context) (ignore whitespace changes)
-rw-r--r--examples/todayplugin/config.in2
-rw-r--r--examples/todayplugin/example.pro2
-rw-r--r--examples/todayplugin/exampleplugin.h4
-rw-r--r--examples/todayplugin/examplepluginimpl.h2
-rw-r--r--examples/todayplugin/examplepluginwidget.cpp3
-rw-r--r--examples/todayplugin/examplepluginwidget.h4
6 files changed, 9 insertions, 8 deletions
diff --git a/examples/todayplugin/config.in b/examples/todayplugin/config.in
index 53004cb..0a6a573 100644
--- a/examples/todayplugin/config.in
+++ b/examples/todayplugin/config.in
@@ -1,5 +1,5 @@
config TODAY_EXAMPLE
boolean "Opie-Today Plugin Example"
default "n"
- depends ( LIBQPE || LIBQPE-X11 ) && EXAMPLES && LIBOPIE
+ depends ( LIBQPE || LIBQPE-X11 ) && EXAMPLES && LIBOPIEUI2
diff --git a/examples/todayplugin/example.pro b/examples/todayplugin/example.pro
index 4c8c942..f4bca36 100644
--- a/examples/todayplugin/example.pro
+++ b/examples/todayplugin/example.pro
@@ -1,17 +1,17 @@
TEMPLATE = lib
CONFIG -= moc
CONFIG += qt release
# Input
HEADERS = exampleplugin.h examplepluginimpl.h examplepluginwidget.h
SOURCES = exampleplugin.cpp examplepluginimpl.cpp examplepluginwidget.cpp
INCLUDEPATH += $(OPIEDIR)/include
DEPENDPATH += $(OPIEDIR)/include
-LIBS+= -lqpe -lopie
+LIBS+= -lqpe -lopieui2
DESTDIR = $(OPIEDIR)/plugins/today
TARGET = todayexampleplugin
include ( $(OPIEDIR)/include.pro )
diff --git a/examples/todayplugin/exampleplugin.h b/examples/todayplugin/exampleplugin.h
index a1df923..94f5b37 100644
--- a/examples/todayplugin/exampleplugin.h
+++ b/examples/todayplugin/exampleplugin.h
@@ -1,42 +1,42 @@
/*
* exampleplugin.h
*
* email : harlekin@handhelds.org
*
*/
#ifndef EXAMPLE_PLUGIN_H
#define EXAMPLE_PLUGIN_H
#include <qwidget.h>
#include <qguardedptr.h>
-#include <opie/todayplugininterface.h>
-#include <opie/todayconfigwidget.h>
+#include <opie2/todayplugininterface.h>
+#include <opie2/todayconfigwidget.h>
#include "examplepluginwidget.h"
// implementation of the today plugin interface
class ExamplePlugin : public TodayPluginObject {
public:
ExamplePlugin();
~ExamplePlugin();
QString pluginName() const;
double versionNumber() const;
QString pixmapNameWidget() const;
QWidget* widget(QWidget *);
QString pixmapNameConfig() const;
TodayConfigWidget* configWidget(QWidget *);
QString appName() const;
bool excludeFromRefresh() const;
void refresh();
void reinitialize();
private:
QGuardedPtr<ExamplePluginWidget> m_widget;
};
#endif
diff --git a/examples/todayplugin/examplepluginimpl.h b/examples/todayplugin/examplepluginimpl.h
index 77ec4f6..31f8907 100644
--- a/examples/todayplugin/examplepluginimpl.h
+++ b/examples/todayplugin/examplepluginimpl.h
@@ -1,30 +1,30 @@
/*
* examplepluginimpl.h
*
* email : harlekin@handhelds.org
*
*/
#ifndef EXAMPLE_PLUGIN_IMPL_H
#define EXAMPLE_PLUGIN_IMPL_H
-#include <opie/todayplugininterface.h>
+#include <opie2/todayplugininterface.h>
class ExamplePlugin;
class ExamplePluginImpl : public TodayPluginInterface{
public:
ExamplePluginImpl();
virtual ~ExamplePluginImpl();
QRESULT queryInterface( const QUuid &, QUnknownInterface** );
Q_REFCOUNT
virtual TodayPluginObject *guiPart();
private:
ExamplePlugin *examplePlugin;
};
#endif
diff --git a/examples/todayplugin/examplepluginwidget.cpp b/examples/todayplugin/examplepluginwidget.cpp
index d66a11a..10fd39a 100644
--- a/examples/todayplugin/examplepluginwidget.cpp
+++ b/examples/todayplugin/examplepluginwidget.cpp
@@ -1,62 +1,63 @@
/*
* examplepluginwidget.cpp
*
* email : harlekin@handhelds.org
*
*/
#include <qpe/config.h>
#include <qpe/qcopenvelope_qws.h>
#include "examplepluginwidget.h"
+
ExamplePluginWidget::ExamplePluginWidget( QWidget *parent, const char* name)
: QWidget(parent, name ) {
m_exampleLabel = 0l;
m_layout = 0l;
if ( m_exampleLabel ) {
delete m_exampleLabel;
}
// since here a OClickableLabel is used, the plugin part will be clickable, and the actions
// that should be triggered when clicked are defined in slotClicked()
// of course also normal widgets can be used.
- m_exampleLabel = new OClickableLabel( this );
+ m_exampleLabel = new Opie::Ui::OClickableLabel( this );
connect( m_exampleLabel, SIGNAL( clicked() ), this, SLOT( slotClicked() ) );
if ( m_layout ) {
delete m_layout;
}
m_layout = new QHBoxLayout( this );
m_layout->setAutoAdd( true );
readConfig();
getInfo();
}
ExamplePluginWidget::~ExamplePluginWidget() {
delete m_exampleLabel;
delete m_layout;
}
void ExamplePluginWidget::readConfig() {
// we dont have any config entries in this plugin
// normally this method is used after today config was used
}
void ExamplePluginWidget::refresh() {
}
void ExamplePluginWidget::getInfo() {
m_exampleLabel->setText( tr("Example text") );
}
void ExamplePluginWidget::slotClicked() {
getInfo();
}
diff --git a/examples/todayplugin/examplepluginwidget.h b/examples/todayplugin/examplepluginwidget.h
index eb3c660..70e717e 100644
--- a/examples/todayplugin/examplepluginwidget.h
+++ b/examples/todayplugin/examplepluginwidget.h
@@ -1,35 +1,35 @@
/*
* examplepluginwidget.h
*
* email : harlekin@handhelds.org
*
*/
#ifndef EXAMPLE_PLUGIN_WIDGET_H
#define EXAMPLE_PLUGIN_WIDGET_H
#include <qlayout.h>
-#include <opie/oclickablelabel.h>
+#include <opie2/oclickablelabel.h>
class ExamplePluginWidget : public QWidget {
Q_OBJECT
public:
ExamplePluginWidget( QWidget *parent, const char *name );
~ExamplePluginWidget();
void refresh();
private slots:
void slotClicked();
private:
- OClickableLabel* m_exampleLabel;
+ Opie::Ui::OClickableLabel* m_exampleLabel;
QHBoxLayout* m_layout;
void readConfig();
void getInfo();
};
#endif