7 files changed, 0 insertions, 20 deletions
diff --git a/core/pim/today/plugins/addressbook/addresspluginconfig.cpp b/core/pim/today/plugins/addressbook/addresspluginconfig.cpp index 8863192..8c55937 100644 --- a/core/pim/today/plugins/addressbook/addresspluginconfig.cpp +++ b/core/pim/today/plugins/addressbook/addresspluginconfig.cpp @@ -1,73 +1,72 @@ /* * addresspluginconfig.cpp * * copyright : (c) 2003 by Stefan Eilers * email : eilers.stefan@epost.de * * This implementation was derived from the todolist plugin implementation * */ /*************************************************************************** * * * 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 "addresspluginconfig.h" #include <qpe/config.h> #include <qlayout.h> #include <qhbox.h> -#include <qtoolbutton.h> #include <qlabel.h> #include <qwhatsthis.h> #include <qvgroupbox.h> AddressBookPluginConfig::AddressBookPluginConfig( QWidget *parent, const char* name) : TodayConfigWidget(parent, name ) { QVBoxLayout * layout = new QVBoxLayout( this ); layout->setMargin( 20 ); #if 0 // Informational stuff QHBox *box4 = new QHBox( this ); QLabel* colorLabel = new QLabel( box4, "" ); colorLabel->setText( tr( "To activate settings: Restart application !" ) ); #endif // Buttongroup to enable/disable shown stuff QVGroupBox* b_group = new QVGroupBox( this, "name" ); b_group -> setTitle( tr("Enable/Disable Views") ); m_showBirthdayButton = new QRadioButton( b_group ); m_showBirthdayButton -> setText( tr( "Show &Birthdays" ) ); m_showAnniversaryButton = new QRadioButton( b_group ); m_showAnniversaryButton -> setText( tr( "Show &Anniveraries" ) ); QWhatsThis::add( m_showBirthdayButton , tr( "The next birthdays will just be shown, if enabled!" ) ); QWhatsThis::add( m_showAnniversaryButton , tr( "The next anniversaries will just be shown, if enabled !" ) ); // Max lines settings QHBox *box1 = new QHBox( this ); QLabel* TextLabel6 = new QLabel( box1, "TextLabel6" ); TextLabel6->setText( tr( "Max Lines: " ) ); SpinBox2 = new QSpinBox( box1, "SpinBox2" ); SpinBox2->setMaxValue( 40 ); QWhatsThis::add( SpinBox2 , tr( "Set the maximum number of lines that should be shown for each anniversaries/birthdays" ) ); #if 0 // Clip settings (currently not used) QHBox *box2 = new QHBox( this ); QLabel* clipLabel = new QLabel( box2, "" ); clipLabel->setText( tr( "Clip line after X chars: " ) ); SpinBoxClip = new QSpinBox( box2, "SpinClip" ); SpinBoxClip->setMaxValue( 200 ); QWhatsThis::add( SpinBoxClip , tr( "After how many chars should be the info about the task be cut off" ) ); #endif // Look ahead settings diff --git a/core/pim/today/plugins/addressbook/addresspluginwidget.cpp b/core/pim/today/plugins/addressbook/addresspluginwidget.cpp index d47bc0b..c8652f3 100644 --- a/core/pim/today/plugins/addressbook/addresspluginwidget.cpp +++ b/core/pim/today/plugins/addressbook/addresspluginwidget.cpp @@ -1,78 +1,70 @@ /* * addresspluginwidget.cpp * * copyright : (c) 2003 by Stefan Eilers * email : eilers.stefan@epost.de * * This implementation was derived from the todolist plugin implementation * */ /*************************************************************************** * * * 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 "addresspluginwidget.h" -#include <qvaluelist.h> -#include <qtl.h> -#include <qstring.h> -#include <qscrollview.h> -#include <qobject.h> -#include <qdatetime.h> #include <qpe/config.h> -#include <qpe/timestring.h> -#include <qpe/qcopenvelope_qws.h> #include <opie/ocontact.h> AddressBookPluginWidget::AddressBookPluginWidget( QWidget *parent, const char* name ) : QWidget( parent, name ) { addressLabel = 0l; m_contactdb = 0l; layoutTodo = 0l; // Hä ? Nonsense ! (se) if ( m_contactdb ) { delete m_contactdb; } m_contactdb = new OContactAccess("addressplugin"); connect( m_contactdb, SIGNAL( signalChanged( const OContactAccess * ) ), this, SLOT( refresh( const OContactAccess * ) ) ); readConfig(); getAddress(); } AddressBookPluginWidget::~AddressBookPluginWidget() { delete m_contactdb; } void AddressBookPluginWidget::refresh( const OContactAccess* ) { qWarning(" AddressBookPluginWidget::Database was changed externally ! "); m_contactdb->reload(); getAddress(); } void AddressBookPluginWidget::reinitialize() { readConfig(); getAddress(); } void AddressBookPluginWidget::readConfig() { Config cfg( "todayaddressplugin" ); cfg.setGroup( "config" ); m_maxLinesTask = cfg.readNumEntry( "maxlinestask", 5 ); m_maxCharClip = cfg.readNumEntry( "maxcharclip", 38 ); m_daysLookAhead = cfg.readNumEntry( "dayslookahead", 14 ); m_urgentDays = cfg.readNumEntry( "urgentdays", 7 ); diff --git a/core/pim/today/plugins/datebook/datebookevent.cpp b/core/pim/today/plugins/datebook/datebookevent.cpp index e595047..e19a690 100644 --- a/core/pim/today/plugins/datebook/datebookevent.cpp +++ b/core/pim/today/plugins/datebook/datebookevent.cpp @@ -1,69 +1,67 @@ /* * datebookevent.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 "datebookevent.h" #include <qpe/config.h> -#include <qpe/timestring.h> #include <qpe/qcopenvelope_qws.h> -#include <qpe/qpeapplication.h> #include <qpe/calendar.h> #include <opie/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() ) ) diff --git a/core/pim/today/plugins/datebook/datebookplugin.cpp b/core/pim/today/plugins/datebook/datebookplugin.cpp index f77e440..8dfa52f 100644 --- a/core/pim/today/plugins/datebook/datebookplugin.cpp +++ b/core/pim/today/plugins/datebook/datebookplugin.cpp @@ -1,68 +1,67 @@ /* * datebookplugin.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 "datebookevent.h" #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/datebookpluginconfig.cpp b/core/pim/today/plugins/datebook/datebookpluginconfig.cpp index 54f820b..8ead40d 100644 --- a/core/pim/today/plugins/datebook/datebookpluginconfig.cpp +++ b/core/pim/today/plugins/datebook/datebookpluginconfig.cpp @@ -1,74 +1,70 @@ /* * datebookpluginconfig.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 "datebookpluginconfig.h" #include <qpe/config.h> #include <qlayout.h> -#include <qlabel.h> -#include <qhbox.h> -#include <qwhatsthis.h> -#include <qvbox.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 ); } void DatebookPluginConfig::writeConfig() { Config cfg( "todaydatebookplugin" ); cfg.setGroup( "config" ); m_max_lines_meet = m_gui->SpinBox1->value(); cfg.writeEntry( "maxlinesmeet", m_max_lines_meet); m_show_location = m_gui->CheckBox1->isChecked(); cfg.writeEntry( "showlocation", m_show_location); m_show_notes = m_gui->CheckBox2->isChecked(); cfg.writeEntry( "shownotes", m_show_notes ); m_only_later = m_gui->CheckBox3->isChecked(); cfg.writeEntry( "timeextraline", m_gui->CheckBox4->isChecked() ); cfg.writeEntry( "onlylater", m_only_later ); m_more_days = m_gui->SpinBox2->value(); cfg.writeEntry( "moredays", m_more_days ); cfg.write(); } diff --git a/core/pim/today/plugins/datebook/datebookpluginwidget.cpp b/core/pim/today/plugins/datebook/datebookpluginwidget.cpp index 9e95bcd..1b11d1b 100644 --- a/core/pim/today/plugins/datebook/datebookpluginwidget.cpp +++ b/core/pim/today/plugins/datebook/datebookpluginwidget.cpp @@ -1,72 +1,69 @@ /* * datebookpluginwidget.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 "datebookpluginwidget.h" -#include <qpe/timestring.h> #include <qpe/config.h> -#include <qdatetime.h> -#include <qlabel.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 ); m_show_notes = cfg.readNumEntry( "shownotes", 0 ); m_onlyLater = cfg.readNumEntry( "onlylater", 1 ); 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; } diff --git a/core/pim/today/plugins/todolist/todopluginconfig.cpp b/core/pim/today/plugins/todolist/todopluginconfig.cpp index 4821776..76c08a9 100644 --- a/core/pim/today/plugins/todolist/todopluginconfig.cpp +++ b/core/pim/today/plugins/todolist/todopluginconfig.cpp @@ -1,59 +1,58 @@ /* * todopluginconfig.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 "todopluginconfig.h" #include <qpe/config.h> #include <qlayout.h> -#include <qwhatsthis.h> TodolistPluginConfig::TodolistPluginConfig( QWidget *parent, const char* name) : TodayConfigWidget(parent, name ) { QVBoxLayout * layout = new QVBoxLayout( this ); m_gui = new TodoPluginConfigBase( this ); layout->addWidget( m_gui ); readConfig(); } void TodolistPluginConfig::readConfig() { Config cfg( "todaytodoplugin" ); cfg.setGroup( "config" ); m_max_lines_task = cfg.readNumEntry( "maxlinestask", 5 ); m_gui->SpinBox2->setValue( m_max_lines_task ); m_maxCharClip = cfg.readNumEntry( "maxcharclip", 38 ); m_gui->SpinBoxClip->setValue( m_maxCharClip ); } void TodolistPluginConfig::writeConfig() { Config cfg( "todaytodoplugin" ); cfg.setGroup( "config" ); m_max_lines_task = m_gui->SpinBox2->value(); cfg.writeEntry( "maxlinestask", m_max_lines_task ); m_maxCharClip = m_gui->SpinBoxClip->value(); cfg.writeEntry( "maxcharclip", m_maxCharClip ); cfg.write(); } TodolistPluginConfig::~TodolistPluginConfig() { } |