author | harlekin <harlekin> | 2003-02-23 14:48:40 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2003-02-23 14:48:40 (UTC) |
commit | 791c7512c530cb373726f9c01e26229cb8ca992a (patch) (unidiff) | |
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,55 +1,54 @@ | |||
1 | /* | 1 | /* |
2 | * todopluginconfig.cpp | 2 | * todopluginconfig.cpp |
3 | * | 3 | * |
4 | * copyright : (c) 2002 by Maximilian Reiß | 4 | * copyright : (c) 2002, 2003 by Maximilian Reiß |
5 | * email : harlekin@handhelds.org | 5 | * email : harlekin@handhelds.org |
6 | * | 6 | * |
7 | */ | 7 | */ |
8 | /*************************************************************************** | 8 | /*************************************************************************** |
9 | * * | 9 | * * |
10 | * This program is free software; you can redistribute it and/or modify * | 10 | * This program is free software; you can redistribute it and/or modify * |
11 | * it under the terms of the GNU General Public License as published by * | 11 | * it under the terms of the GNU General Public License as published by * |
12 | * the Free Software Foundation; either version 2 of the License, or * | 12 | * the Free Software Foundation; either version 2 of the License, or * |
13 | * (at your option) any later version. * | 13 | * (at your option) any later version. * |
14 | * * | 14 | * * |
15 | ***************************************************************************/ | 15 | ***************************************************************************/ |
16 | 16 | ||
17 | #include "todopluginconfig.h" | 17 | #include "todopluginconfig.h" |
18 | 18 | ||
19 | #include <qpe/config.h> | 19 | #include <qpe/config.h> |
20 | 20 | ||
21 | #include <qlayout.h> | 21 | #include <qlayout.h> |
22 | #include <qhbox.h> | 22 | #include <qhbox.h> |
23 | #include <qtoolbutton.h> | ||
24 | #include <qlabel.h> | 23 | #include <qlabel.h> |
25 | #include <qwhatsthis.h> | 24 | #include <qwhatsthis.h> |
26 | 25 | ||
27 | 26 | ||
28 | 27 | ||
29 | TodolistPluginConfig::TodolistPluginConfig( QWidget *parent, const char* name) | 28 | TodolistPluginConfig::TodolistPluginConfig( QWidget *parent, const char* name) |
30 | : TodayConfigWidget(parent, name ) { | 29 | : TodayConfigWidget(parent, name ) { |
31 | 30 | ||
32 | QVBoxLayout * layout = new QVBoxLayout( this ); | 31 | QVBoxLayout * layout = new QVBoxLayout( this ); |
33 | layout->setMargin( 20 ); | 32 | layout->setMargin( 20 ); |
34 | 33 | ||
35 | QHBox *box1 = new QHBox( this ); | 34 | QHBox *box1 = new QHBox( this ); |
36 | 35 | ||
37 | QLabel* TextLabel6 = new QLabel( box1, "TextLabel6" ); | 36 | QLabel* TextLabel6 = new QLabel( box1, "TextLabel6" ); |
38 | TextLabel6->setText( tr( "tasks shown " ) ); | 37 | TextLabel6->setText( tr( "tasks shown " ) ); |
39 | 38 | ||
40 | SpinBox2 = new QSpinBox( box1, "SpinBox2" ); | 39 | SpinBox2 = new QSpinBox( box1, "SpinBox2" ); |
41 | SpinBox2->setMaxValue( 40 ); | 40 | SpinBox2->setMaxValue( 40 ); |
42 | QWhatsThis::add( SpinBox2 , tr( "Set the maximum number of task that should be shown" ) ); | 41 | QWhatsThis::add( SpinBox2 , tr( "Set the maximum number of task that should be shown" ) ); |
43 | 42 | ||
44 | 43 | ||
45 | 44 | ||
46 | QHBox *box2 = new QHBox( this ); | 45 | QHBox *box2 = new QHBox( this ); |
47 | 46 | ||
48 | QLabel* clipLabel = new QLabel( box2, "" ); | 47 | QLabel* clipLabel = new QLabel( box2, "" ); |
49 | clipLabel->setText( tr( "Clip line after X chars" ) ); | 48 | clipLabel->setText( tr( "Clip line after X chars" ) ); |
50 | 49 | ||
51 | SpinBoxClip = new QSpinBox( box2, "SpinClip" ); | 50 | SpinBoxClip = new QSpinBox( box2, "SpinClip" ); |
52 | SpinBoxClip->setMaxValue( 200 ); | 51 | SpinBoxClip->setMaxValue( 200 ); |
53 | QWhatsThis::add( SpinBoxClip , tr( "After how many chars should be the info about the task be cut off" ) ); | 52 | QWhatsThis::add( SpinBoxClip , tr( "After how many chars should be the info about the task be cut off" ) ); |
54 | layout->addWidget( box1 ); | 53 | layout->addWidget( box1 ); |
55 | layout->addWidget( box2 ); | 54 | layout->addWidget( box2 ); |
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,52 +1,52 @@ | |||
1 | /* | 1 | /* |
2 | * todopluginconfig.h | 2 | * todopluginconfig.h |
3 | * | 3 | * |
4 | * copyright : (c) 2002 by Maximilian Reiß | 4 | * copyright : (c) 2002, 2003 by Maximilian Reiß |
5 | * email : harlekin@handhelds.org | 5 | * email : harlekin@handhelds.org |
6 | * | 6 | * |
7 | */ | 7 | */ |
8 | /*************************************************************************** | 8 | /*************************************************************************** |
9 | * * | 9 | * * |
10 | * This program is free software; you can redistribute it and/or modify * | 10 | * This program is free software; you can redistribute it and/or modify * |
11 | * it under the terms of the GNU General Public License as published by * | 11 | * it under the terms of the GNU General Public License as published by * |
12 | * the Free Software Foundation; either version 2 of the License, or * | 12 | * the Free Software Foundation; either version 2 of the License, or * |
13 | * (at your option) any later version. * | 13 | * (at your option) any later version. * |
14 | * * | 14 | * * |
15 | ***************************************************************************/ | 15 | ***************************************************************************/ |
16 | 16 | ||
17 | #ifndef TODOLIST_PLUGIN_CONFIG_H | 17 | #ifndef TODOLIST_PLUGIN_CONFIG_H |
18 | #define TODOLIST_PLUGIN_CONFIG_H | 18 | #define TODOLIST_PLUGIN_CONFIG_H |
19 | 19 | ||
20 | #include <qwidget.h> | 20 | //#include <qwidget.h> |
21 | #include <qspinbox.h> | 21 | #include <qspinbox.h> |
22 | 22 | ||
23 | #include <opie/todayconfigwidget.h> | 23 | #include <opie/todayconfigwidget.h> |
24 | 24 | ||
25 | class TodolistPluginConfig : public TodayConfigWidget { | 25 | class TodolistPluginConfig : public TodayConfigWidget { |
26 | 26 | ||
27 | 27 | ||
28 | public: | 28 | public: |
29 | 29 | ||
30 | TodolistPluginConfig( QWidget *parent, const char *name ); | 30 | TodolistPluginConfig( QWidget *parent, const char *name ); |
31 | ~TodolistPluginConfig(); | 31 | ~TodolistPluginConfig(); |
32 | 32 | ||
33 | private: | 33 | private: |
34 | /** | 34 | /** |
35 | * if changed then save | 35 | * if changed then save |
36 | */ | 36 | */ |
37 | bool changed(); | 37 | bool changed(); |
38 | void readConfig(); | 38 | void readConfig(); |
39 | void writeConfig(); | 39 | void writeConfig(); |
40 | 40 | ||
41 | QSpinBox* SpinBox2; | 41 | QSpinBox* SpinBox2; |
42 | QSpinBox* SpinBoxClip; | 42 | QSpinBox* SpinBoxClip; |
43 | 43 | ||
44 | // how many lines should be showed in the todolist section | 44 | // how many lines should be showed in the todolist section |
45 | int m_max_lines_task; | 45 | int m_max_lines_task; |
46 | // clip the lines after X chars | 46 | // clip the lines after X chars |
47 | int m_maxCharClip; | 47 | int m_maxCharClip; |
48 | 48 | ||
49 | 49 | ||
50 | 50 | ||
51 | }; | 51 | }; |
52 | 52 | ||
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,81 +1,72 @@ | |||
1 | /* | 1 | /* |
2 | * todopluginwidget.cpp | 2 | * todopluginwidget.cpp |
3 | * | 3 | * |
4 | * copyright : (c) 2002 by Maximilian Reiß | 4 | * copyright : (c) 2002, 2003 by Maximilian Reiß |
5 | * email : harlekin@handhelds.org | 5 | * email : harlekin@handhelds.org |
6 | * | 6 | * |
7 | */ | 7 | */ |
8 | /*************************************************************************** | 8 | /*************************************************************************** |
9 | * * | 9 | * * |
10 | * This program is free software; you can redistribute it and/or modify * | 10 | * This program is free software; you can redistribute it and/or modify * |
11 | * it under the terms of the GNU General Public License as published by * | 11 | * it under the terms of the GNU General Public License as published by * |
12 | * the Free Software Foundation; either version 2 of the License, or * | 12 | * the Free Software Foundation; either version 2 of the License, or * |
13 | * (at your option) any later version. * | 13 | * (at your option) any later version. * |
14 | * * | 14 | * * |
15 | ***************************************************************************/ | 15 | ***************************************************************************/ |
16 | 16 | ||
17 | #include "todopluginwidget.h" | 17 | #include "todopluginwidget.h" |
18 | 18 | ||
19 | #include <qvaluelist.h> | ||
20 | #include <qtl.h> | ||
21 | #include <qstring.h> | ||
22 | #include <qscrollview.h> | ||
23 | #include <qobject.h> | ||
24 | #include <qlayout.h> | ||
25 | |||
26 | #include <qpe/config.h> | 19 | #include <qpe/config.h> |
27 | #include <qpe/timestring.h> | ||
28 | #include <qpe/qcopenvelope_qws.h> | 20 | #include <qpe/qcopenvelope_qws.h> |
29 | 21 | ||
30 | TodolistPluginWidget::TodolistPluginWidget( QWidget *parent, const char* name ) | 22 | TodolistPluginWidget::TodolistPluginWidget( QWidget *parent, const char* name ) |
31 | : QWidget( parent, name ) { | 23 | : QWidget( parent, name ) { |
32 | 24 | ||
33 | todo = 0l; | 25 | todo = 0l; |
34 | layoutTodo = 0l; | 26 | layoutTodo = 0l; |
35 | todoLabel = 0l; | 27 | todoLabel = 0l; |
36 | 28 | ||
37 | if ( todo ) { | 29 | if ( todo ) { |
38 | delete todo; | 30 | delete todo; |
39 | } | 31 | } |
40 | todo = new OTodoAccess(); | 32 | todo = new OTodoAccess(); |
41 | todo->load(); | 33 | todo->load(); |
42 | 34 | ||
43 | if ( layoutTodo ) { | 35 | if ( layoutTodo ) { |
44 | delete layoutTodo; | 36 | delete layoutTodo; |
45 | } | 37 | } |
46 | layoutTodo = new QVBoxLayout( this ); | 38 | layoutTodo = new QVBoxLayout( this ); |
47 | layoutTodo->setAutoAdd( true ); | 39 | layoutTodo->setAutoAdd( true ); |
48 | 40 | ||
49 | |||
50 | if ( todoLabel ) { | 41 | if ( todoLabel ) { |
51 | delete todoLabel; | 42 | delete todoLabel; |
52 | } | 43 | } |
53 | todoLabel = new OClickableLabel( this ); | 44 | todoLabel = new OClickableLabel( this ); |
54 | 45 | ||
55 | connect( todoLabel, SIGNAL( clicked() ), this, SLOT( startTodolist() ) ); | 46 | connect( todoLabel, SIGNAL( clicked() ), this, SLOT( startTodolist() ) ); |
56 | 47 | ||
57 | readConfig(); | 48 | readConfig(); |
58 | getTodo(); | 49 | getTodo(); |
59 | } | 50 | } |
60 | 51 | ||
61 | TodolistPluginWidget::~TodolistPluginWidget() { | 52 | TodolistPluginWidget::~TodolistPluginWidget() { |
62 | delete todo; | 53 | delete todo; |
63 | delete todoLabel; | 54 | delete todoLabel; |
64 | delete layoutTodo; | 55 | delete layoutTodo; |
65 | } | 56 | } |
66 | 57 | ||
67 | 58 | ||
68 | void TodolistPluginWidget::readConfig() { | 59 | void TodolistPluginWidget::readConfig() { |
69 | Config cfg( "todaytodoplugin" ); | 60 | Config cfg( "todaytodoplugin" ); |
70 | cfg.setGroup( "config" ); | 61 | cfg.setGroup( "config" ); |
71 | m_maxLinesTask = cfg.readNumEntry( "maxlinestask", 5 ); | 62 | m_maxLinesTask = cfg.readNumEntry( "maxlinestask", 5 ); |
72 | m_maxCharClip = cfg.readNumEntry( "maxcharclip", 38 ); | 63 | m_maxCharClip = cfg.readNumEntry( "maxcharclip", 38 ); |
73 | } | 64 | } |
74 | 65 | ||
75 | void TodolistPluginWidget:: refresh() { | 66 | void TodolistPluginWidget:: refresh() { |
76 | getTodo(); | 67 | getTodo(); |
77 | } | 68 | } |
78 | 69 | ||
79 | /** | 70 | /** |
80 | * Get the todos | 71 | * Get the todos |
81 | */ | 72 | */ |
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 @@ | |||
1 | /* | 1 | /* |
2 | * todopluginwidget.h | 2 | * todopluginwidget.h |
3 | * | 3 | * |
4 | * copyright : (c) 2002 by Maximilian Reiß | 4 | * copyright : (c) 2002, 2003 by Maximilian Reiß |
5 | * email : harlekin@handhelds.org | 5 | * email : harlekin@handhelds.org |
6 | * | 6 | * |
7 | */ | 7 | */ |
8 | /*************************************************************************** | 8 | /*************************************************************************** |
9 | * * | 9 | * * |
10 | * This program is free software; you can redistribute it and/or modify * | 10 | * This program is free software; you can redistribute it and/or modify * |
11 | * it under the terms of the GNU General Public License as published by * | 11 | * it under the terms of the GNU General Public License as published by * |
12 | * the Free Software Foundation; either version 2 of the License, or * | 12 | * the Free Software Foundation; either version 2 of the License, or * |
13 | * (at your option) any later version. * | 13 | * (at your option) any later version. * |
14 | * * | 14 | * * |
15 | ***************************************************************************/ | 15 | ***************************************************************************/ |
16 | 16 | ||
17 | #ifndef TODOLIST_PLUGIN_WIDGET_H | 17 | #ifndef TODOLIST_PLUGIN_WIDGET_H |
18 | #define TODOLIST_PLUGIN_WIDGET_H | 18 | #define TODOLIST_PLUGIN_WIDGET_H |
19 | 19 | ||
20 | #include <qstring.h> | ||
21 | #include <qwidget.h> | ||
22 | #include <qlayout.h> | 20 | #include <qlayout.h> |
23 | 21 | ||
24 | #include <opie/otodo.h> | ||
25 | #include <opie/otodoaccess.h> | 22 | #include <opie/otodoaccess.h> |
26 | #include <opie/oclickablelabel.h> | 23 | #include <opie/oclickablelabel.h> |
27 | 24 | ||
28 | 25 | ||
29 | class TodolistPluginWidget : public QWidget { | 26 | class TodolistPluginWidget : public QWidget { |
30 | 27 | ||
31 | Q_OBJECT | 28 | Q_OBJECT |
32 | 29 | ||
33 | public: | 30 | public: |
34 | TodolistPluginWidget( QWidget *parent, const char *name ); | 31 | TodolistPluginWidget( QWidget *parent, const char *name ); |
35 | ~TodolistPluginWidget(); | 32 | ~TodolistPluginWidget(); |
36 | 33 | ||
37 | void refresh(); | 34 | void refresh(); |
38 | 35 | ||
39 | protected slots: | 36 | protected slots: |
40 | void startTodolist(); | 37 | void startTodolist(); |
41 | 38 | ||
42 | private: | 39 | private: |
43 | OClickableLabel *todoLabel; | 40 | OClickableLabel *todoLabel; |
44 | QVBoxLayout* layoutTodo; | 41 | QVBoxLayout* layoutTodo; |
45 | 42 | ||
46 | OTodoAccess *todo; | 43 | OTodoAccess *todo; |
47 | OTodoAccess::List m_list; | 44 | OTodoAccess::List m_list; |
48 | OTodoAccess::List::Iterator m_it; | 45 | OTodoAccess::List::Iterator m_it; |
49 | 46 | ||
50 | void readConfig(); | 47 | void readConfig(); |
51 | void getTodo(); | 48 | void getTodo(); |
52 | int m_maxLinesTask; | 49 | int m_maxLinesTask; |
53 | int m_maxCharClip; | 50 | int m_maxCharClip; |
54 | }; | 51 | }; |
55 | 52 | ||
56 | #endif | 53 | #endif |