author | llornkcor <llornkcor> | 2003-11-05 10:50:43 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2003-11-05 10:50:43 (UTC) |
commit | 7f271d89922254226280f039ae53c5fee63ef94d (patch) (unidiff) | |
tree | 796b3b98bc7978bf460181d31032c78c0ea5bc51 | |
parent | 8ae3f2f96308505b3a02f5acfedfd45a01fefe1c (diff) | |
download | opie-7f271d89922254226280f039ae53c5fee63ef94d.zip opie-7f271d89922254226280f039ae53c5fee63ef94d.tar.gz opie-7f271d89922254226280f039ae53c5fee63ef94d.tar.bz2 |
fix compile. probably wont work. who knows.
7 files changed, 385 insertions, 86 deletions
diff --git a/core/pim/today/plugins/datebook/datebook.pro b/core/pim/today/plugins/datebook/datebook.pro index 2139f63..1f75964 100644 --- a/core/pim/today/plugins/datebook/datebook.pro +++ b/core/pim/today/plugins/datebook/datebook.pro | |||
@@ -1,39 +1,40 @@ | |||
1 | TEMPLATE = lib | 1 | TEMPLATE = lib |
2 | CONFIG -= moc | 2 | CONFIG -= moc |
3 | CONFIG += qt plugin release | 3 | CONFIG += qt release |
4 | # Input | 4 | # Input |
5 | HEADERS = datebookplugin.h datebookpluginimpl.h datebookpluginconfig.h \ | 5 | HEADERS = datebookplugin.h datebookpluginimpl.h datebookpluginconfig.h \ |
6 | datebookevent.h datebookpluginwidget.h | 6 | datebookevent.h datebookpluginwidget.h |
7 | SOURCES = datebookplugin.cpp datebookpluginimpl.cpp datebookpluginconfig.cpp \ | 7 | SOURCES = datebookplugin.cpp datebookpluginimpl.cpp datebookpluginconfig.cpp \ |
8 | datebookevent.cpp datebookpluginwidget.cpp | 8 | datebookevent.cpp datebookpluginwidget.cpp |
9 | INTERFACES = datebookpluginconfigbase.ui | ||
9 | 10 | ||
10 | INCLUDEPATH += $(OPIEDIR)/include \ | 11 | INCLUDEPATH += $(OPIEDIR)/include \ |
11 | ../ ../library | 12 | ../ ../library |
12 | DEPENDPATH += $(OPIEDIR)/include \ | 13 | DEPENDPATH += $(OPIEDIR)/include \ |
13 | ../ ../library | 14 | ../ ../library |
14 | 15 | ||
15 | LIBS+= -lqpe -lopie | 16 | LIBS+= -lqpe -lopie |
16 | 17 | ||
17 | DESTDIR = $(OPIEDIR)/plugins/today | 18 | DESTDIR = $(OPIEDIR)/plugins/today |
18 | TARGET = todaydatebookplugin | 19 | TARGET = todaydatebookplugin |
19 | 20 | ||
20 | TRANSLATIONS = ../../../../../i18n/de/libtodaydatebookplugin.ts \ | 21 | TRANSLATIONS = ../../../../../i18n/de/libtodaydatebookplugin.ts \ |
21 | ../../../../../i18n/nl/libtodaydatebookplugin.ts \ | 22 | ../../../../../i18n/nl/libtodaydatebookplugin.ts \ |
22 | ../../../../../i18n/xx/libtodaydatebookplugin.ts \ | 23 | ../../../../../i18n/xx/libtodaydatebookplugin.ts \ |
23 | ../../../../../i18n/en/libtodaydatebookplugin.ts \ | 24 | ../../../../../i18n/en/libtodaydatebookplugin.ts \ |
24 | ../../../../../i18n/es/libtodaydatebookplugin.ts \ | 25 | ../../../../../i18n/es/libtodaydatebookplugin.ts \ |
25 | ../../../../../i18n/fr/libtodaydatebookplugin.ts \ | 26 | ../../../../../i18n/fr/libtodaydatebookplugin.ts \ |
26 | ../../../../../i18n/hu/libtodaydatebookplugin.ts \ | 27 | ../../../../../i18n/hu/libtodaydatebookplugin.ts \ |
27 | ../../../../../i18n/ja/libtodaydatebookplugin.ts \ | 28 | ../../../../../i18n/ja/libtodaydatebookplugin.ts \ |
28 | ../../../../../i18n/ko/libtodaydatebookplugin.ts \ | 29 | ../../../../../i18n/ko/libtodaydatebookplugin.ts \ |
29 | ../../../../../i18n/no/libtodaydatebookplugin.ts \ | 30 | ../../../../../i18n/no/libtodaydatebookplugin.ts \ |
30 | ../../../../../i18n/pl/libtodaydatebookplugin.ts \ | 31 | ../../../../../i18n/pl/libtodaydatebookplugin.ts \ |
31 | ../../../../../i18n/pt/libtodaydatebookplugin.ts \ | 32 | ../../../../../i18n/pt/libtodaydatebookplugin.ts \ |
32 | ../../../../../i18n/pt_BR/libtodaydatebookplugin.ts \ | 33 | ../../../../../i18n/pt_BR/libtodaydatebookplugin.ts \ |
33 | ../../../../../i18n/sl/libtodaydatebookplugin.ts \ | 34 | ../../../../../i18n/sl/libtodaydatebookplugin.ts \ |
34 | ../../../../../i18n/zh_CN/libtodaydatebookplugin.ts \ | 35 | ../../../../../i18n/zh_CN/libtodaydatebookplugin.ts \ |
35 | ../../../../../i18n/zh_TW/libtodaydatebookplugin.ts \ | 36 | ../../../../../i18n/zh_TW/libtodaydatebookplugin.ts \ |
36 | ../../../../../i18n/it/libtodaydatebookplugin.ts \ | 37 | ../../../../../i18n/it/libtodaydatebookplugin.ts \ |
37 | ../../../../../i18n/da/libtodaydatebookplugin.ts | 38 | ../../../../../i18n/da/libtodaydatebookplugin.ts |
38 | 39 | ||
39 | include ( $(OPIEDIR)/include.pro ) | 40 | include ( $(OPIEDIR)/include.pro ) |
diff --git a/core/pim/today/plugins/datebook/datebookpluginconfig.cpp b/core/pim/today/plugins/datebook/datebookpluginconfig.cpp index 0477122..54f820b 100644 --- a/core/pim/today/plugins/datebook/datebookpluginconfig.cpp +++ b/core/pim/today/plugins/datebook/datebookpluginconfig.cpp | |||
@@ -1,117 +1,77 @@ | |||
1 | /* | 1 | /* |
2 | * datebookpluginconfig.cpp | 2 | * datebookpluginconfig.cpp |
3 | * | 3 | * |
4 | * copyright : (c) 2002,2003 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 "datebookpluginconfig.h" | 18 | #include "datebookpluginconfig.h" |
19 | 19 | ||
20 | #include <qpe/config.h> | 20 | #include <qpe/config.h> |
21 | 21 | ||
22 | #include <qlayout.h> | 22 | #include <qlayout.h> |
23 | #include <qlabel.h> | 23 | #include <qlabel.h> |
24 | #include <qhbox.h> | 24 | #include <qhbox.h> |
25 | #include <qwhatsthis.h> | 25 | #include <qwhatsthis.h> |
26 | #include <qvbox.h> | 26 | #include <qvbox.h> |
27 | 27 | ||
28 | DatebookPluginConfig::DatebookPluginConfig( QWidget* parent, const char* name) | 28 | DatebookPluginConfig::DatebookPluginConfig( QWidget* parent, const char* name) |
29 | : TodayConfigWidget( parent, name ) { | 29 | : TodayConfigWidget( parent, name ) { |
30 | 30 | ||
31 | QVBoxLayout * layout = new QVBoxLayout( this ); | 31 | QVBoxLayout *layout = new QVBoxLayout( this ); |
32 | layout->setMargin( 20 ); | ||
33 | 32 | ||
34 | QHBox *box1 = new QHBox( this ); | 33 | m_gui = new DatebookPluginConfigBase( this ); |
35 | QLabel* TextLabel4 = new QLabel( box1, "TextLabel4" ); | ||
36 | TextLabel4->setText( tr( "Show location" ) ); | ||
37 | CheckBox1 = new QCheckBox( box1, "CheckBox1" ); | ||
38 | QWhatsThis::add( CheckBox1 , tr( "Check this if the location of an appointment should be shown for each one" ) ); | ||
39 | 34 | ||
40 | QHBox *box2 = new QHBox( this ); | 35 | layout->addWidget( m_gui ); |
41 | QLabel* TextLabel5 = new QLabel( box2 , "TextLabel5" ); | ||
42 | TextLabel5->setText( tr( "Show notes" ) ); | ||
43 | CheckBox2 = new QCheckBox( box2, "CheckBox2" ); | ||
44 | QWhatsThis::add( CheckBox2 , tr( "Check this if the note attached to an appointment should be shown for each one" ) ); | ||
45 | |||
46 | QHBox *box3 = new QHBox( this ); | ||
47 | QLabel* TextLabel6 = new QLabel( box3, "All Day"); | ||
48 | TextLabel6->setText( tr( "Show only later\n appointments") ); | ||
49 | CheckBox3 = new QCheckBox ( box3, "CheckBox3" ); | ||
50 | QWhatsThis::add( CheckBox3 , tr( "Check this if only appointments later then current time should be shown" ) ); | ||
51 | |||
52 | |||
53 | |||
54 | QHBox *box4 = new QHBox( this ); | ||
55 | QLabel *TextLabel3 = new QLabel( box4, "TextLabel3" ); | ||
56 | TextLabel3->setText( tr( "How many \nappointment\n" | ||
57 | "should be \nshown?" ) ); | ||
58 | SpinBox1 = new QSpinBox( box4, "SpinBox1" ); | ||
59 | QWhatsThis::add( SpinBox1 , tr( "How many appointments should be shown maximal. In chronical order" ) ); | ||
60 | SpinBox1->setMaxValue( 10 ); | ||
61 | SpinBox1->setValue( 5 ); | ||
62 | |||
63 | |||
64 | QHBox *box5 = new QHBox( this ); | ||
65 | QLabel *TextLabelDays = new QLabel( box5 ); | ||
66 | TextLabelDays->setText( tr( "How many more days" ) ); | ||
67 | SpinBox2 = new QSpinBox( box5, "SpinBox2" ); | ||
68 | QWhatsThis::add( SpinBox2 , tr( "How many more days should be in the range" ) ); | ||
69 | SpinBox2->setMaxValue( 21 ); | ||
70 | SpinBox2->setSuffix( tr( " day(s)" ) ); | ||
71 | SpinBox2->setSpecialValueText ( tr("only today") ); | ||
72 | |||
73 | layout->addWidget( box1 ); | ||
74 | layout->addWidget( box2 ); | ||
75 | layout->addWidget( box3 ); | ||
76 | layout->addWidget( box4 ); | ||
77 | layout->addWidget( box5 ); | ||
78 | 36 | ||
79 | readConfig(); | 37 | readConfig(); |
80 | } | 38 | } |
81 | 39 | ||
82 | void DatebookPluginConfig::readConfig() { | 40 | void DatebookPluginConfig::readConfig() { |
83 | Config cfg( "todaydatebookplugin" ); | 41 | Config cfg( "todaydatebookplugin" ); |
84 | cfg.setGroup( "config" ); | 42 | cfg.setGroup( "config" ); |
85 | 43 | ||
86 | m_max_lines_meet = cfg.readNumEntry( "maxlinesmeet", 5 ); | 44 | m_max_lines_meet = cfg.readNumEntry( "maxlinesmeet", 5 ); |
87 | SpinBox1->setValue( m_max_lines_meet ); | 45 | m_gui->SpinBox1->setValue( m_max_lines_meet ); |
88 | m_show_location = cfg.readNumEntry( "showlocation", 1 ); | 46 | m_show_location = cfg.readNumEntry( "showlocation", 1 ); |
89 | CheckBox1->setChecked( m_show_location ); | 47 | m_gui->CheckBox1->setChecked( m_show_location ); |
90 | m_show_notes = cfg.readNumEntry( "shownotes", 0 ); | 48 | m_show_notes = cfg.readNumEntry( "shownotes", 0 ); |
91 | CheckBox2->setChecked( m_show_notes ); | 49 | m_gui->CheckBox2->setChecked( m_show_notes ); |
92 | m_only_later = cfg.readNumEntry( "onlylater", 1 ); | 50 | m_only_later = cfg.readNumEntry( "onlylater", 1 ); |
93 | CheckBox3->setChecked( m_only_later ); | 51 | m_gui->CheckBox4->setChecked( cfg.readNumEntry( "timeextraline", 1 ) ); |
52 | m_gui->CheckBox3->setChecked( m_only_later ); | ||
94 | m_more_days = cfg.readNumEntry( "moredays", 0 ); | 53 | m_more_days = cfg.readNumEntry( "moredays", 0 ); |
95 | SpinBox2->setValue( m_more_days ); | 54 | m_gui->SpinBox2->setValue( m_more_days ); |
96 | } | 55 | } |
97 | 56 | ||
98 | 57 | ||
99 | void DatebookPluginConfig::writeConfig() { | 58 | void DatebookPluginConfig::writeConfig() { |
100 | Config cfg( "todaydatebookplugin" ); | 59 | Config cfg( "todaydatebookplugin" ); |
101 | cfg.setGroup( "config" ); | 60 | cfg.setGroup( "config" ); |
102 | 61 | ||
103 | m_max_lines_meet = SpinBox1->value(); | 62 | m_max_lines_meet = m_gui->SpinBox1->value(); |
104 | cfg.writeEntry( "maxlinesmeet", m_max_lines_meet); | 63 | cfg.writeEntry( "maxlinesmeet", m_max_lines_meet); |
105 | m_show_location = CheckBox1->isChecked(); | 64 | m_show_location = m_gui->CheckBox1->isChecked(); |
106 | cfg.writeEntry( "showlocation", m_show_location); | 65 | cfg.writeEntry( "showlocation", m_show_location); |
107 | m_show_notes = CheckBox2->isChecked(); | 66 | m_show_notes = m_gui->CheckBox2->isChecked(); |
108 | cfg.writeEntry( "shownotes", m_show_notes ); | 67 | cfg.writeEntry( "shownotes", m_show_notes ); |
109 | m_only_later = CheckBox3->isChecked(); | 68 | m_only_later = m_gui->CheckBox3->isChecked(); |
69 | cfg.writeEntry( "timeextraline", m_gui->CheckBox4->isChecked() ); | ||
110 | cfg.writeEntry( "onlylater", m_only_later ); | 70 | cfg.writeEntry( "onlylater", m_only_later ); |
111 | m_more_days = SpinBox2->value(); | 71 | m_more_days = m_gui->SpinBox2->value(); |
112 | cfg.writeEntry( "moredays", m_more_days ); | 72 | cfg.writeEntry( "moredays", m_more_days ); |
113 | cfg.write(); | 73 | cfg.write(); |
114 | } | 74 | } |
115 | 75 | ||
116 | DatebookPluginConfig::~DatebookPluginConfig() { | 76 | DatebookPluginConfig::~DatebookPluginConfig() { |
117 | } | 77 | } |
diff --git a/core/pim/today/plugins/datebook/datebookpluginconfigbase.ui b/core/pim/today/plugins/datebook/datebookpluginconfigbase.ui new file mode 100644 index 0000000..943e8ec --- a/dev/null +++ b/core/pim/today/plugins/datebook/datebookpluginconfigbase.ui | |||
@@ -0,0 +1,218 @@ | |||
1 | <!DOCTYPE UI><UI> | ||
2 | <class>DatebookPluginConfigBase</class> | ||
3 | <widget> | ||
4 | <class>QWidget</class> | ||
5 | <property stdset="1"> | ||
6 | <name>name</name> | ||
7 | <cstring>DatebookPluginConfigBase</cstring> | ||
8 | </property> | ||
9 | <property stdset="1"> | ||
10 | <name>geometry</name> | ||
11 | <rect> | ||
12 | <x>0</x> | ||
13 | <y>0</y> | ||
14 | <width>228</width> | ||
15 | <height>267</height> | ||
16 | </rect> | ||
17 | </property> | ||
18 | <property stdset="1"> | ||
19 | <name>caption</name> | ||
20 | <string>DatebookPluginConfigBase</string> | ||
21 | </property> | ||
22 | <property> | ||
23 | <name>whatsThis</name> | ||
24 | <string></string> | ||
25 | </property> | ||
26 | <vbox> | ||
27 | <property stdset="1"> | ||
28 | <name>margin</name> | ||
29 | <number>11</number> | ||
30 | </property> | ||
31 | <property stdset="1"> | ||
32 | <name>spacing</name> | ||
33 | <number>6</number> | ||
34 | </property> | ||
35 | <widget> | ||
36 | <class>QCheckBox</class> | ||
37 | <property stdset="1"> | ||
38 | <name>name</name> | ||
39 | <cstring>CheckBox1</cstring> | ||
40 | </property> | ||
41 | <property stdset="1"> | ||
42 | <name>text</name> | ||
43 | <string>Show location</string> | ||
44 | </property> | ||
45 | <property> | ||
46 | <name>whatsThis</name> | ||
47 | <string>Check this if the location of an appointment should be shown for each one</string> | ||
48 | </property> | ||
49 | </widget> | ||
50 | <widget> | ||
51 | <class>QCheckBox</class> | ||
52 | <property stdset="1"> | ||
53 | <name>name</name> | ||
54 | <cstring>CheckBox2</cstring> | ||
55 | </property> | ||
56 | <property stdset="1"> | ||
57 | <name>text</name> | ||
58 | <string>Show notes</string> | ||
59 | </property> | ||
60 | <property> | ||
61 | <name>whatsThis</name> | ||
62 | <string>Check this if the note attached to an appointment should be shown for each one</string> | ||
63 | </property> | ||
64 | </widget> | ||
65 | <widget> | ||
66 | <class>QCheckBox</class> | ||
67 | <property stdset="1"> | ||
68 | <name>name</name> | ||
69 | <cstring>CheckBox3</cstring> | ||
70 | </property> | ||
71 | <property stdset="1"> | ||
72 | <name>text</name> | ||
73 | <string>Show only later appointments</string> | ||
74 | </property> | ||
75 | <property> | ||
76 | <name>whatsThis</name> | ||
77 | <string>Check this if only appointments later then current time should be shown</string> | ||
78 | </property> | ||
79 | </widget> | ||
80 | <widget> | ||
81 | <class>QCheckBox</class> | ||
82 | <property stdset="1"> | ||
83 | <name>name</name> | ||
84 | <cstring>CheckBox4</cstring> | ||
85 | </property> | ||
86 | <property stdset="1"> | ||
87 | <name>text</name> | ||
88 | <string>Show time in extra line</string> | ||
89 | </property> | ||
90 | </widget> | ||
91 | <widget> | ||
92 | <class>QLayoutWidget</class> | ||
93 | <property stdset="1"> | ||
94 | <name>name</name> | ||
95 | <cstring>Layout3</cstring> | ||
96 | </property> | ||
97 | <hbox> | ||
98 | <property stdset="1"> | ||
99 | <name>margin</name> | ||
100 | <number>0</number> | ||
101 | </property> | ||
102 | <property stdset="1"> | ||
103 | <name>spacing</name> | ||
104 | <number>6</number> | ||
105 | </property> | ||
106 | <widget> | ||
107 | <class>QSpinBox</class> | ||
108 | <property stdset="1"> | ||
109 | <name>name</name> | ||
110 | <cstring>SpinBox1</cstring> | ||
111 | </property> | ||
112 | <property stdset="1"> | ||
113 | <name>maxValue</name> | ||
114 | <number>10</number> | ||
115 | </property> | ||
116 | <property> | ||
117 | <name>whatsThis</name> | ||
118 | <string>How many appointments should be shown maximal. In chronical order</string> | ||
119 | </property> | ||
120 | </widget> | ||
121 | <widget> | ||
122 | <class>QLabel</class> | ||
123 | <property stdset="1"> | ||
124 | <name>name</name> | ||
125 | <cstring>TextLabel1</cstring> | ||
126 | </property> | ||
127 | <property stdset="1"> | ||
128 | <name>text</name> | ||
129 | <string>How many appointment should be shown?</string> | ||
130 | </property> | ||
131 | <property stdset="1"> | ||
132 | <name>alignment</name> | ||
133 | <set>WordBreak|AlignVCenter|AlignLeft</set> | ||
134 | </property> | ||
135 | <property> | ||
136 | <name>wordwrap</name> | ||
137 | </property> | ||
138 | </widget> | ||
139 | </hbox> | ||
140 | </widget> | ||
141 | <widget> | ||
142 | <class>QLayoutWidget</class> | ||
143 | <property stdset="1"> | ||
144 | <name>name</name> | ||
145 | <cstring>Layout2</cstring> | ||
146 | </property> | ||
147 | <hbox> | ||
148 | <property stdset="1"> | ||
149 | <name>margin</name> | ||
150 | <number>0</number> | ||
151 | </property> | ||
152 | <property stdset="1"> | ||
153 | <name>spacing</name> | ||
154 | <number>6</number> | ||
155 | </property> | ||
156 | <widget> | ||
157 | <class>QSpinBox</class> | ||
158 | <property stdset="1"> | ||
159 | <name>name</name> | ||
160 | <cstring>SpinBox2</cstring> | ||
161 | </property> | ||
162 | <property stdset="1"> | ||
163 | <name>specialValueText</name> | ||
164 | <string>only today</string> | ||
165 | </property> | ||
166 | <property stdset="1"> | ||
167 | <name>maxValue</name> | ||
168 | <number>21</number> | ||
169 | </property> | ||
170 | <property> | ||
171 | <name>whatsThis</name> | ||
172 | <string>How many more days should be in the range</string> | ||
173 | </property> | ||
174 | </widget> | ||
175 | <widget> | ||
176 | <class>QLabel</class> | ||
177 | <property stdset="1"> | ||
178 | <name>name</name> | ||
179 | <cstring>TextLabel2</cstring> | ||
180 | </property> | ||
181 | <property stdset="1"> | ||
182 | <name>text</name> | ||
183 | <string>How many more days</string> | ||
184 | </property> | ||
185 | <property stdset="1"> | ||
186 | <name>alignment</name> | ||
187 | <set>WordBreak|AlignVCenter|AlignLeft</set> | ||
188 | </property> | ||
189 | <property> | ||
190 | <name>wordwrap</name> | ||
191 | </property> | ||
192 | </widget> | ||
193 | </hbox> | ||
194 | </widget> | ||
195 | <spacer> | ||
196 | <property> | ||
197 | <name>name</name> | ||
198 | <cstring>Spacer2</cstring> | ||
199 | </property> | ||
200 | <property stdset="1"> | ||
201 | <name>orientation</name> | ||
202 | <enum>Vertical</enum> | ||
203 | </property> | ||
204 | <property stdset="1"> | ||
205 | <name>sizeType</name> | ||
206 | <enum>Expanding</enum> | ||
207 | </property> | ||
208 | <property> | ||
209 | <name>sizeHint</name> | ||
210 | <size> | ||
211 | <width>20</width> | ||
212 | <height>20</height> | ||
213 | </size> | ||
214 | </property> | ||
215 | </spacer> | ||
216 | </vbox> | ||
217 | </widget> | ||
218 | </UI> | ||
diff --git a/core/pim/today/plugins/todolist/todolist.pro b/core/pim/today/plugins/todolist/todolist.pro index c8730bb..6a63f4e 100644 --- a/core/pim/today/plugins/todolist/todolist.pro +++ b/core/pim/today/plugins/todolist/todolist.pro | |||
@@ -1,40 +1,41 @@ | |||
1 | TEMPLATE = lib | 1 | TEMPLATE = lib |
2 | CONFIG -= moc | 2 | CONFIG -= moc |
3 | CONFIG += qt plugin release | 3 | CONFIG += qt release |
4 | 4 | ||
5 | # Input | 5 | # Input |
6 | HEADERS = todoplugin.h todopluginimpl.h todopluginconfig.h \ | 6 | HEADERS = todoplugin.h todopluginimpl.h todopluginconfig.h \ |
7 | todopluginwidget.h | 7 | todopluginwidget.h |
8 | SOURCES = todoplugin.cpp todopluginimpl.cpp todopluginconfig.cpp \ | 8 | SOURCES = todoplugin.cpp todopluginimpl.cpp todopluginconfig.cpp \ |
9 | todopluginwidget.cpp | 9 | todopluginwidget.cpp |
10 | INTERFACES= todopluginconfigbase.ui | ||
10 | 11 | ||
11 | INCLUDEPATH += $(OPIEDIR)/include \ | 12 | INCLUDEPATH += $(OPIEDIR)/include \ |
12 | ../ ../library | 13 | ../ ../library |
13 | DEPENDPATH += $(OPIEDIR)/include \ | 14 | DEPENDPATH += $(OPIEDIR)/include \ |
14 | ../ ../library | 15 | ../ ../library |
15 | 16 | ||
16 | LIBS+= -lqpe -lopie | 17 | LIBS+= -lqpe -lopie |
17 | 18 | ||
18 | DESTDIR = $(OPIEDIR)/plugins/today | 19 | DESTDIR = $(OPIEDIR)/plugins/today |
19 | TARGET = todaytodolistplugin | 20 | TARGET = todaytodolistplugin |
20 | 21 | ||
21 | TRANSLATIONS = ../../../../../i18n/de/libtodaytodolistplugin.ts \ | 22 | TRANSLATIONS = ../../../../../i18n/de/libtodaytodolistplugin.ts \ |
22 | ../../../../../i18n/nl/libtodaytodolistplugin.ts \ | 23 | ../../../../../i18n/nl/libtodaytodolistplugin.ts \ |
23 | ../../../../../i18n/xx/libtodaytodolistplugin.ts \ | 24 | ../../../../../i18n/xx/libtodaytodolistplugin.ts \ |
24 | ../../../../../i18n/en/libtodaytodolistplugin.ts \ | 25 | ../../../../../i18n/en/libtodaytodolistplugin.ts \ |
25 | ../../../../../i18n/es/libtodaytodolistplugin.ts \ | 26 | ../../../../../i18n/es/libtodaytodolistplugin.ts \ |
26 | ../../../../../i18n/fr/libtodaytodolistplugin.ts \ | 27 | ../../../../../i18n/fr/libtodaytodolistplugin.ts \ |
27 | ../../../../../i18n/hu/libtodaytodolistplugin.ts \ | 28 | ../../../../../i18n/hu/libtodaytodolistplugin.ts \ |
28 | ../../../../../i18n/ja/libtodaytodolistplugin.ts \ | 29 | ../../../../../i18n/ja/libtodaytodolistplugin.ts \ |
29 | ../../../../../i18n/ko/libtodaytodolistplugin.ts \ | 30 | ../../../../../i18n/ko/libtodaytodolistplugin.ts \ |
30 | ../../../../../i18n/no/libtodaytodolistplugin.ts \ | 31 | ../../../../../i18n/no/libtodaytodolistplugin.ts \ |
31 | ../../../../../i18n/pl/libtodaytodolistplugin.ts \ | 32 | ../../../../../i18n/pl/libtodaytodolistplugin.ts \ |
32 | ../../../../../i18n/pt/libtodaytodolistplugin.ts \ | 33 | ../../../../../i18n/pt/libtodaytodolistplugin.ts \ |
33 | ../../../../../i18n/pt_BR/libtodaytodolistplugin.ts \ | 34 | ../../../../../i18n/pt_BR/libtodaytodolistplugin.ts \ |
34 | ../../../../../i18n/sl/libtodaytodolistplugin.ts \ | 35 | ../../../../../i18n/sl/libtodaytodolistplugin.ts \ |
35 | ../../../../../i18n/zh_CN/libtodaytodolistplugin.ts \ | 36 | ../../../../../i18n/zh_CN/libtodaytodolistplugin.ts \ |
36 | ../../../../../i18n/zh_TW/libtodaytodolistplugin.ts \ | 37 | ../../../../../i18n/zh_TW/libtodaytodolistplugin.ts \ |
37 | ../../../../../i18n/it/libtodaytodolistplugin.ts \ | 38 | ../../../../../i18n/it/libtodaytodolistplugin.ts \ |
38 | ../../../../../i18n/da/libtodaytodolistplugin.ts | 39 | ../../../../../i18n/da/libtodaytodolistplugin.ts |
39 | 40 | ||
40 | include ( $(OPIEDIR)/include.pro ) | 41 | include ( $(OPIEDIR)/include.pro ) |
diff --git a/core/pim/today/plugins/todolist/todopluginconfig.cpp b/core/pim/today/plugins/todolist/todopluginconfig.cpp index c83f83b..4821776 100644 --- a/core/pim/today/plugins/todolist/todopluginconfig.cpp +++ b/core/pim/today/plugins/todolist/todopluginconfig.cpp | |||
@@ -1,81 +1,59 @@ | |||
1 | /* | 1 | /* |
2 | * todopluginconfig.cpp | 2 | * todopluginconfig.cpp |
3 | * | 3 | * |
4 | * copyright : (c) 2002, 2003 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> | ||
23 | #include <qlabel.h> | ||
24 | #include <qwhatsthis.h> | 22 | #include <qwhatsthis.h> |
25 | 23 | ||
26 | 24 | ||
27 | |||
28 | TodolistPluginConfig::TodolistPluginConfig( QWidget *parent, const char* name) | 25 | TodolistPluginConfig::TodolistPluginConfig( QWidget *parent, const char* name) |
29 | : TodayConfigWidget(parent, name ) { | 26 | : TodayConfigWidget(parent, name ) { |
30 | 27 | ||
31 | QVBoxLayout * layout = new QVBoxLayout( this ); | 28 | QVBoxLayout * layout = new QVBoxLayout( this ); |
32 | layout->setMargin( 20 ); | ||
33 | |||
34 | QHBox *box1 = new QHBox( this ); | ||
35 | |||
36 | QLabel* TextLabel6 = new QLabel( box1, "TextLabel6" ); | ||
37 | TextLabel6->setText( tr( "tasks shown " ) ); | ||
38 | |||
39 | SpinBox2 = new QSpinBox( box1, "SpinBox2" ); | ||
40 | SpinBox2->setMaxValue( 40 ); | ||
41 | QWhatsThis::add( SpinBox2 , tr( "Set the maximum number of task that should be shown" ) ); | ||
42 | |||
43 | |||
44 | |||
45 | QHBox *box2 = new QHBox( this ); | ||
46 | 29 | ||
47 | QLabel* clipLabel = new QLabel( box2, "" ); | 30 | m_gui = new TodoPluginConfigBase( this ); |
48 | clipLabel->setText( tr( "Clip line after X chars" ) ); | ||
49 | 31 | ||
50 | SpinBoxClip = new QSpinBox( box2, "SpinClip" ); | 32 | layout->addWidget( m_gui ); |
51 | SpinBoxClip->setMaxValue( 200 ); | ||
52 | QWhatsThis::add( SpinBoxClip , tr( "After how many chars should be the info about the task be cut off" ) ); | ||
53 | layout->addWidget( box1 ); | ||
54 | layout->addWidget( box2 ); | ||
55 | 33 | ||
56 | readConfig(); | 34 | readConfig(); |
57 | } | 35 | } |
58 | 36 | ||
59 | void TodolistPluginConfig::readConfig() { | 37 | void TodolistPluginConfig::readConfig() { |
60 | Config cfg( "todaytodoplugin" ); | 38 | Config cfg( "todaytodoplugin" ); |
61 | cfg.setGroup( "config" ); | 39 | cfg.setGroup( "config" ); |
62 | m_max_lines_task = cfg.readNumEntry( "maxlinestask", 5 ); | 40 | m_max_lines_task = cfg.readNumEntry( "maxlinestask", 5 ); |
63 | SpinBox2->setValue( m_max_lines_task ); | 41 | m_gui->SpinBox2->setValue( m_max_lines_task ); |
64 | m_maxCharClip = cfg.readNumEntry( "maxcharclip", 38 ); | 42 | m_maxCharClip = cfg.readNumEntry( "maxcharclip", 38 ); |
65 | SpinBoxClip->setValue( m_maxCharClip ); | 43 | m_gui->SpinBoxClip->setValue( m_maxCharClip ); |
66 | } | 44 | } |
67 | 45 | ||
68 | 46 | ||
69 | void TodolistPluginConfig::writeConfig() { | 47 | void TodolistPluginConfig::writeConfig() { |
70 | Config cfg( "todaytodoplugin" ); | 48 | Config cfg( "todaytodoplugin" ); |
71 | cfg.setGroup( "config" ); | 49 | cfg.setGroup( "config" ); |
72 | m_max_lines_task = SpinBox2->value(); | 50 | m_max_lines_task = m_gui->SpinBox2->value(); |
73 | cfg.writeEntry( "maxlinestask", m_max_lines_task ); | 51 | cfg.writeEntry( "maxlinestask", m_max_lines_task ); |
74 | m_maxCharClip = SpinBoxClip->value(); | 52 | m_maxCharClip = m_gui->SpinBoxClip->value(); |
75 | cfg.writeEntry( "maxcharclip", m_maxCharClip ); | 53 | cfg.writeEntry( "maxcharclip", m_maxCharClip ); |
76 | cfg.write(); | 54 | cfg.write(); |
77 | } | 55 | } |
78 | 56 | ||
79 | 57 | ||
80 | TodolistPluginConfig::~TodolistPluginConfig() { | 58 | TodolistPluginConfig::~TodolistPluginConfig() { |
81 | } | 59 | } |
diff --git a/core/pim/today/plugins/todolist/todopluginconfig.h b/core/pim/today/plugins/todolist/todopluginconfig.h index 54d35cf..a2d7d2c 100644 --- a/core/pim/today/plugins/todolist/todopluginconfig.h +++ b/core/pim/today/plugins/todolist/todopluginconfig.h | |||
@@ -1,59 +1,58 @@ | |||
1 | /* | 1 | /* |
2 | * todopluginconfig.h | 2 | * todopluginconfig.h |
3 | * | 3 | * |
4 | * copyright : (c) 2002, 2003 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 <qspinbox.h> | 20 | #include <qspinbox.h> |
21 | 21 | ||
22 | #include <opie/todayconfigwidget.h> | 22 | #include <opie/todayconfigwidget.h> |
23 | 23 | ||
24 | #include "todopluginconfigbase.h" | 24 | #include "todopluginconfigbase.h" |
25 | 25 | ||
26 | class TodolistPluginConfig : public TodayConfigWidget { | 26 | class TodolistPluginConfig : public TodayConfigWidget { |
27 | |||
28 | Q_OBJECT | 27 | Q_OBJECT |
29 | 28 | ||
30 | public: | 29 | public: |
31 | 30 | ||
32 | TodolistPluginConfig( QWidget *parent, const char *name ); | 31 | TodolistPluginConfig( QWidget *parent, const char *name ); |
33 | ~TodolistPluginConfig(); | 32 | ~TodolistPluginConfig(); |
34 | 33 | ||
35 | private: | 34 | private: |
36 | /** | 35 | /** |
37 | * if changed then save | 36 | * if changed then save |
38 | */ | 37 | */ |
39 | bool changed(); | 38 | bool changed(); |
40 | void readConfig(); | 39 | void readConfig(); |
41 | void writeConfig(); | 40 | void writeConfig(); |
42 | 41 | ||
43 | TodoPluginConfigBase *m_gui; | 42 | TodoPluginConfigBase *m_gui; |
44 | 43 | ||
45 | 44 | ||
46 | // how many lines should be showed in the todolist section | 45 | // how many lines should be showed in the todolist section |
47 | int m_max_lines_task; | 46 | int m_max_lines_task; |
48 | // clip the lines after X chars | 47 | // clip the lines after X chars |
49 | int m_maxCharClip; | 48 | int m_maxCharClip; |
50 | 49 | ||
51 | 50 | ||
52 | 51 | ||
53 | }; | 52 | }; |
54 | 53 | ||
55 | 54 | ||
56 | 55 | ||
57 | 56 | ||
58 | 57 | ||
59 | #endif | 58 | #endif |
diff --git a/core/pim/today/plugins/todolist/todopluginconfigbase.ui b/core/pim/today/plugins/todolist/todopluginconfigbase.ui new file mode 100644 index 0000000..d3dcfb7 --- a/dev/null +++ b/core/pim/today/plugins/todolist/todopluginconfigbase.ui | |||
@@ -0,0 +1,142 @@ | |||
1 | <!DOCTYPE UI><UI> | ||
2 | <class>TodoPluginConfigBase</class> | ||
3 | <widget> | ||
4 | <class>QWidget</class> | ||
5 | <property stdset="1"> | ||
6 | <name>name</name> | ||
7 | <cstring>TodoPluginConfigBase</cstring> | ||
8 | </property> | ||
9 | <vbox> | ||
10 | <property stdset="1"> | ||
11 | <name>margin</name> | ||
12 | <number>11</number> | ||
13 | </property> | ||
14 | <property stdset="1"> | ||
15 | <name>spacing</name> | ||
16 | <number>6</number> | ||
17 | </property> | ||
18 | <widget> | ||
19 | <class>QLayoutWidget</class> | ||
20 | <property stdset="1"> | ||
21 | <name>name</name> | ||
22 | <cstring>Layout1</cstring> | ||
23 | </property> | ||
24 | <hbox> | ||
25 | <property stdset="1"> | ||
26 | <name>margin</name> | ||
27 | <number>0</number> | ||
28 | </property> | ||
29 | <property stdset="1"> | ||
30 | <name>spacing</name> | ||
31 | <number>6</number> | ||
32 | </property> | ||
33 | <widget> | ||
34 | <class>QSpinBox</class> | ||
35 | <property stdset="1"> | ||
36 | <name>name</name> | ||
37 | <cstring>SpinBox2</cstring> | ||
38 | </property> | ||
39 | <property stdset="1"> | ||
40 | <name>maxValue</name> | ||
41 | <number>40</number> | ||
42 | </property> | ||
43 | <property> | ||
44 | <name>whatsThis</name> | ||
45 | <string>Set the maximum number of task that should be shown</string> | ||
46 | </property> | ||
47 | </widget> | ||
48 | <widget> | ||
49 | <class>QLabel</class> | ||
50 | <property stdset="1"> | ||
51 | <name>name</name> | ||
52 | <cstring>TextLabel1</cstring> | ||
53 | </property> | ||
54 | <property stdset="1"> | ||
55 | <name>text</name> | ||
56 | <string>tasks shown</string> | ||
57 | </property> | ||
58 | <property> | ||
59 | <name>whatsThis</name> | ||
60 | <string>Set the maximum number of task that should be shown</string> | ||
61 | </property> | ||
62 | </widget> | ||
63 | </hbox> | ||
64 | </widget> | ||
65 | <widget> | ||
66 | <class>QLayoutWidget</class> | ||
67 | <property stdset="1"> | ||
68 | <name>name</name> | ||
69 | <cstring>Layout2</cstring> | ||
70 | </property> | ||
71 | <hbox> | ||
72 | <property stdset="1"> | ||
73 | <name>margin</name> | ||
74 | <number>0</number> | ||
75 | </property> | ||
76 | <property stdset="1"> | ||
77 | <name>spacing</name> | ||
78 | <number>6</number> | ||
79 | </property> | ||
80 | <widget> | ||
81 | <class>QSpinBox</class> | ||
82 | <property stdset="1"> | ||
83 | <name>name</name> | ||
84 | <cstring>SpinBoxClip</cstring> | ||
85 | </property> | ||
86 | <property stdset="1"> | ||
87 | <name>maxValue</name> | ||
88 | <number>200</number> | ||
89 | </property> | ||
90 | <property> | ||
91 | <name>whatsThis</name> | ||
92 | <string>After how many chars should be the info about the task be cut off</string> | ||
93 | </property> | ||
94 | </widget> | ||
95 | <widget> | ||
96 | <class>QLabel</class> | ||
97 | <property stdset="1"> | ||
98 | <name>name</name> | ||
99 | <cstring>TextLabel2</cstring> | ||
100 | </property> | ||
101 | <property stdset="1"> | ||
102 | <name>text</name> | ||
103 | <string>Clip line after X chars</string> | ||
104 | </property> | ||
105 | <property stdset="1"> | ||
106 | <name>alignment</name> | ||
107 | <set>WordBreak|AlignVCenter|AlignLeft</set> | ||
108 | </property> | ||
109 | <property> | ||
110 | <name>whatsThis</name> | ||
111 | <string>After how many chars should be the info about the task be cut off</string> | ||
112 | </property> | ||
113 | <property> | ||
114 | <name>wordwrap</name> | ||
115 | </property> | ||
116 | </widget> | ||
117 | </hbox> | ||
118 | </widget> | ||
119 | <spacer> | ||
120 | <property> | ||
121 | <name>name</name> | ||
122 | <cstring>Spacer1</cstring> | ||
123 | </property> | ||
124 | <property stdset="1"> | ||
125 | <name>orientation</name> | ||
126 | <enum>Vertical</enum> | ||
127 | </property> | ||
128 | <property stdset="1"> | ||
129 | <name>sizeType</name> | ||
130 | <enum>Expanding</enum> | ||
131 | </property> | ||
132 | <property> | ||
133 | <name>sizeHint</name> | ||
134 | <size> | ||
135 | <width>20</width> | ||
136 | <height>20</height> | ||
137 | </size> | ||
138 | </property> | ||
139 | </spacer> | ||
140 | </vbox> | ||
141 | </widget> | ||
142 | </UI> | ||