6 files changed, 34 insertions, 12 deletions
diff --git a/core/pim/today/plugins/datebook/datebookplugin.cpp b/core/pim/today/plugins/datebook/datebookplugin.cpp index f095478..4e75a13 100644 --- a/core/pim/today/plugins/datebook/datebookplugin.cpp +++ b/core/pim/today/plugins/datebook/datebookplugin.cpp | |||
@@ -1,53 +1,53 @@ | |||
1 | 1 | ||
2 | /* | 2 | /* |
3 | * datebookplugin.cpp | 3 | * datebookplugin.cpp |
4 | * | 4 | * |
5 | * copyright : (c) 2002 by Maximilian Reiß | 5 | * copyright : (c) 2002,2003 by Maximilian Reiß |
6 | * email : harlekin@handhelds.org | 6 | * email : harlekin@handhelds.org |
7 | * | 7 | * |
8 | */ | 8 | */ |
9 | /*************************************************************************** | 9 | /*************************************************************************** |
10 | * * | 10 | * * |
11 | * This program is free software; you can redistribute it and/or modify * | 11 | * This program is free software; you can redistribute it and/or modify * |
12 | * it under the terms of the GNU General Public License as published by * | 12 | * it under the terms of the GNU General Public License as published by * |
13 | * the Free Software Foundation; either version 2 of the License, or * | 13 | * the Free Software Foundation; either version 2 of the License, or * |
14 | * (at your option) any later version. * | 14 | * (at your option) any later version. * |
15 | * * | 15 | * * |
16 | ***************************************************************************/ | 16 | ***************************************************************************/ |
17 | 17 | ||
18 | 18 | ||
19 | 19 | ||
20 | #include "datebookevent.h" | 20 | #include "datebookevent.h" |
21 | #include "datebookplugin.h" | 21 | #include "datebookplugin.h" |
22 | #include "datebookpluginconfig.h" | 22 | #include "datebookpluginconfig.h" |
23 | 23 | ||
24 | 24 | ||
25 | DatebookPlugin::DatebookPlugin() { | 25 | DatebookPlugin::DatebookPlugin() { |
26 | } | 26 | } |
27 | 27 | ||
28 | DatebookPlugin::~DatebookPlugin() { | 28 | DatebookPlugin::~DatebookPlugin() { |
29 | delete (DatebookPluginWidget*)m_widget; | 29 | delete (DatebookPluginWidget*)m_widget; |
30 | } | 30 | } |
31 | 31 | ||
32 | QString DatebookPlugin::pluginName() const { | 32 | QString DatebookPlugin::pluginName() const { |
33 | return QObject::tr( "Datebook plugin"); | 33 | return QObject::tr( "Datebook plugin"); |
34 | } | 34 | } |
35 | 35 | ||
36 | double DatebookPlugin::versionNumber() const { | 36 | double DatebookPlugin::versionNumber() const { |
37 | return 1.0; | 37 | return 1.0; |
38 | } | 38 | } |
39 | 39 | ||
40 | QString DatebookPlugin::pixmapNameWidget() const { | 40 | QString DatebookPlugin::pixmapNameWidget() const { |
41 | return "DateBook"; | 41 | return "DateBook"; |
42 | } | 42 | } |
43 | 43 | ||
44 | QWidget* DatebookPlugin::widget( QWidget* wid ) { | 44 | QWidget* DatebookPlugin::widget( QWidget* wid ) { |
45 | if(!m_widget) { | 45 | if(!m_widget) { |
46 | m_widget = new DatebookPluginWidget( wid, "Datebook" ); | 46 | m_widget = new DatebookPluginWidget( wid, "Datebook" ); |
47 | } | 47 | } |
48 | return m_widget; | 48 | return m_widget; |
49 | } | 49 | } |
50 | 50 | ||
51 | QString DatebookPlugin::pixmapNameConfig() const { | 51 | QString DatebookPlugin::pixmapNameConfig() const { |
52 | return "DateBook"; | 52 | return "DateBook"; |
53 | } | 53 | } |
diff --git a/core/pim/today/plugins/datebook/datebookplugin.h b/core/pim/today/plugins/datebook/datebookplugin.h index eb7a401..db899e8 100644 --- a/core/pim/today/plugins/datebook/datebookplugin.h +++ b/core/pim/today/plugins/datebook/datebookplugin.h | |||
@@ -1,50 +1,48 @@ | |||
1 | /* | 1 | /* |
2 | * datebookplugin.h | 2 | * datebookplugin.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 DATEBOOK_PLUGIN_H | 17 | #ifndef DATEBOOK_PLUGIN_H |
18 | #define DATEBOOK_PLUGIN_H | 18 | #define DATEBOOK_PLUGIN_H |
19 | 19 | ||
20 | #include <qstring.h> | ||
21 | #include <qguardedptr.h> | 20 | #include <qguardedptr.h> |
22 | #include <qwidget.h> | ||
23 | 21 | ||
24 | #include <opie/oclickablelabel.h> | 22 | #include <opie/oclickablelabel.h> |
25 | #include <opie/todayplugininterface.h> | 23 | #include <opie/todayplugininterface.h> |
26 | 24 | ||
27 | #include "datebookpluginwidget.h" | 25 | #include "datebookpluginwidget.h" |
28 | 26 | ||
29 | class DatebookPlugin : public TodayPluginObject { | 27 | class DatebookPlugin : public TodayPluginObject { |
30 | 28 | ||
31 | public: | 29 | public: |
32 | DatebookPlugin(); | 30 | DatebookPlugin(); |
33 | ~DatebookPlugin(); | 31 | ~DatebookPlugin(); |
34 | 32 | ||
35 | QString pluginName() const; | 33 | QString pluginName() const; |
36 | double versionNumber() const; | 34 | double versionNumber() const; |
37 | QString pixmapNameWidget() const; | 35 | QString pixmapNameWidget() const; |
38 | QWidget* widget( QWidget *); | 36 | QWidget* widget( QWidget *); |
39 | QString pixmapNameConfig() const; | 37 | QString pixmapNameConfig() const; |
40 | TodayConfigWidget* configWidget( QWidget *); | 38 | TodayConfigWidget* configWidget( QWidget *); |
41 | QString appName() const; | 39 | QString appName() const; |
42 | bool excludeFromRefresh() const; | 40 | bool excludeFromRefresh() const; |
43 | void refresh(); | 41 | void refresh(); |
44 | 42 | ||
45 | private: | 43 | private: |
46 | QGuardedPtr<DatebookPluginWidget> m_widget; | 44 | QGuardedPtr<DatebookPluginWidget> m_widget; |
47 | }; | 45 | }; |
48 | 46 | ||
49 | 47 | ||
50 | #endif | 48 | #endif |
diff --git a/core/pim/today/plugins/datebook/datebookpluginconfig.cpp b/core/pim/today/plugins/datebook/datebookpluginconfig.cpp index 0fc38de..dc6dee9 100644 --- a/core/pim/today/plugins/datebook/datebookpluginconfig.cpp +++ b/core/pim/today/plugins/datebook/datebookpluginconfig.cpp | |||
@@ -1,56 +1,70 @@ | |||
1 | /* | ||
2 | * datebookpluginconfig.cpp | ||
3 | * | ||
4 | * copyright : (c) 2002,2003 by Maximilian Reiß | ||
5 | * email : harlekin@handhelds.org | ||
6 | * | ||
7 | */ | ||
8 | /*************************************************************************** | ||
9 | * * | ||
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 * | ||
12 | * the Free Software Foundation; either version 2 of the License, or * | ||
13 | * (at your option) any later version. * | ||
14 | * * | ||
15 | ***************************************************************************/ | ||
1 | 16 | ||
2 | 17 | ||
3 | #include "datebookpluginconfig.h" | 18 | #include "datebookpluginconfig.h" |
4 | 19 | ||
5 | #include <qpe/config.h> | 20 | #include <qpe/config.h> |
6 | 21 | ||
7 | #include <qlayout.h> | 22 | #include <qlayout.h> |
8 | #include <qtoolbutton.h> | ||
9 | #include <qlabel.h> | 23 | #include <qlabel.h> |
10 | #include <qhbox.h> | 24 | #include <qhbox.h> |
11 | #include <qwhatsthis.h> | 25 | #include <qwhatsthis.h> |
12 | #include <qvbox.h> | 26 | #include <qvbox.h> |
13 | 27 | ||
14 | DatebookPluginConfig::DatebookPluginConfig( QWidget* parent, const char* name) | 28 | DatebookPluginConfig::DatebookPluginConfig( QWidget* parent, const char* name) |
15 | : TodayConfigWidget( parent, name ) { | 29 | : TodayConfigWidget( parent, name ) { |
16 | 30 | ||
17 | QVBoxLayout * layout = new QVBoxLayout( this ); | 31 | QVBoxLayout * layout = new QVBoxLayout( this ); |
18 | layout->setMargin( 20 ); | 32 | layout->setMargin( 20 ); |
19 | 33 | ||
20 | QHBox *box1 = new QHBox( this ); | 34 | QHBox *box1 = new QHBox( this ); |
21 | QLabel* TextLabel4 = new QLabel( box1, "TextLabel4" ); | 35 | QLabel* TextLabel4 = new QLabel( box1, "TextLabel4" ); |
22 | TextLabel4->setText( tr( "Show location" ) ); | 36 | TextLabel4->setText( tr( "Show location" ) ); |
23 | CheckBox1 = new QCheckBox( box1, "CheckBox1" ); | 37 | CheckBox1 = new QCheckBox( box1, "CheckBox1" ); |
24 | QWhatsThis::add( CheckBox1 , tr( "Check this if the location of an appointment should be shown for each one" ) ); | 38 | QWhatsThis::add( CheckBox1 , tr( "Check this if the location of an appointment should be shown for each one" ) ); |
25 | 39 | ||
26 | QHBox *box2 = new QHBox( this ); | 40 | QHBox *box2 = new QHBox( this ); |
27 | QLabel* TextLabel5 = new QLabel( box2 , "TextLabel5" ); | 41 | QLabel* TextLabel5 = new QLabel( box2 , "TextLabel5" ); |
28 | TextLabel5->setText( tr( "Show notes" ) ); | 42 | TextLabel5->setText( tr( "Show notes" ) ); |
29 | CheckBox2 = new QCheckBox( box2, "CheckBox2" ); | 43 | CheckBox2 = new QCheckBox( box2, "CheckBox2" ); |
30 | QWhatsThis::add( CheckBox2 , tr( "Check this if the note attached to an appointment should be shown for each one" ) ); | 44 | QWhatsThis::add( CheckBox2 , tr( "Check this if the note attached to an appointment should be shown for each one" ) ); |
31 | 45 | ||
32 | QHBox *box3 = new QHBox( this ); | 46 | QHBox *box3 = new QHBox( this ); |
33 | QLabel* TextLabel6 = new QLabel( box3, "All Day"); | 47 | QLabel* TextLabel6 = new QLabel( box3, "All Day"); |
34 | TextLabel6->setText( tr( "Show only later\n appointments") ); | 48 | TextLabel6->setText( tr( "Show only later\n appointments") ); |
35 | CheckBox3 = new QCheckBox ( box3, "CheckBox3" ); | 49 | CheckBox3 = new QCheckBox ( box3, "CheckBox3" ); |
36 | QWhatsThis::add( CheckBox3 , tr( "Check this if only appointments later then current time should be shown" ) ); | 50 | QWhatsThis::add( CheckBox3 , tr( "Check this if only appointments later then current time should be shown" ) ); |
37 | 51 | ||
38 | 52 | ||
39 | 53 | ||
40 | QHBox *box4 = new QHBox( this ); | 54 | QHBox *box4 = new QHBox( this ); |
41 | QLabel *TextLabel3 = new QLabel( box4, "TextLabel3" ); | 55 | QLabel *TextLabel3 = new QLabel( box4, "TextLabel3" ); |
42 | TextLabel3->setText( tr( "How many \nappointment\n" | 56 | TextLabel3->setText( tr( "How many \nappointment\n" |
43 | "should be \nshown?" ) ); | 57 | "should be \nshown?" ) ); |
44 | SpinBox1 = new QSpinBox( box4, "SpinBox1" ); | 58 | SpinBox1 = new QSpinBox( box4, "SpinBox1" ); |
45 | QWhatsThis::add( SpinBox1 , tr( "How many appointments should be shown maximal. In chronical order" ) ); | 59 | QWhatsThis::add( SpinBox1 , tr( "How many appointments should be shown maximal. In chronical order" ) ); |
46 | SpinBox1->setMaxValue( 10 ); | 60 | SpinBox1->setMaxValue( 10 ); |
47 | SpinBox1->setValue( 5 ); | 61 | SpinBox1->setValue( 5 ); |
48 | 62 | ||
49 | 63 | ||
50 | QHBox *box5 = new QHBox( this ); | 64 | QHBox *box5 = new QHBox( this ); |
51 | QLabel *TextLabelDays = new QLabel( box5 ); | 65 | QLabel *TextLabelDays = new QLabel( box5 ); |
52 | TextLabelDays->setText( tr( "How many more days" ) ); | 66 | TextLabelDays->setText( tr( "How many more days" ) ); |
53 | SpinBox2 = new QSpinBox( box5, "SpinBox2" ); | 67 | SpinBox2 = new QSpinBox( box5, "SpinBox2" ); |
54 | QWhatsThis::add( SpinBox2 , tr( "How many more days should be in the range" ) ); | 68 | QWhatsThis::add( SpinBox2 , tr( "How many more days should be in the range" ) ); |
55 | SpinBox2->setMaxValue( 7 ); | 69 | SpinBox2->setMaxValue( 7 ); |
56 | SpinBox2->setSuffix( tr( " day(s)" ) ); | 70 | SpinBox2->setSuffix( tr( " day(s)" ) ); |
diff --git a/core/pim/today/plugins/datebook/datebookpluginconfig.h b/core/pim/today/plugins/datebook/datebookpluginconfig.h index 6c32ae9..be00aad 100644 --- a/core/pim/today/plugins/datebook/datebookpluginconfig.h +++ b/core/pim/today/plugins/datebook/datebookpluginconfig.h | |||
@@ -1,47 +1,62 @@ | |||
1 | /* | ||
2 | * datebookpluginconfig.h | ||
3 | * | ||
4 | * copyright : (c) 2002,2003 by Maximilian Reiß | ||
5 | * email : harlekin@handhelds.org | ||
6 | * | ||
7 | */ | ||
8 | /*************************************************************************** | ||
9 | * * | ||
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 * | ||
12 | * the Free Software Foundation; either version 2 of the License, or * | ||
13 | * (at your option) any later version. * | ||
14 | * * | ||
15 | ***************************************************************************/ | ||
1 | 16 | ||
2 | #ifndef DATEBOOK_PLUGIN_CONFIG_H | 17 | #ifndef DATEBOOK_PLUGIN_CONFIG_H |
3 | #define DATEBOOK_PLUGIN_CONFIG_H | 18 | #define DATEBOOK_PLUGIN_CONFIG_H |
4 | 19 | ||
5 | 20 | ||
6 | #include <qcheckbox.h> | 21 | #include <qcheckbox.h> |
7 | #include <qspinbox.h> | 22 | #include <qspinbox.h> |
8 | 23 | ||
9 | #include <opie/todayconfigwidget.h> | 24 | #include <opie/todayconfigwidget.h> |
10 | 25 | ||
11 | class DatebookPluginConfig : public TodayConfigWidget { | 26 | class DatebookPluginConfig : public TodayConfigWidget { |
12 | 27 | ||
13 | 28 | ||
14 | 29 | ||
15 | public: | 30 | public: |
16 | DatebookPluginConfig( QWidget *parent, const char *name ); | 31 | DatebookPluginConfig( QWidget *parent, const char *name ); |
17 | ~DatebookPluginConfig(); | 32 | ~DatebookPluginConfig(); |
18 | 33 | ||
19 | void writeConfig(); | 34 | void writeConfig(); |
20 | private: | 35 | private: |
21 | /** | 36 | /** |
22 | * if changed then save | 37 | * if changed then save |
23 | */ | 38 | */ |
24 | bool changed(); | 39 | bool changed(); |
25 | void readConfig(); | 40 | void readConfig(); |
26 | 41 | ||
27 | QCheckBox* CheckBox2; | 42 | QCheckBox* CheckBox2; |
28 | QCheckBox* CheckBox1; | 43 | QCheckBox* CheckBox1; |
29 | QCheckBox* CheckBox3; | 44 | QCheckBox* CheckBox3; |
30 | QSpinBox* SpinBox1; | 45 | QSpinBox* SpinBox1; |
31 | QSpinBox* SpinBox2; | 46 | QSpinBox* SpinBox2; |
32 | 47 | ||
33 | 48 | ||
34 | // how many lines should be showed in the datebook section | 49 | // how many lines should be showed in the datebook section |
35 | int m_max_lines_meet; | 50 | int m_max_lines_meet; |
36 | // If location is to be showed too, 1 to activate it. | 51 | // If location is to be showed too, 1 to activate it. |
37 | int m_show_location; | 52 | int m_show_location; |
38 | // if notes should be shown | 53 | // if notes should be shown |
39 | int m_show_notes; | 54 | int m_show_notes; |
40 | // should only later appointments be shown or all for the current day. | 55 | // should only later appointments be shown or all for the current day. |
41 | int m_only_later; | 56 | int m_only_later; |
42 | int m_more_days; | 57 | int m_more_days; |
43 | 58 | ||
44 | }; | 59 | }; |
45 | 60 | ||
46 | 61 | ||
47 | #endif | 62 | #endif |
diff --git a/core/pim/today/plugins/datebook/datebookpluginwidget.cpp b/core/pim/today/plugins/datebook/datebookpluginwidget.cpp index 97fb77e..896d41d 100644 --- a/core/pim/today/plugins/datebook/datebookpluginwidget.cpp +++ b/core/pim/today/plugins/datebook/datebookpluginwidget.cpp | |||
@@ -1,76 +1,73 @@ | |||
1 | /* | 1 | /* |
2 | * datebookpluginwidget.cpp | 2 | * datebookpluginwidget.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 | 17 | ||
18 | #include "datebookpluginwidget.h" | 18 | #include "datebookpluginwidget.h" |
19 | 19 | ||
20 | #include <qpe/timestring.h> | 20 | #include <qpe/timestring.h> |
21 | #include <qpe/config.h> | 21 | #include <qpe/config.h> |
22 | 22 | ||
23 | #include <qdatetime.h> | 23 | #include <qdatetime.h> |
24 | #include <qlabel.h> | 24 | #include <qlabel.h> |
25 | #include <qlayout.h> | ||
26 | #include <qtl.h> | 25 | #include <qtl.h> |
27 | #include <qscrollview.h> | ||
28 | #include <qtimer.h> | ||
29 | 26 | ||
30 | DatebookPluginWidget::DatebookPluginWidget( QWidget *parent, const char* name ) | 27 | DatebookPluginWidget::DatebookPluginWidget( QWidget *parent, const char* name ) |
31 | : QWidget(parent, name ) { | 28 | : QWidget(parent, name ) { |
32 | 29 | ||
33 | db = 0l; | 30 | db = 0l; |
34 | m_layoutDates = 0l; | 31 | m_layoutDates = 0l; |
35 | 32 | ||
36 | if ( db ) { | 33 | if ( db ) { |
37 | delete db; | 34 | delete db; |
38 | } | 35 | } |
39 | db = new DateBookDB; | 36 | db = new DateBookDB; |
40 | 37 | ||
41 | if ( m_layoutDates ) { | 38 | if ( m_layoutDates ) { |
42 | delete m_layoutDates; | 39 | delete m_layoutDates; |
43 | } | 40 | } |
44 | m_layoutDates = new QVBoxLayout( this ); | 41 | m_layoutDates = new QVBoxLayout( this ); |
45 | m_layoutDates->setAutoAdd( true ); | 42 | m_layoutDates->setAutoAdd( true ); |
46 | 43 | ||
47 | m_eventsList.setAutoDelete( true ); | 44 | m_eventsList.setAutoDelete( true ); |
48 | 45 | ||
49 | readConfig(); | 46 | readConfig(); |
50 | getDates(); | 47 | getDates(); |
51 | } | 48 | } |
52 | 49 | ||
53 | DatebookPluginWidget::~DatebookPluginWidget() { | 50 | DatebookPluginWidget::~DatebookPluginWidget() { |
54 | delete db; | 51 | delete db; |
55 | delete m_layoutDates; | 52 | delete m_layoutDates; |
56 | } | 53 | } |
57 | 54 | ||
58 | 55 | ||
59 | void DatebookPluginWidget::readConfig() { | 56 | void DatebookPluginWidget::readConfig() { |
60 | Config cfg( "todaydatebookplugin" ); | 57 | Config cfg( "todaydatebookplugin" ); |
61 | cfg.setGroup( "config" ); | 58 | cfg.setGroup( "config" ); |
62 | m_max_lines_meet = cfg.readNumEntry( "maxlinesmeet", 5 ); | 59 | m_max_lines_meet = cfg.readNumEntry( "maxlinesmeet", 5 ); |
63 | m_show_location = cfg.readNumEntry( "showlocation", 1 ); | 60 | m_show_location = cfg.readNumEntry( "showlocation", 1 ); |
64 | m_show_notes = cfg.readNumEntry( "shownotes", 0 ); | 61 | m_show_notes = cfg.readNumEntry( "shownotes", 0 ); |
65 | m_onlyLater = cfg.readNumEntry( "onlylater", 1 ); | 62 | m_onlyLater = cfg.readNumEntry( "onlylater", 1 ); |
66 | m_moreDays = cfg.readNumEntry( "moredays", 0 ); | 63 | m_moreDays = cfg.readNumEntry( "moredays", 0 ); |
67 | } | 64 | } |
68 | 65 | ||
69 | void DatebookPluginWidget::refresh() { | 66 | void DatebookPluginWidget::refresh() { |
70 | m_eventsList.clear(); | 67 | m_eventsList.clear(); |
71 | getDates(); | 68 | getDates(); |
72 | } | 69 | } |
73 | 70 | ||
74 | /** | 71 | /** |
75 | * Get all events that are in the datebook xml file for today | 72 | * Get all events that are in the datebook xml file for today |
76 | */ | 73 | */ |
diff --git a/core/pim/today/plugins/datebook/datebookpluginwidget.h b/core/pim/today/plugins/datebook/datebookpluginwidget.h index e10f059..35d43cd 100644 --- a/core/pim/today/plugins/datebook/datebookpluginwidget.h +++ b/core/pim/today/plugins/datebook/datebookpluginwidget.h | |||
@@ -1,60 +1,58 @@ | |||
1 | /* | 1 | /* |
2 | * datebookpluginwidget.h | 2 | * datebookpluginwidget.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 DATEBOOK_PLUGIN_WIDGET_H | 17 | #ifndef DATEBOOK_PLUGIN_WIDGET_H |
18 | #define DATEBOOK_PLUGIN_WIDGET_H | 18 | #define DATEBOOK_PLUGIN_WIDGET_H |
19 | 19 | ||
20 | #include <qstring.h> | ||
21 | #include <qwidget.h> | ||
22 | #include <qlayout.h> | 20 | #include <qlayout.h> |
23 | #include <qguardedptr.h> | 21 | #include <qguardedptr.h> |
24 | #include <qlist.h> | 22 | #include <qlist.h> |
25 | 23 | ||
26 | #include <qpe/datebookdb.h> | 24 | #include <qpe/datebookdb.h> |
27 | #include <opie/oclickablelabel.h> | 25 | #include <opie/oclickablelabel.h> |
28 | 26 | ||
29 | #include "datebookevent.h" | 27 | #include "datebookevent.h" |
30 | 28 | ||
31 | class DatebookPluginWidget : public QWidget { | 29 | class DatebookPluginWidget : public QWidget { |
32 | 30 | ||
33 | Q_OBJECT | 31 | Q_OBJECT |
34 | 32 | ||
35 | public: | 33 | public: |
36 | DatebookPluginWidget( QWidget *parent, const char *name ); | 34 | DatebookPluginWidget( QWidget *parent, const char *name ); |
37 | ~DatebookPluginWidget(); | 35 | ~DatebookPluginWidget(); |
38 | void refresh(); | 36 | void refresh(); |
39 | 37 | ||
40 | private: | 38 | private: |
41 | DateBookDB* db; | 39 | DateBookDB* db; |
42 | QGuardedPtr<QVBoxLayout> m_layoutDates; | 40 | QGuardedPtr<QVBoxLayout> m_layoutDates; |
43 | QList<QWidget> m_eventsList; | 41 | QList<QWidget> m_eventsList; |
44 | void readConfig(); | 42 | void readConfig(); |
45 | void getDates(); | 43 | void getDates(); |
46 | 44 | ||
47 | 45 | ||
48 | // how many lines should be showed in the datebook section | 46 | // how many lines should be showed in the datebook section |
49 | int m_max_lines_meet; | 47 | int m_max_lines_meet; |
50 | // If location is to be showed too, 1 to activate it. | 48 | // If location is to be showed too, 1 to activate it. |
51 | bool m_show_location; | 49 | bool m_show_location; |
52 | // if notes should be shown | 50 | // if notes should be shown |
53 | bool m_show_notes; | 51 | bool m_show_notes; |
54 | // should only later appointments be shown or all for the current day. | 52 | // should only later appointments be shown or all for the current day. |
55 | bool m_onlyLater; | 53 | bool m_onlyLater; |
56 | int m_moreDays; | 54 | int m_moreDays; |
57 | 55 | ||
58 | }; | 56 | }; |
59 | 57 | ||
60 | #endif | 58 | #endif |