Diffstat (limited to 'core/pim/today/plugins/todolist') (more/less context) (show whitespace changes)
-rw-r--r-- | core/pim/today/plugins/todolist/todolist.pro | 2 | ||||
-rw-r--r-- | core/pim/today/plugins/todolist/todoplugin.cpp | 5 | ||||
-rw-r--r-- | core/pim/today/plugins/todolist/todoplugin.h | 13 | ||||
-rw-r--r-- | core/pim/today/plugins/todolist/todopluginconfig.h | 6 | ||||
-rw-r--r-- | core/pim/today/plugins/todolist/todopluginimpl.cpp | 2 | ||||
-rw-r--r-- | core/pim/today/plugins/todolist/todopluginimpl.h | 4 | ||||
-rw-r--r-- | core/pim/today/plugins/todolist/todopluginwidget.cpp | 2 | ||||
-rw-r--r-- | core/pim/today/plugins/todolist/todopluginwidget.h | 11 |
8 files changed, 23 insertions, 22 deletions
diff --git a/core/pim/today/plugins/todolist/todolist.pro b/core/pim/today/plugins/todolist/todolist.pro index 095247f..8f2f898 100644 --- a/core/pim/today/plugins/todolist/todolist.pro +++ b/core/pim/today/plugins/todolist/todolist.pro @@ -1,41 +1,41 @@ TEMPLATE = lib CONFIG -= moc CONFIG += qt plugin release # Input HEADERS = todoplugin.h todopluginimpl.h todopluginconfig.h \ todopluginwidget.h SOURCES = todoplugin.cpp todopluginimpl.cpp todopluginconfig.cpp \ todopluginwidget.cpp INTERFACES= todopluginconfigbase.ui INCLUDEPATH += $(OPIEDIR)/include \ ../ ../library DEPENDPATH += $(OPIEDIR)/include \ ../ ../library -LIBS+= -lqpe -lopie +LIBS+= -lqpe -lopiecore2 -lopieui2 -lopiepim2 DESTDIR = $(OPIEDIR)/plugins/today TARGET = todaytodolistplugin TRANSLATIONS = ../../../../../i18n/de/libtodaytodolistplugin.ts \ ../../../../../i18n/nl/libtodaytodolistplugin.ts \ ../../../../../i18n/xx/libtodaytodolistplugin.ts \ ../../../../../i18n/en/libtodaytodolistplugin.ts \ ../../../../../i18n/es/libtodaytodolistplugin.ts \ ../../../../../i18n/fr/libtodaytodolistplugin.ts \ ../../../../../i18n/hu/libtodaytodolistplugin.ts \ ../../../../../i18n/ja/libtodaytodolistplugin.ts \ ../../../../../i18n/ko/libtodaytodolistplugin.ts \ ../../../../../i18n/no/libtodaytodolistplugin.ts \ ../../../../../i18n/pl/libtodaytodolistplugin.ts \ ../../../../../i18n/pt/libtodaytodolistplugin.ts \ ../../../../../i18n/pt_BR/libtodaytodolistplugin.ts \ ../../../../../i18n/sl/libtodaytodolistplugin.ts \ ../../../../../i18n/zh_CN/libtodaytodolistplugin.ts \ ../../../../../i18n/zh_TW/libtodaytodolistplugin.ts \ ../../../../../i18n/it/libtodaytodolistplugin.ts \ ../../../../../i18n/da/libtodaytodolistplugin.ts include ( $(OPIEDIR)/include.pro ) diff --git a/core/pim/today/plugins/todolist/todoplugin.cpp b/core/pim/today/plugins/todolist/todoplugin.cpp index 801de9d..5783814 100644 --- a/core/pim/today/plugins/todolist/todoplugin.cpp +++ b/core/pim/today/plugins/todolist/todoplugin.cpp @@ -1,70 +1,67 @@ /* * todoplugin.cpp * - * copyright : (c) 2002,2003 by Maximilian Reiß + * copyright : (c) 2002,2003, 2004 by Maximilian Reiß * email : harlekin@handhelds.org * */ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ - - #include "todoplugin.h" #include "todopluginconfig.h" - TodolistPlugin::TodolistPlugin() { } TodolistPlugin::~TodolistPlugin() { delete (TodolistPluginWidget*)m_widget; } QString TodolistPlugin::pluginName() const { return QObject::tr( "Todolist plugin" ); } double TodolistPlugin::versionNumber() const { return 0.9; } QString TodolistPlugin::pixmapNameWidget() const { return "todo/TodoList"; } QWidget* TodolistPlugin::widget( QWidget *wid ) { if(!m_widget) { m_widget = new TodolistPluginWidget( wid, "Todolist" ); } return m_widget; } QString TodolistPlugin::pixmapNameConfig() const { return "todo/TodoList"; } TodayConfigWidget* TodolistPlugin::configWidget( QWidget* wid ) { return new TodolistPluginConfig( wid , "Todolist" ); } QString TodolistPlugin::appName() const { return "todolist"; } bool TodolistPlugin::excludeFromRefresh() const { return false; } void TodolistPlugin::refresh() { if ( m_widget ) { m_widget->refresh(); } } diff --git a/core/pim/today/plugins/todolist/todoplugin.h b/core/pim/today/plugins/todolist/todoplugin.h index f68162f..bea15d5 100644 --- a/core/pim/today/plugins/todolist/todoplugin.h +++ b/core/pim/today/plugins/todolist/todoplugin.h @@ -1,50 +1,53 @@ /* * todoplugin.h * - * copyright : (c) 2002 by Maximilian Reiß + * copyright : (c) 2002,2003, 2004 by Maximilian Reiß * email : harlekin@handhelds.org * */ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef TODOLIST_PLUGIN_H #define TODOLIST_PLUGIN_H + +#include "todopluginwidget.h" + +#include <opie2/oclickablelabel.h> +#include <opie2/todayplugininterface.h> + #include <qstring.h> #include <qguardedptr.h> #include <qwidget.h> -#include <opie/oclickablelabel.h> -#include <opie/todayplugininterface.h> - -#include "todopluginwidget.h" +using namespace Opie; class TodolistPlugin : public TodayPluginObject { public: TodolistPlugin(); ~TodolistPlugin(); 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<TodolistPluginWidget> m_widget; }; #endif diff --git a/core/pim/today/plugins/todolist/todopluginconfig.h b/core/pim/today/plugins/todolist/todopluginconfig.h index a2d7d2c..7040369 100644 --- a/core/pim/today/plugins/todolist/todopluginconfig.h +++ b/core/pim/today/plugins/todolist/todopluginconfig.h @@ -1,58 +1,58 @@ /* * todopluginconfig.h * * copyright : (c) 2002, 2003 by Maximilian Reiß * email : harlekin@handhelds.org * */ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef TODOLIST_PLUGIN_CONFIG_H #define TODOLIST_PLUGIN_CONFIG_H -#include <qspinbox.h> +#include "todopluginconfigbase.h" -#include <opie/todayconfigwidget.h> +#include <opie2/todayconfigwidget.h> -#include "todopluginconfigbase.h" +#include <qspinbox.h> class TodolistPluginConfig : public TodayConfigWidget { Q_OBJECT public: TodolistPluginConfig( QWidget *parent, const char *name ); ~TodolistPluginConfig(); private: /** * if changed then save */ bool changed(); void readConfig(); void writeConfig(); TodoPluginConfigBase *m_gui; // how many lines should be showed in the todolist section int m_max_lines_task; // clip the lines after X chars int m_maxCharClip; }; #endif diff --git a/core/pim/today/plugins/todolist/todopluginimpl.cpp b/core/pim/today/plugins/todolist/todopluginimpl.cpp index 639587f..1a6189f 100644 --- a/core/pim/today/plugins/todolist/todopluginimpl.cpp +++ b/core/pim/today/plugins/todolist/todopluginimpl.cpp @@ -1,46 +1,46 @@ /* * todopluginimpl.cpp * - * copyright : (c) 2002 by Maximilian Reiß + * copyright : (c) 2002, 2003, 2004 by Maximilian Reiß * email : harlekin@handhelds.org * */ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "todoplugin.h" #include "todopluginimpl.h" TodolistPluginImpl::TodolistPluginImpl() { todolistPlugin = new TodolistPlugin(); } TodolistPluginImpl::~TodolistPluginImpl() { delete todolistPlugin; } TodayPluginObject* TodolistPluginImpl::guiPart() { return todolistPlugin; } QRESULT TodolistPluginImpl::queryInterface( const QUuid & uuid, QUnknownInterface **iface ) { *iface = 0; if ( ( uuid == IID_QUnknown ) || ( uuid == IID_TodayPluginInterface ) ) { *iface = this, (*iface)->addRef(); }else return QS_FALSE; return QS_OK; } Q_EXPORT_INTERFACE() { Q_CREATE_INSTANCE( TodolistPluginImpl ); } diff --git a/core/pim/today/plugins/todolist/todopluginimpl.h b/core/pim/today/plugins/todolist/todopluginimpl.h index ca62fdb..f9b0b37 100644 --- a/core/pim/today/plugins/todolist/todopluginimpl.h +++ b/core/pim/today/plugins/todolist/todopluginimpl.h @@ -1,39 +1,39 @@ /* * todopluginimpl.h * - * copyright : (c) 2002 by Maximilian Reiß + * copyright : (c) 2002, 2003, 2004 by Maximilian Reiß * email : harlekin@handhelds.org * */ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef TODOLIST_PLUGIN_IMPL_H #define TODOLIST_PLUGIN_IMPL_H -#include <opie/todayplugininterface.h> +#include <opie2/todayplugininterface.h> class TodolistPlugin; class TodolistPluginImpl : public TodayPluginInterface{ public: TodolistPluginImpl(); virtual ~TodolistPluginImpl(); QRESULT queryInterface( const QUuid &, QUnknownInterface** ); Q_REFCOUNT virtual TodayPluginObject *guiPart(); private: TodolistPlugin *todolistPlugin; }; #endif diff --git a/core/pim/today/plugins/todolist/todopluginwidget.cpp b/core/pim/today/plugins/todolist/todopluginwidget.cpp index 0364f94..567c70f 100644 --- a/core/pim/today/plugins/todolist/todopluginwidget.cpp +++ b/core/pim/today/plugins/todolist/todopluginwidget.cpp @@ -1,80 +1,80 @@ /* * todopluginwidget.cpp * * copyright : (c) 2002, 2003 by Maximilian Reiß * email : harlekin@handhelds.org * */ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "todopluginwidget.h" #include <qpe/config.h> #include <qpe/qcopenvelope_qws.h> TodolistPluginWidget::TodolistPluginWidget( QWidget *parent, const char* name ) : QWidget( parent, name ) { todo = 0l; layoutTodo = 0l; todoLabel = 0l; if ( todo ) { delete todo; } - todo = new OTodoAccess(); + todo = new OPimTodoAccess(); todo->load(); if ( layoutTodo ) { delete layoutTodo; } layoutTodo = new QVBoxLayout( this ); layoutTodo->setAutoAdd( true ); if ( todoLabel ) { delete todoLabel; } todoLabel = new OClickableLabel( this ); connect( todoLabel, SIGNAL( clicked() ), this, SLOT( startTodolist() ) ); readConfig(); getTodo(); } TodolistPluginWidget::~TodolistPluginWidget() { delete todo; delete todoLabel; delete layoutTodo; } void TodolistPluginWidget::readConfig() { Config cfg( "todaytodoplugin" ); cfg.setGroup( "config" ); m_maxLinesTask = cfg.readNumEntry( "maxlinestask", 5 ); m_maxCharClip = cfg.readNumEntry( "maxcharclip", 38 ); } void TodolistPluginWidget:: refresh() { todo->reload(); getTodo(); } void TodolistPluginWidget::reinitialize() { readConfig(); todo->reload(); getTodo(); } /** * Get the todos */ void TodolistPluginWidget::getTodo() { diff --git a/core/pim/today/plugins/todolist/todopluginwidget.h b/core/pim/today/plugins/todolist/todopluginwidget.h index 9cac43d..a020cf4 100644 --- a/core/pim/today/plugins/todolist/todopluginwidget.h +++ b/core/pim/today/plugins/todolist/todopluginwidget.h @@ -1,54 +1,55 @@ /* * todopluginwidget.h * * copyright : (c) 2002, 2003 by Maximilian Reiß * email : harlekin@handhelds.org * */ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #ifndef TODOLIST_PLUGIN_WIDGET_H #define TODOLIST_PLUGIN_WIDGET_H #include <qlayout.h> -#include <opie/otodoaccess.h> -#include <opie/oclickablelabel.h> +#include <opie2/otodoaccess.h> +#include <opie2/oclickablelabel.h> +using namespace Opie; class TodolistPluginWidget : public QWidget { Q_OBJECT public: TodolistPluginWidget( QWidget *parent, const char *name ); ~TodolistPluginWidget(); void refresh(); void reinitialize(); protected slots: void startTodolist(); private: OClickableLabel *todoLabel; QVBoxLayout* layoutTodo; - OTodoAccess *todo; - OTodoAccess::List m_list; - OTodoAccess::List::Iterator m_it; + OPimTodoAccess *todo; + OPimTodoAccess::List m_list; + OPimTodoAccess::List::Iterator m_it; void readConfig(); void getTodo(); int m_maxLinesTask; int m_maxCharClip; }; #endif |