summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/today/main.cpp5
-rw-r--r--core/pim/today/plugins/datebook/datebook.pro2
-rw-r--r--core/pim/today/plugins/datebook/datebookevent.cpp5
-rw-r--r--core/pim/today/plugins/datebook/datebookevent.h6
-rw-r--r--core/pim/today/plugins/datebook/datebookplugin.cpp5
-rw-r--r--core/pim/today/plugins/datebook/datebookplugin.h8
-rw-r--r--core/pim/today/plugins/datebook/datebookpluginconfig.cpp2
-rw-r--r--core/pim/today/plugins/datebook/datebookpluginconfig.h9
-rw-r--r--core/pim/today/plugins/datebook/datebookpluginimpl.cpp4
-rw-r--r--core/pim/today/plugins/datebook/datebookpluginimpl.h4
-rw-r--r--core/pim/today/plugins/datebook/datebookpluginwidget.cpp14
-rw-r--r--core/pim/today/plugins/datebook/datebookpluginwidget.h11
-rw-r--r--core/pim/today/plugins/mail/mail.pro2
-rw-r--r--core/pim/today/plugins/mail/mailplugin.h9
-rw-r--r--core/pim/today/plugins/mail/mailpluginimpl.cpp4
-rw-r--r--core/pim/today/plugins/mail/mailpluginimpl.h4
-rw-r--r--core/pim/today/plugins/mail/mailpluginwidget.cpp3
-rw-r--r--core/pim/today/plugins/mail/mailpluginwidget.h4
-rw-r--r--core/pim/today/plugins/todolist/todolist.pro2
-rw-r--r--core/pim/today/plugins/todolist/todoplugin.cpp5
-rw-r--r--core/pim/today/plugins/todolist/todoplugin.h13
-rw-r--r--core/pim/today/plugins/todolist/todopluginconfig.h6
-rw-r--r--core/pim/today/plugins/todolist/todopluginimpl.cpp4
-rw-r--r--core/pim/today/plugins/todolist/todopluginimpl.h4
-rw-r--r--core/pim/today/plugins/todolist/todopluginwidget.cpp2
-rw-r--r--core/pim/today/plugins/todolist/todopluginwidget.h11
-rw-r--r--core/pim/today/today.cpp4
-rw-r--r--core/pim/today/today.h20
-rw-r--r--core/pim/today/today.pro3
-rw-r--r--core/pim/today/todaybase.cpp7
-rw-r--r--core/pim/today/todaybase.h13
-rw-r--r--core/pim/today/todayconfig.cpp2
-rw-r--r--core/pim/today/todayconfig.h10
33 files changed, 109 insertions, 98 deletions
diff --git a/core/pim/today/main.cpp b/core/pim/today/main.cpp
index d4ec3ce..974c050 100644
--- a/core/pim/today/main.cpp
+++ b/core/pim/today/main.cpp
@@ -1,23 +1,24 @@
/*
* main.cpp
*
* ---------------------
*
* begin : Sun 10 17:20:00 CEST 2002
- * copyright : (c) 2002 by Maximilian Reiß
+ * copyright : (c) 2002, 2003, 2004 by Maximilian Reiß
* email : max.reiss@gmx.de
*
*/
/***************************************************************************
* *
* 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 "today.h"
-#include <opie/oapplicationfactory.h>
+
+#include <opie2/oapplicationfactory.h>
OPIE_EXPORT_APP( OApplicationFactory<Today> )
diff --git a/core/pim/today/plugins/datebook/datebook.pro b/core/pim/today/plugins/datebook/datebook.pro
index 413aa47..798c981 100644
--- a/core/pim/today/plugins/datebook/datebook.pro
+++ b/core/pim/today/plugins/datebook/datebook.pro
@@ -1,40 +1,40 @@
TEMPLATE = lib
CONFIG -= moc
CONFIG += qt plugin release
# Input
HEADERS = datebookplugin.h datebookpluginimpl.h datebookpluginconfig.h \
datebookevent.h datebookpluginwidget.h
SOURCES = datebookplugin.cpp datebookpluginimpl.cpp datebookpluginconfig.cpp \
datebookevent.cpp datebookpluginwidget.cpp
INTERFACES = datebookpluginconfigbase.ui
INCLUDEPATH += $(OPIEDIR)/include \
../ ../library
DEPENDPATH += $(OPIEDIR)/include \
../ ../library
-LIBS+= -lqpe -lopie
+LIBS+= -lqpe -lopiecore2 -lopieui2 -lopiepim2
DESTDIR = $(OPIEDIR)/plugins/today
TARGET = todaydatebookplugin
TRANSLATIONS = ../../../../../i18n/de/libtodaydatebookplugin.ts \
../../../../../i18n/nl/libtodaydatebookplugin.ts \
../../../../../i18n/xx/libtodaydatebookplugin.ts \
../../../../../i18n/en/libtodaydatebookplugin.ts \
../../../../../i18n/es/libtodaydatebookplugin.ts \
../../../../../i18n/fr/libtodaydatebookplugin.ts \
../../../../../i18n/hu/libtodaydatebookplugin.ts \
../../../../../i18n/ja/libtodaydatebookplugin.ts \
../../../../../i18n/ko/libtodaydatebookplugin.ts \
../../../../../i18n/no/libtodaydatebookplugin.ts \
../../../../../i18n/pl/libtodaydatebookplugin.ts \
../../../../../i18n/pt/libtodaydatebookplugin.ts \
../../../../../i18n/pt_BR/libtodaydatebookplugin.ts \
../../../../../i18n/sl/libtodaydatebookplugin.ts \
../../../../../i18n/zh_CN/libtodaydatebookplugin.ts \
../../../../../i18n/zh_TW/libtodaydatebookplugin.ts \
../../../../../i18n/it/libtodaydatebookplugin.ts \
../../../../../i18n/da/libtodaydatebookplugin.ts
include ( $(OPIEDIR)/include.pro )
diff --git a/core/pim/today/plugins/datebook/datebookevent.cpp b/core/pim/today/plugins/datebook/datebookevent.cpp
index e19a690..9a820f2 100644
--- a/core/pim/today/plugins/datebook/datebookevent.cpp
+++ b/core/pim/today/plugins/datebook/datebookevent.cpp
@@ -1,70 +1,71 @@
/*
* datebookevent.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 "datebookevent.h"
+
#include <qpe/config.h>
#include <qpe/qcopenvelope_qws.h>
#include <qpe/calendar.h>
-#include <opie/odevice.h>
+#include <opie2/odevice.h>
using namespace Opie;
DateBookEvent::DateBookEvent(const EffectiveEvent &ev,
QWidget* parent,
bool show_location,
bool show_notes,
bool timeExtraLine,
int maxCharClip,
const char* name,
WFlags fl) :
OClickableLabel(parent,name,fl), event(ev) {
// setAlignment( AlignTop );
QString msg;
Config config( "qpe" );
config.setGroup( "Time" );
// if 24 h format
ampm = config.readBoolEntry( "AMPM", TRUE );
msg += "<B>" + (ev).description() + "</B>";
if ( (ev).event().hasAlarm() ) {
msg += " <b>" + tr("[with alarm]") +"</b>";
}
// include location or not
if ( show_location ) {
msg += "<BR><i>" + (ev).location() + "</i>";
}
QString timeSpacer = " ";
if ( timeExtraLine ) {
timeSpacer = "<br>";
}
if ( ( TimeString::timeString( QTime( (ev).event().start().time() ) ) == "00:00" )
&& ( TimeString::timeString( QTime( (ev).event().end().time() ) ) == "23:59" ) ) {
msg += tr ( "All day" );
} else {
// start time of event
// QDate tempDate = (ev).event().start().date();
msg += timeSpacer;
msg += ampmTime( QTime( (ev).event().start().time() ) )
// end time of event
+ "<b> - </b>" + ampmTime( QTime( (ev).event().end().time() ) );
}
diff --git a/core/pim/today/plugins/datebook/datebookevent.h b/core/pim/today/plugins/datebook/datebookevent.h
index 1a090e3..e2ee077 100644
--- a/core/pim/today/plugins/datebook/datebookevent.h
+++ b/core/pim/today/plugins/datebook/datebookevent.h
@@ -1,54 +1,56 @@
/*
* datebookplugin.h
*
- * 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. *
* *
***************************************************************************/
#ifndef DATEBOOKEVENT_PLUGIN_H
#define DATEBOOKEVENT_PLUGIN_H
-#include <opie/oclickablelabel.h>
+#include <opie2/oclickablelabel.h>
+
#include <qpe/datebookdb.h>
+using namespace Opie;
class DateBookEvent: public OClickableLabel {
Q_OBJECT
public:
DateBookEvent( const EffectiveEvent &ev,
QWidget* parent = 0,
bool show_location = 0,
bool show_notes = 0,
bool timeExtraLine = 0,
int maxCharClip = 0,
const char* name = 0,
WFlags fl = 0 );
~DateBookEvent();
signals:
void editEvent( const Event &e );
private slots:
void editEventSlot( const Event &e );
void editMe();
private:
QString ampmTime( QTime );
QString differDate( QDate date );
const EffectiveEvent event;
bool ampm;
};
#endif
diff --git a/core/pim/today/plugins/datebook/datebookplugin.cpp b/core/pim/today/plugins/datebook/datebookplugin.cpp
index 8dfa52f..f46806f 100644
--- a/core/pim/today/plugins/datebook/datebookplugin.cpp
+++ b/core/pim/today/plugins/datebook/datebookplugin.cpp
@@ -1,67 +1,64 @@
-
/*
* datebookplugin.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 "datebookplugin.h"
#include "datebookpluginconfig.h"
DatebookPlugin::DatebookPlugin() {
}
DatebookPlugin::~DatebookPlugin() {
delete (DatebookPluginWidget*)m_widget;
}
QString DatebookPlugin::pluginName() const {
return QObject::tr( "Datebook plugin");
}
double DatebookPlugin::versionNumber() const {
return 1.0;
}
QString DatebookPlugin::pixmapNameWidget() const {
return "datebook/DateBook";
}
QWidget* DatebookPlugin::widget( QWidget* wid ) {
if(!m_widget) {
m_widget = new DatebookPluginWidget( wid, "Datebook" );
}
return m_widget;
}
QString DatebookPlugin::pixmapNameConfig() const {
return "datebook/DateBook";
}
TodayConfigWidget* DatebookPlugin::configWidget( QWidget* wid ) {
return new DatebookPluginConfig( wid , "Datebook" );
}
QString DatebookPlugin::appName() const {
return "datebook";
}
bool DatebookPlugin::excludeFromRefresh() const {
return false;
}
void DatebookPlugin::refresh() {
if ( m_widget ) {
diff --git a/core/pim/today/plugins/datebook/datebookplugin.h b/core/pim/today/plugins/datebook/datebookplugin.h
index 890c59b..631d6a3 100644
--- a/core/pim/today/plugins/datebook/datebookplugin.h
+++ b/core/pim/today/plugins/datebook/datebookplugin.h
@@ -1,49 +1,49 @@
/*
* datebookplugin.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 DATEBOOK_PLUGIN_H
#define DATEBOOK_PLUGIN_H
-#include <qguardedptr.h>
+#include "datebookpluginwidget.h"
-#include <opie/oclickablelabel.h>
-#include <opie/todayplugininterface.h>
+#include <opie2/oclickablelabel.h>
+#include <opie2/todayplugininterface.h>
-#include "datebookpluginwidget.h"
+#include <qguardedptr.h>
class DatebookPlugin : public TodayPluginObject {
public:
DatebookPlugin();
~DatebookPlugin();
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<DatebookPluginWidget> m_widget;
};
#endif
diff --git a/core/pim/today/plugins/datebook/datebookpluginconfig.cpp b/core/pim/today/plugins/datebook/datebookpluginconfig.cpp
index 8ead40d..5fd5221 100644
--- a/core/pim/today/plugins/datebook/datebookpluginconfig.cpp
+++ b/core/pim/today/plugins/datebook/datebookpluginconfig.cpp
@@ -1,52 +1,52 @@
/*
* datebookpluginconfig.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 "datebookpluginconfig.h"
#include <qpe/config.h>
#include <qlayout.h>
DatebookPluginConfig::DatebookPluginConfig( QWidget* parent, const char* name)
: TodayConfigWidget( parent, name ) {
QVBoxLayout *layout = new QVBoxLayout( this );
m_gui = new DatebookPluginConfigBase( this );
layout->addWidget( m_gui );
readConfig();
}
void DatebookPluginConfig::readConfig() {
Config cfg( "todaydatebookplugin" );
cfg.setGroup( "config" );
m_max_lines_meet = cfg.readNumEntry( "maxlinesmeet", 5 );
m_gui->SpinBox1->setValue( m_max_lines_meet );
m_show_location = cfg.readNumEntry( "showlocation", 1 );
m_gui->CheckBox1->setChecked( m_show_location );
m_show_notes = cfg.readNumEntry( "shownotes", 0 );
m_gui->CheckBox2->setChecked( m_show_notes );
m_only_later = cfg.readNumEntry( "onlylater", 1 );
m_gui->CheckBox4->setChecked( cfg.readNumEntry( "timeextraline", 1 ) );
m_gui->CheckBox3->setChecked( m_only_later );
m_more_days = cfg.readNumEntry( "moredays", 0 );
m_gui->SpinBox2->setValue( m_more_days );
}
diff --git a/core/pim/today/plugins/datebook/datebookpluginconfig.h b/core/pim/today/plugins/datebook/datebookpluginconfig.h
index 2d303fc..4f4e3f1 100644
--- a/core/pim/today/plugins/datebook/datebookpluginconfig.h
+++ b/core/pim/today/plugins/datebook/datebookpluginconfig.h
@@ -1,60 +1,63 @@
/*
* datebookpluginconfig.h
*
- * 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. *
* *
***************************************************************************/
#ifndef DATEBOOK_PLUGIN_CONFIG_H
#define DATEBOOK_PLUGIN_CONFIG_H
+#include "datebookpluginconfigbase.h"
+
+#include <opie2/todayconfigwidget.h>
#include <qcheckbox.h>
#include <qspinbox.h>
-#include <opie/todayconfigwidget.h>
-#include "datebookpluginconfigbase.h"
+
+
class DatebookPluginConfig : public TodayConfigWidget {
Q_OBJECT
public:
DatebookPluginConfig( QWidget *parent, const char *name );
~DatebookPluginConfig();
void writeConfig();
private:
/**
* if changed then save
*/
bool changed();
void readConfig();
DatebookPluginConfigBase *m_gui;
// how many lines should be showed in the datebook section
int m_max_lines_meet;
// If location is to be showed too, 1 to activate it.
int m_show_location;
// if notes should be shown
int m_show_notes;
// should only later appointments be shown or all for the current day.
int m_only_later;
int m_more_days;
};
#endif
diff --git a/core/pim/today/plugins/datebook/datebookpluginimpl.cpp b/core/pim/today/plugins/datebook/datebookpluginimpl.cpp
index 6baffb9..ee250db 100644
--- a/core/pim/today/plugins/datebook/datebookpluginimpl.cpp
+++ b/core/pim/today/plugins/datebook/datebookpluginimpl.cpp
@@ -1,45 +1,45 @@
/*
* datebookpluginimpl.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 "datebookplugin.h"
#include "datebookpluginimpl.h"
DatebookPluginImpl::DatebookPluginImpl() {
datebookPlugin = new DatebookPlugin();
}
DatebookPluginImpl::~DatebookPluginImpl() {
delete datebookPlugin;
}
TodayPluginObject* DatebookPluginImpl::guiPart() {
return datebookPlugin;
}
QRESULT DatebookPluginImpl::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( DatebookPluginImpl );
}
diff --git a/core/pim/today/plugins/datebook/datebookpluginimpl.h b/core/pim/today/plugins/datebook/datebookpluginimpl.h
index 7c19e59..d34dd6d 100644
--- a/core/pim/today/plugins/datebook/datebookpluginimpl.h
+++ b/core/pim/today/plugins/datebook/datebookpluginimpl.h
@@ -1,39 +1,39 @@
/*
* datebookpluginimpl.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 DATEBOOK_PLUGIN_IMPL_H
#define DATEBOOK_PLUGIN_IMPL_H
-#include <opie/todayplugininterface.h>
+#include <opie2/todayplugininterface.h>
class DatebookPlugin;
class DatebookPluginImpl : public TodayPluginInterface{
public:
DatebookPluginImpl();
virtual ~DatebookPluginImpl();
QRESULT queryInterface( const QUuid &, QUnknownInterface** );
Q_REFCOUNT
virtual TodayPluginObject *guiPart();
private:
DatebookPlugin *datebookPlugin;
};
#endif
diff --git a/core/pim/today/plugins/datebook/datebookpluginwidget.cpp b/core/pim/today/plugins/datebook/datebookpluginwidget.cpp
index 1b11d1b..b6707df 100644
--- a/core/pim/today/plugins/datebook/datebookpluginwidget.cpp
+++ b/core/pim/today/plugins/datebook/datebookpluginwidget.cpp
@@ -1,52 +1,52 @@
/*
* datebookpluginwidget.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 "datebookpluginwidget.h"
#include <qpe/config.h>
#include <qtl.h>
DatebookPluginWidget::DatebookPluginWidget( QWidget *parent, const char* name )
: QWidget(parent, name ) {
db = 0l;
m_layoutDates = 0l;
if ( m_layoutDates ) {
delete m_layoutDates;
}
m_layoutDates = new QVBoxLayout( this );
m_layoutDates->setAutoAdd( true );
m_eventsList.setAutoDelete( true );
readConfig();
getDates();
}
DatebookPluginWidget::~DatebookPluginWidget() {
delete db;
delete m_layoutDates;
}
void DatebookPluginWidget::readConfig() {
Config cfg( "todaydatebookplugin" );
cfg.setGroup( "config" );
m_max_lines_meet = cfg.readNumEntry( "maxlinesmeet", 5 );
m_show_location = cfg.readNumEntry( "showlocation", 1 );
@@ -55,86 +55,86 @@ void DatebookPluginWidget::readConfig() {
m_moreDays = cfg.readNumEntry( "moredays", 0 );
m_timeExtraLine = cfg.readNumEntry( "timeextraline", 1 );
}
void DatebookPluginWidget::reinitialize() {
readConfig();
refresh();
}
void DatebookPluginWidget::refresh() {
m_eventsList.clear();
if ( m_layoutDates ) {
delete m_layoutDates;
}
m_layoutDates = new QVBoxLayout( this );
m_layoutDates->setAutoAdd( true );
getDates();
}
/**
* Get all events that are in the datebook xml file for today
*/
void DatebookPluginWidget::getDates() {
if ( db ) {
delete db;
}
db = new DateBookDB;
QDate date = QDate::currentDate();
QValueList<EffectiveEvent> list = db->getEffectiveEvents( date, date.addDays( m_moreDays ) );
qBubbleSort( list );
int count = 0;
if ( list.count() > 0 ) {
for ( QValueList<EffectiveEvent>::ConstIterator it = list.begin(); it != list.end(); ++it ) {
if ( count < m_max_lines_meet ) {
if ( !m_onlyLater ) {
count++;
DateBookEvent *l = new DateBookEvent( *it, this, m_show_location, m_show_notes, m_timeExtraLine );
m_eventsList.append( l );
l->show();
QObject::connect ( l, SIGNAL( editEvent( const Event & ) ), l, SLOT( editEventSlot( const Event & ) ) );
- } else {
- if ( ( QDateTime::currentDateTime() <= (*it).event().end() )
+ } else {
+ if ( ( QDateTime::currentDateTime() <= (*it).event().end() )
// Show events which span over many days and are not elapsed.
|| ( ( (*it).event().start().date() != date ) && ( QDateTime::currentDateTime() <= (*it).event().end() ) )
// Show repeated event for today that is not elapsed.
|| ( ( (*it).event().repeatType() != Event::NoRepeat )
- && ( ( date.dayOfWeek() == (*it).date().dayOfWeek() )
- && ( QTime::currentTime() < (*it).event().start().time() ) ) )
+ && ( ( date.dayOfWeek() == (*it).date().dayOfWeek() )
+ && ( QTime::currentTime() < (*it).event().start().time() ) ) )
// Show repeated event for next days.
|| ( ( (*it).event().repeatType() != Event::NoRepeat )
- && ( date.dayOfWeek() != (*it).date().dayOfWeek() ) )
- )
+ && ( date.dayOfWeek() != (*it).date().dayOfWeek() ) )
+ )
{
count++;
// show only later appointments
DateBookEvent *l = new DateBookEvent( *it, this, m_show_location, m_show_notes, m_timeExtraLine );
m_eventsList.append( l );
l->show();
QObject::connect ( l, SIGNAL( editEvent( const Event & ) ), l, SLOT( editEventSlot( const Event & ) ) );
}
}
}
}
if ( m_onlyLater && count == 0 ) {
QLabel* noMoreEvents = new QLabel( this );
m_eventsList.append( noMoreEvents );
noMoreEvents->show();
noMoreEvents->setText( QObject::tr( "No more appointments today" ) );
}
} else {
QLabel* noEvents = new QLabel( this );
m_eventsList.append( noEvents );
noEvents->show();
noEvents->setText( QObject::tr( "No appointments today" ) );
}
}
diff --git a/core/pim/today/plugins/datebook/datebookpluginwidget.h b/core/pim/today/plugins/datebook/datebookpluginwidget.h
index 8988073..68af323 100644
--- a/core/pim/today/plugins/datebook/datebookpluginwidget.h
+++ b/core/pim/today/plugins/datebook/datebookpluginwidget.h
@@ -1,60 +1,63 @@
/*
* datebookpluginwidget.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 DATEBOOK_PLUGIN_WIDGET_H
#define DATEBOOK_PLUGIN_WIDGET_H
+#include "datebookevent.h"
+
+#include <opie2/oclickablelabel.h>
+
+#include <qpe/datebookdb.h>
+
#include <qlayout.h>
#include <qguardedptr.h>
#include <qlist.h>
-#include <qpe/datebookdb.h>
-#include <opie/oclickablelabel.h>
-
-#include "datebookevent.h"
+using namespace Opie;
class DatebookPluginWidget : public QWidget {
Q_OBJECT
public:
DatebookPluginWidget( QWidget *parent, const char *name );
~DatebookPluginWidget();
void refresh();
void reinitialize();
private:
DateBookDB* db;
QGuardedPtr<QVBoxLayout> m_layoutDates;
QList<QWidget> m_eventsList;
void readConfig();
void getDates();
// how many lines should be showed in the datebook section
int m_max_lines_meet;
// If location is to be showed too, 1 to activate it.
bool m_show_location;
// if notes should be shown
bool m_show_notes;
// should only later appointments be shown or all for the current day.
bool m_onlyLater;
int m_moreDays;
// true if time of an appointment should be an extra line
bool m_timeExtraLine;
};
#endif
diff --git a/core/pim/today/plugins/mail/mail.pro b/core/pim/today/plugins/mail/mail.pro
index 70c484d..1c3555b 100644
--- a/core/pim/today/plugins/mail/mail.pro
+++ b/core/pim/today/plugins/mail/mail.pro
@@ -1,37 +1,37 @@
TEMPLATE = lib
CONFIG -= moc
CONFIG += qt release
# Input
HEADERS = mailplugin.h mailpluginimpl.h mailpluginwidget.h
SOURCES = mailplugin.cpp mailpluginimpl.cpp mailpluginwidget.cpp
INCLUDEPATH += $(OPIEDIR)/include \
../ ../library
DEPENDPATH += $(OPIEDIR)/include \
../ ../library
-LIBS+= -lqpe -lopie
+LIBS+= -lqpe -lopiecore2 -opiepim2
DESTDIR = $(OPIEDIR)/plugins/today
TARGET = todaymailplugin
TRANSLATIONS = ../../../../../i18n/de/libtodaymailplugin.ts \
../../../../../i18n/nl/libtodaymailplugin.ts \
../../../../../i18n/xx/libtodaymailplugin.ts \
../../../../../i18n/en/libtodaymailplugin.ts \
../../../../../i18n/es/libtodaymailplugin.ts \
../../../../../i18n/fr/libtodaymailplugin.ts \
../../../../../i18n/hu/libtodaymailplugin.ts \
../../../../../i18n/ja/libtodaymailplugin.ts \
../../../../../i18n/ko/libtodaymailplugin.ts \
../../../../../i18n/no/libtodaymailplugin.ts \
../../../../../i18n/pl/libtodaymailplugin.ts \
../../../../../i18n/pt/libtodaymailplugin.ts \
../../../../../i18n/pt_BR/libtodaymailplugin.ts \
../../../../../i18n/sl/libtodaymailplugin.ts \
../../../../../i18n/zh_CN/libtodaymailplugin.ts \
../../../../../i18n/zh_TW/libtodaymailplugin.ts \
../../../../../i18n/it/libtodaymailplugin.ts \
../../../../../i18n/da/libtodaymailplugin.ts
include ( $(OPIEDIR)/include.pro )
diff --git a/core/pim/today/plugins/mail/mailplugin.h b/core/pim/today/plugins/mail/mailplugin.h
index 7d6d5e8..1edffef 100644
--- a/core/pim/today/plugins/mail/mailplugin.h
+++ b/core/pim/today/plugins/mail/mailplugin.h
@@ -1,50 +1,53 @@
/*
* mailplugin.h
*
* copyright : (c) 2002,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 MAIL_PLUGIN_H
#define MAIL_PLUGIN_H
+#include "mailpluginwidget.h"
+
+#include <opie2/todayplugininterface.h>
+#include <opie2/todayconfigwidget.h>
+
#include <qwidget.h>
#include <qguardedptr.h>
-#include <opie/todayplugininterface.h>
-#include <opie/todayconfigwidget.h>
-#include "mailpluginwidget.h"
+
class MailPlugin : public TodayPluginObject {
public:
MailPlugin();
~MailPlugin();
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<MailPluginWidget> m_widget;
};
#endif
diff --git a/core/pim/today/plugins/mail/mailpluginimpl.cpp b/core/pim/today/plugins/mail/mailpluginimpl.cpp
index dfd3a64..fac27f4 100644
--- a/core/pim/today/plugins/mail/mailpluginimpl.cpp
+++ b/core/pim/today/plugins/mail/mailpluginimpl.cpp
@@ -1,48 +1,48 @@
/*
* mailpluginimpl.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 "mailplugin.h"
#include "mailpluginimpl.h"
MailPluginImpl::MailPluginImpl() {
mailPlugin = new MailPlugin();
}
MailPluginImpl::~MailPluginImpl() {
delete mailPlugin;
}
TodayPluginObject* MailPluginImpl::guiPart() {
return mailPlugin;
}
QRESULT MailPluginImpl::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( MailPluginImpl );
}
diff --git a/core/pim/today/plugins/mail/mailpluginimpl.h b/core/pim/today/plugins/mail/mailpluginimpl.h
index 72e1760..35b3805 100644
--- a/core/pim/today/plugins/mail/mailpluginimpl.h
+++ b/core/pim/today/plugins/mail/mailpluginimpl.h
@@ -1,39 +1,39 @@
/*
* mailpluginimpl.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 MAIL_PLUGIN_IMPL_H
#define MAIL_PLUGIN_IMPL_H
-#include <opie/todayplugininterface.h>
+#include <opie2/todayplugininterface.h>
class MailPlugin;
class MailPluginImpl : public TodayPluginInterface{
public:
MailPluginImpl();
virtual ~MailPluginImpl();
QRESULT queryInterface( const QUuid &, QUnknownInterface** );
Q_REFCOUNT
virtual TodayPluginObject *guiPart();
private:
MailPlugin *mailPlugin;
};
#endif
diff --git a/core/pim/today/plugins/mail/mailpluginwidget.cpp b/core/pim/today/plugins/mail/mailpluginwidget.cpp
index feecd81..4194270 100644
--- a/core/pim/today/plugins/mail/mailpluginwidget.cpp
+++ b/core/pim/today/plugins/mail/mailpluginwidget.cpp
@@ -1,69 +1,68 @@
/*
* mailpluginwidget.cpp
*
* 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 "mailpluginwidget.h"
#include <qpe/config.h>
#include <qpe/qcopenvelope_qws.h>
-#include "mailpluginwidget.h"
-
MailPluginWidget::MailPluginWidget( QWidget *parent, const char* name)
: QWidget(parent, name ) {
m_mailLabel = 0l;
m_layout = 0l;
if ( m_mailLabel ) {
delete m_mailLabel;
}
m_mailLabel = new OClickableLabel( this );
connect( m_mailLabel, SIGNAL( clicked() ), this, SLOT( startMail() ) );
if ( m_layout ) {
delete m_layout;
}
m_layout = new QHBoxLayout( this );
m_layout->setAutoAdd( true );
#if defined(Q_WS_QWS)
#if !defined(QT_NO_COP)
QCopChannel *qCopChannel = new QCopChannel( "QPE/Pim" , this );
connect ( qCopChannel, SIGNAL( received( const QCString &, const QByteArray &) ),
this, SLOT ( channelReceived( const QCString &, const QByteArray &) ) );
#endif
#endif
readConfig();
getInfo();
}
void MailPluginWidget::channelReceived( const QCString &msg, const QByteArray & data ) {
QDataStream stream( data, IO_ReadOnly );
if ( msg == "outgoingMails(int)" ) {
stream >> m_outgoing;
} else if ( msg == "newMails(int)" ) {
stream >> m_newMails;
}
getInfo();
}
MailPluginWidget::~MailPluginWidget() {
delete m_mailLabel;
delete m_layout;
}
void MailPluginWidget::readConfig() {
diff --git a/core/pim/today/plugins/mail/mailpluginwidget.h b/core/pim/today/plugins/mail/mailpluginwidget.h
index 6d16d2c..0ad8738 100644
--- a/core/pim/today/plugins/mail/mailpluginwidget.h
+++ b/core/pim/today/plugins/mail/mailpluginwidget.h
@@ -1,50 +1,52 @@
/*
* mailpluginwidget.h
*
* 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 MAIL_PLUGIN_WIDGET_H
#define MAIL_PLUGIN_WIDGET_H
#include <qlayout.h>
-#include <opie/oclickablelabel.h>
+#include <opie2/oclickablelabel.h>
+
+using namespace Opie;
class MailPluginWidget : public QWidget {
Q_OBJECT
public:
MailPluginWidget( QWidget *parent, const char *name );
~MailPluginWidget();
void refresh();
protected slots:
void startMail();
private:
OClickableLabel* m_mailLabel;
QHBoxLayout* m_layout;
void readConfig();
void getInfo();
int m_newMails;
int m_outgoing;
private slots:
void channelReceived(const QCString &msg, const QByteArray & data);
};
#endif
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
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp
index c83a5df..b55a4a7 100644
--- a/core/pim/today/today.cpp
+++ b/core/pim/today/today.cpp
@@ -1,66 +1,64 @@
/*
* today.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. *
* *
***************************************************************************/
-
-
#define QTOPIA_INTERNAL_LANGLIST
#include "today.h"
#include <qpe/config.h>
#include <qpe/qcopenvelope_qws.h>
#include <qpe/resource.h>
#include <qpe/global.h>
#include <qpe/qpeapplication.h>
#include <qpe/contact.h>
#include <qdir.h>
#include <qtimer.h>
#include <qwhatsthis.h>
struct TodayPlugin {
TodayPlugin() : library( 0 ), iface( 0 ), guiPart( 0 ), guiBox( 0 ) {}
QLibrary *library;
QInterfacePtr<TodayPluginInterface> iface;
TodayPluginObject *guiPart;
QWidget *guiBox;
QString name;
bool active;
bool excludeRefresh;
int pos;
};
static QValueList<TodayPlugin> pluginList;
static QMap<QString, TodayPlugin> tempList;
Today::Today( QWidget* parent, const char* name, WFlags fl )
: TodayBase( parent, name, fl ) {
QObject::connect( (QObject*)ConfigButton, SIGNAL( clicked() ), this, SLOT( startConfig() ) );
QObject::connect( (QObject*)OwnerField, SIGNAL( clicked() ), this, SLOT( editCard() ) );
#if defined(Q_WS_QWS)
#if !defined(QT_NO_COP)
QCopChannel *todayChannel = new QCopChannel( "QPE/Today" , this );
connect ( todayChannel, SIGNAL( received( const QCString &, const QByteArray &) ),
this, SLOT ( channelReceived( const QCString &, const QByteArray &) ) );
#endif
#endif
setOwnerField();
m_refreshTimer = new QTimer( this );
connect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) );
diff --git a/core/pim/today/today.h b/core/pim/today/today.h
index bf2293a..972731c 100644
--- a/core/pim/today/today.h
+++ b/core/pim/today/today.h
@@ -1,81 +1,81 @@
/*
* today.h
*
- * 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. *
* *
***************************************************************************/
-
-
#ifndef TODAY_H
#define TODAY_H
-#include <qscrollview.h>
-#include <qvbox.h>
-
-#include <qpe/qlibrary.h>
#include "todayconfig.h"
#include "todaybase.h"
-#include <opie/todayplugininterface.h>
+#include <opie2/todayplugininterface.h>
+#include <opie2/oclickablelabel.h>
-class QVBoxLayout;
-class OClickableLabel;
+#include <qpe/qlibrary.h>
+
+#include <qscrollview.h>
+#include <qvbox.h>
+using namespace Opie;
+
+class QVBoxLayout;
class Today : public TodayBase {
Q_OBJECT
public:
Today( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
~Today();
static QString appName() { return QString::fromLatin1("today"); }
private slots:
void startConfig();
void startApplication();
void editCard();
void refresh();
private:
void init();
void setOwnerField();
void setOwnerField(QString &string);
void loadPlugins();
void draw();
void reinitialize();
void setRefreshTimer( int );
private slots:
void channelReceived(const QCString &msg, const QByteArray & data);
private:
TodayConfig *conf;
QStringList m_excludeApplets;
QStringList m_allApplets;
QScrollView *m_sv;
QWidget* m_big_box;
QVBoxLayout *m_bblayout;
QTimer *m_refreshTimer;
bool m_refreshTimerEnabled;
int m_newStart;
int m_iconSize;
int m_maxCharClip;
int m_hideBanner;
};
diff --git a/core/pim/today/today.pro b/core/pim/today/today.pro
index 2968e6a..b55a812 100644
--- a/core/pim/today/today.pro
+++ b/core/pim/today/today.pro
@@ -1,14 +1,15 @@
CONFIG += qt warn on release quick-app
HEADERS = today.h todaybase.h todayconfig.h
SOURCES = today.cpp todaybase.cpp todayconfig.cpp main.cpp
INTERFACES = todayconfigmiscbase.ui
INCLUDEPATH += $(OPIEDIR)/include
DEPENDPATH += $(OPIEDIR)/include
-LIBS += -lqpe -lopie
+LIBS += -lqpe -lopiecore2 -lopiepim2 -lopieui2
TARGET = today
include ( $(OPIEDIR)/include.pro )
}
+
diff --git a/core/pim/today/todaybase.cpp b/core/pim/today/todaybase.cpp
index f2958ad..14cdfd9 100644
--- a/core/pim/today/todaybase.cpp
+++ b/core/pim/today/todaybase.cpp
@@ -1,71 +1,70 @@
/*
* todaybase.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 "todaybase.h"
-#include <qvbox.h>
-#include <qwhatsthis.h>
-
#include <qpe/resource.h>
+#include <qvbox.h>
+#include <qwhatsthis.h>
TodayBase::TodayBase( QWidget* parent, const char* name, WFlags )
: QWidget( parent, name, WStyle_ContextHelp ) {
QPixmap logo = Resource::loadPixmap( "today/today_logo"); // logo
QPixmap opiezilla = Resource::loadPixmap("today/opiezilla" ); //the opiezilla
QPixmap config = Resource::loadPixmap( "SettingsIcon" ); // config icon
layout = 0L;
QPalette pal = this->palette();
QColor col = pal.color( QPalette::Active, QColorGroup::Background );
pal.setColor( QPalette::Active, QColorGroup::Button, col );
pal.setColor( QPalette::Inactive, QColorGroup::Button, col );
pal.setColor( QPalette::Normal, QColorGroup::Button, col );
pal.setColor( QPalette::Disabled, QColorGroup::Button, col );
this->setPalette( pal );
// --- logo Section ---
QPalette pal2;
QColorGroup cg;
cg.setColor( QColorGroup::Text, white );
cg.setBrush( QColorGroup::Background, QBrush( QColor( 238, 238, 230 ), logo ) );
pal2.setActive( cg );
// today logo
Frame = new QLabel( this, "Frame" );
Frame->setPalette( pal2 );
Frame->setFrameShape( QFrame::StyledPanel );
Frame->setFrameShadow( QFrame::Raised );
Frame->setLineWidth( 0 );
QHBoxLayout *frameLayout = new QHBoxLayout( Frame );
QVBox *box1 = new QVBox( Frame );
// Today text
TodayLabel = new QLabel( box1, "TodayText" );
QFont TodayLabel_font( TodayLabel->font() );
TodayLabel_font.setBold( TRUE );
TodayLabel_font.setPointSize( 40 );
TodayLabel->setFont( TodayLabel_font );
TodayLabel->setBackgroundOrigin( QLabel::ParentOrigin );
TodayLabel->setText( "<font color=#FFFFFF>" + tr("Today") +"</font>" );
// date
DateLabel = new QLabel( box1, "TextLabel1" );
QFont DateLabel_font( DateLabel->font() );
DateLabel_font.setBold( TRUE );
diff --git a/core/pim/today/todaybase.h b/core/pim/today/todaybase.h
index b0b2e14..b737351 100644
--- a/core/pim/today/todaybase.h
+++ b/core/pim/today/todaybase.h
@@ -1,55 +1,56 @@
/*
* todaybase.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 TODAYBASE_H
#define TODAYBASE_H
+#include <opie2/oclickablelabel.h>
+
#include <qlayout.h>
-#include <opie/oclickablelabel.h>
class QVBox;
class QGridLayout;
class QFrame;
class QLabel;
class QPushButton;
class QBoxLayout;
+using namespace Opie;
+
+
class TodayBase : public QWidget
{
Q_OBJECT
public:
TodayBase( QWidget* parent = 0, const char* name = 0, WFlags = 0 );
~TodayBase();
QFrame* Frame4;
QPushButton* DatesButton;
QVBoxLayout* layout;
- OClickableLabel* OwnerField;
+ Opie::OClickableLabel* OwnerField;
QLabel* Frame;
QLabel* DateLabel;
QFrame* Frame15;
QLabel* Opiezilla;
QLabel* TodayLabel;
OClickableLabel* ConfigButton;
-protected:
-
-
};
#endif
diff --git a/core/pim/today/todayconfig.cpp b/core/pim/today/todayconfig.cpp
index 9ced0d8..5c51515 100644
--- a/core/pim/today/todayconfig.cpp
+++ b/core/pim/today/todayconfig.cpp
@@ -1,52 +1,52 @@
/*
* todayconfig.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 "todayconfig.h"
#include <qpe/config.h>
#include <qpe/resource.h>
#include <qpe/qcopenvelope_qws.h>
#include <qpe/qpeapplication.h>
#include <qcheckbox.h>
#include <qlabel.h>
#include <qspinbox.h>
#include <qlayout.h>
#include <qheader.h>
#include <qvbox.h>
#include <qtoolbutton.h>
#include <qwhatsthis.h>
class ToolButton : public QToolButton {
public:
ToolButton( QWidget *parent, const char *name, const QString& icon, QObject *handler, const QString& slot, bool t = FALSE )
: QToolButton( parent, name ) {
setPixmap( Resource::loadPixmap( icon ) );
setAutoRaise( TRUE );
setFocusPolicy( QWidget::NoFocus );
setToggleButton( t );
connect( this, t ? SIGNAL( toggled(bool) ) : SIGNAL( clicked() ), handler, slot );
}
};
/**
* The class has currently quite some duplicate code.
* By that way it would be real easy to have it as seperate app in settings tab
*
*/
TodayConfig::TodayConfig( QWidget* parent, const char* name, bool modal )
diff --git a/core/pim/today/todayconfig.h b/core/pim/today/todayconfig.h
index 0a7687c..3b585c9 100644
--- a/core/pim/today/todayconfig.h
+++ b/core/pim/today/todayconfig.h
@@ -1,73 +1,73 @@
/*
* todayconfig.h
*
- * 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. *
* *
***************************************************************************/
#ifndef TODAYCONFIG_H
#define TODAYCONFIG_H
+#include "todayconfigmiscbase.h"
+
+#include <opie2/otabwidget.h>
+
#include <qvariant.h>
#include <qdialog.h>
#include <qlistview.h>
-#include <opie/otabwidget.h>
-
-
-#include "todayconfigmiscbase.h"
class QCheckBox;
class QLabel;
class QSpinBox;
class QTabWidget;
class TodayConfig : public QDialog {
Q_OBJECT
public:
TodayConfig( QWidget* parent = 0, const char* name = 0, bool modal = FALSE );
~TodayConfig();
OTabWidget* TabWidget3;
void writeConfig();
void pluginManagement( QString libName, QString name, QPixmap icon );
protected slots:
void appletChanged();
void moveSelectedUp();
void moveSelectedDown();
private:
void setAutoStart();
void readConfig();
QListView* m_appletListView;
QMap<QString,QCheckListItem*> m_applets;
int m_autoStart;
int m_autoStartTimer;
int m_iconSize;
QStringList m_excludeApplets;
bool m_applets_changed;
QWidget* tab_2;
QWidget* tab_3;
QLabel* TextLabel1, *TextLabel4;
QSpinBox* SpinBox7;
TodayConfigMiscBase *m_guiMisc;
};
#endif