author | harlekin <harlekin> | 2003-02-23 14:48:40 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2003-02-23 14:48:40 (UTC) |
commit | 791c7512c530cb373726f9c01e26229cb8ca992a (patch) (side-by-side diff) | |
tree | 21d072088bbbbc7b079925118c91d941e0010a4c | |
parent | 15c2cf367bc38c17fb488e6d8be44c148ecfb1bf (diff) | |
download | opie-791c7512c530cb373726f9c01e26229cb8ca992a.zip opie-791c7512c530cb373726f9c01e26229cb8ca992a.tar.gz opie-791c7512c530cb373726f9c01e26229cb8ca992a.tar.bz2 |
got rid of not needed includes
4 files changed, 5 insertions, 18 deletions
diff --git a/core/pim/today/plugins/todolist/todopluginconfig.cpp b/core/pim/today/plugins/todolist/todopluginconfig.cpp index 56b7aa2..c83f83b 100644 --- a/core/pim/today/plugins/todolist/todopluginconfig.cpp +++ b/core/pim/today/plugins/todolist/todopluginconfig.cpp @@ -1,71 +1,70 @@ /* * todopluginconfig.cpp * - * copyright : (c) 2002 by Maximilian Reiß + * 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 <qhbox.h> -#include <qtoolbutton.h> #include <qlabel.h> #include <qwhatsthis.h> TodolistPluginConfig::TodolistPluginConfig( QWidget *parent, const char* name) : TodayConfigWidget(parent, name ) { QVBoxLayout * layout = new QVBoxLayout( this ); layout->setMargin( 20 ); QHBox *box1 = new QHBox( this ); QLabel* TextLabel6 = new QLabel( box1, "TextLabel6" ); TextLabel6->setText( tr( "tasks shown " ) ); SpinBox2 = new QSpinBox( box1, "SpinBox2" ); SpinBox2->setMaxValue( 40 ); QWhatsThis::add( SpinBox2 , tr( "Set the maximum number of task that should be shown" ) ); 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" ) ); layout->addWidget( box1 ); layout->addWidget( box2 ); readConfig(); } void TodolistPluginConfig::readConfig() { Config cfg( "todaytodoplugin" ); cfg.setGroup( "config" ); m_max_lines_task = cfg.readNumEntry( "maxlinestask", 5 ); SpinBox2->setValue( m_max_lines_task ); m_maxCharClip = cfg.readNumEntry( "maxcharclip", 38 ); SpinBoxClip->setValue( m_maxCharClip ); } void TodolistPluginConfig::writeConfig() { Config cfg( "todaytodoplugin" ); diff --git a/core/pim/today/plugins/todolist/todopluginconfig.h b/core/pim/today/plugins/todolist/todopluginconfig.h index 4584ebe..a98384c 100644 --- a/core/pim/today/plugins/todolist/todopluginconfig.h +++ b/core/pim/today/plugins/todolist/todopluginconfig.h @@ -1,57 +1,57 @@ /* * todopluginconfig.h * - * copyright : (c) 2002 by Maximilian Reiß + * 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 <qwidget.h> +//#include <qwidget.h> #include <qspinbox.h> #include <opie/todayconfigwidget.h> class TodolistPluginConfig : public TodayConfigWidget { public: TodolistPluginConfig( QWidget *parent, const char *name ); ~TodolistPluginConfig(); private: /** * if changed then save */ bool changed(); void readConfig(); void writeConfig(); QSpinBox* SpinBox2; QSpinBox* SpinBoxClip; // 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/todopluginwidget.cpp b/core/pim/today/plugins/todolist/todopluginwidget.cpp index 3242dac..15081ec 100644 --- a/core/pim/today/plugins/todolist/todopluginwidget.cpp +++ b/core/pim/today/plugins/todolist/todopluginwidget.cpp @@ -1,97 +1,88 @@ /* * todopluginwidget.cpp * - * copyright : (c) 2002 by Maximilian Reiß + * 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 <qvaluelist.h> -#include <qtl.h> -#include <qstring.h> -#include <qscrollview.h> -#include <qobject.h> -#include <qlayout.h> - #include <qpe/config.h> -#include <qpe/timestring.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->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() { getTodo(); } /** * Get the todos */ void TodolistPluginWidget::getTodo() { QString output; QString tmpout; int count = 0; int ammount = 0; // get overdue todos first m_list = todo->overDue(); for ( m_it = m_list.begin(); m_it != m_list.end(); ++m_it ) { if (!(*m_it).isCompleted() && ( ammount < m_maxLinesTask ) ) { QString desc = (*m_it).summary(); if( desc.isEmpty() ) { desc = (*m_it).description(); diff --git a/core/pim/today/plugins/todolist/todopluginwidget.h b/core/pim/today/plugins/todolist/todopluginwidget.h index 0d0deb5..0db65c4 100644 --- a/core/pim/today/plugins/todolist/todopluginwidget.h +++ b/core/pim/today/plugins/todolist/todopluginwidget.h @@ -1,56 +1,53 @@ /* * todopluginwidget.h * - * copyright : (c) 2002 by Maximilian Reiß + * 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 <qstring.h> -#include <qwidget.h> #include <qlayout.h> -#include <opie/otodo.h> #include <opie/otodoaccess.h> #include <opie/oclickablelabel.h> class TodolistPluginWidget : public QWidget { Q_OBJECT public: TodolistPluginWidget( QWidget *parent, const char *name ); ~TodolistPluginWidget(); void refresh(); protected slots: void startTodolist(); private: OClickableLabel *todoLabel; QVBoxLayout* layoutTodo; OTodoAccess *todo; OTodoAccess::List m_list; OTodoAccess::List::Iterator m_it; void readConfig(); void getTodo(); int m_maxLinesTask; int m_maxCharClip; }; #endif |