-rw-r--r-- | core/pim/today/TODO | 4 | ||||
-rw-r--r-- | core/pim/today/changelog | 6 | ||||
-rw-r--r-- | core/pim/today/opie-today.control | 2 | ||||
-rw-r--r-- | core/pim/today/today.cpp | 35 | ||||
-rw-r--r-- | core/pim/today/todaybase.cpp | 16 |
5 files changed, 35 insertions, 28 deletions
diff --git a/core/pim/today/TODO b/core/pim/today/TODO index 95b9b51..5876e2b 100644 --- a/core/pim/today/TODO +++ b/core/pim/today/TODO | |||
@@ -1,17 +1,13 @@ | |||
1 | TODO for today: | 1 | TODO for today: |
2 | 2 | ||
3 | * start the app on "resume" | 3 | * start the app on "resume" |
4 | 4 | ||
5 | * show alarm icons on alarm events | 5 | * show alarm icons on alarm events |
6 | 6 | ||
7 | * problems with updating | ||
8 | |||
9 | * add am/pm mode instead of 24 h, take system default | 7 | * add am/pm mode instead of 24 h, take system default |
10 | 8 | ||
11 | * fix 23 pm bug (done??) | 9 | * fix 23 pm bug (done??) |
12 | 10 | ||
13 | * scrollbar? | ||
14 | |||
15 | * qcop integration for updating events? | 11 | * qcop integration for updating events? |
16 | 12 | ||
17 | * sort todos by pri. \ No newline at end of file | 13 | * sort todos by pri. \ No newline at end of file |
diff --git a/core/pim/today/changelog b/core/pim/today/changelog index 3f99052..692c0dc 100644 --- a/core/pim/today/changelog +++ b/core/pim/today/changelog | |||
@@ -1,12 +1,18 @@ | |||
1 | 0.2.6 | ||
2 | |||
3 | * added scrollbars to dates and todo | ||
4 | * all day detection | ||
5 | * some smaller bugfixes | ||
6 | |||
1 | 0.2.5 | 7 | 0.2.5 |
2 | 8 | ||
3 | * some other minor fixes regarding autoupdate | 9 | * some other minor fixes regarding autoupdate |
4 | * fixed segfault with todolist > 7 entries | 10 | * fixed segfault with todolist > 7 entries |
5 | * fixed the "ugly grey border around buttons" issue | 11 | * fixed the "ugly grey border around buttons" issue |
6 | * fixed the "empty calendar field" "bug" | 12 | * fixed the "empty calendar field" "bug" |
7 | * shown only later appointments as option | 13 | * shown only later appointments as option |
8 | 14 | ||
9 | 15 | ||
10 | 0.2.4 | 16 | 0.2.4 |
11 | 17 | ||
12 | * added support for email | 18 | * added support for email |
diff --git a/core/pim/today/opie-today.control b/core/pim/today/opie-today.control index 72e8f2b..f16ddfb 100644 --- a/core/pim/today/opie-today.control +++ b/core/pim/today/opie-today.control | |||
@@ -1,10 +1,10 @@ | |||
1 | Files: bin/today apps/Applications/today.desktop pics/today_icon.png pics/today/today_logo.png pics/today/config.png pics/today/mail.png | 1 | Files: bin/today apps/Applications/today.desktop pics/today_icon.png pics/today/today_logo.png pics/today/config.png pics/today/mail.png |
2 | Priority: optional | 2 | Priority: optional |
3 | Section: opie/applications | 3 | Section: opie/applications |
4 | Maintainer: Maximilian Reiß <max.reiss@gmx.de> | 4 | Maintainer: Maximilian Reiß <max.reiss@gmx.de> |
5 | Architecture: arm | 5 | Architecture: arm |
6 | Version: 0.2.5 | 6 | Version: 0.2.6 |
7 | Depends: opie-base ($QPE_VERSION) | 7 | Depends: opie-base ($QPE_VERSION) |
8 | License: GPL | 8 | License: GPL |
9 | Description: today screen | 9 | Description: today screen |
10 | A short overview over current appointments and tasks. | 10 | A short overview over current appointments and tasks. |
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp index 9e5c27e..1f6f34e 100644 --- a/core/pim/today/today.cpp +++ b/core/pim/today/today.cpp | |||
@@ -180,57 +180,72 @@ void Today::getDates() | |||
180 | 180 | ||
181 | // decide if to get all day or only later appointments | 181 | // decide if to get all day or only later appointments |
182 | if (!ONLY_LATER) | 182 | if (!ONLY_LATER) |
183 | { | 183 | { |
184 | msg += "<B>" + (*it).description() + "</B>"; | 184 | msg += "<B>" + (*it).description() + "</B>"; |
185 | if ( (*it).event().hasAlarm() ) | 185 | if ( (*it).event().hasAlarm() ) |
186 | { | 186 | { |
187 | msg += " <b>[with alarm]</b>"; | 187 | msg += " <b>[with alarm]</b>"; |
188 | } | 188 | } |
189 | // include location or not | 189 | // include location or not |
190 | if (SHOW_LOCATION == 1) | 190 | if (SHOW_LOCATION == 1) |
191 | { | 191 | { |
192 | msg+= "<BR>" + (*it).location(); | 192 | msg+= "<BR><i>" + (*it).location(); |
193 | } | 193 | } |
194 | msg += "<BR>" | 194 | msg += "</i><BR>"; |
195 | 195 | ||
196 | if ( (TimeString::timeString(QTime((*it).event().start().time()) ) == "00:00") && (TimeString::timeString(QTime((*it).event().end().time()) ) == "23:59") ) | ||
197 | { | ||
198 | msg += "All day"; | ||
199 | } | ||
200 | else | ||
201 | { | ||
196 | // start time of event | 202 | // start time of event |
197 | + TimeString::timeString(QTime((*it).event().start().time()) ) | 203 | msg += TimeString::timeString(QTime((*it).event().start().time()) ) |
198 | // end time of event | 204 | // end time of event |
199 | + "<b> - </b>" + TimeString::timeString(QTime((*it).event().end().time()) ) | 205 | + "<b> - </b>" + TimeString::timeString(QTime((*it).event().end().time()) ); |
200 | + "<BR>"; | 206 | } |
207 | msg += "<BR>"; | ||
201 | // include possible note or not | 208 | // include possible note or not |
202 | if (SHOW_NOTES == 1) | 209 | if (SHOW_NOTES == 1) |
203 | { | 210 | { |
204 | msg += " <i>note</i>:" +((*it).notes()).mid(0, MAX_CHAR_CLIP) + "<br>"; | 211 | msg += " <i>note</i>:" +((*it).notes()).mid(0, MAX_CHAR_CLIP) + "<br>"; |
205 | } | 212 | } |
206 | } | 213 | } |
207 | else if ((time.toString() <= TimeString::dateString((*it).event().end())) ) | 214 | else if ((time.toString() <= TimeString::dateString((*it).event().end())) ) |
208 | { | 215 | { |
209 | msg += "<B>" + (*it).description() + "</B>"; | 216 | msg += "<B>" + (*it).description() + "</B>"; |
210 | if ( (*it).event().hasAlarm() ) | 217 | if ( (*it).event().hasAlarm() ) |
211 | { | 218 | { |
212 | msg += " <b>[with alarm]</b>"; | 219 | msg += " <b>[with alarm]</b>"; |
213 | } | 220 | } |
214 | // include location or not | 221 | // include location or not |
215 | if (SHOW_LOCATION == 1) | 222 | if (SHOW_LOCATION == 1) |
216 | { | 223 | { |
217 | msg+= "<BR>" + (*it).location(); | 224 | msg+= "<BR><i>" + (*it).location(); |
218 | } | 225 | } |
219 | msg += "<BR>" | 226 | msg += "</i><BR>"; |
227 | |||
228 | if ( (TimeString::timeString(QTime((*it).event().start().time()) ) == "00:00") && (TimeString::timeString(QTime((*it).event().end().time()) ) == "23:59") ) | ||
229 | { | ||
230 | msg += "All day"; | ||
231 | } | ||
232 | else | ||
233 | { | ||
220 | // start time of event | 234 | // start time of event |
221 | + TimeString::timeString(QTime((*it).event().start().time()) ) | 235 | msg += TimeString::timeString(QTime((*it).event().start().time()) ) |
222 | // end time of event | 236 | // end time of event |
223 | + "<b> - </b>" + TimeString::timeString(QTime((*it).event().end().time()) ) | 237 | + "<b> - </b>" + TimeString::timeString(QTime((*it).event().end().time()) ); |
224 | + "<BR>"; | 238 | } |
239 | msg += "<BR>"; | ||
225 | // include possible note or not | 240 | // include possible note or not |
226 | if (SHOW_NOTES == 1) | 241 | if (SHOW_NOTES == 1) |
227 | { | 242 | { |
228 | msg += " <i>note</i>:" +((*it).notes()).mid(0, MAX_CHAR_CLIP) + "<br>"; | 243 | msg += " <i>note</i>:" +((*it).notes()).mid(0, MAX_CHAR_CLIP) + "<br>"; |
229 | } | 244 | } |
230 | } | 245 | } |
231 | } | 246 | } |
232 | } | 247 | } |
233 | if (msg.isEmpty()) | 248 | if (msg.isEmpty()) |
234 | { | 249 | { |
235 | msg = "No more appointments today"; | 250 | msg = "No more appointments today"; |
236 | } | 251 | } |
diff --git a/core/pim/today/todaybase.cpp b/core/pim/today/todaybase.cpp index ff6001a..5c1dc24 100644 --- a/core/pim/today/todaybase.cpp +++ b/core/pim/today/todaybase.cpp | |||
@@ -45,36 +45,32 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl ) | |||
45 | QPixmap todo = Resource::loadPixmap( "TodoList" ); // todo | 45 | QPixmap todo = Resource::loadPixmap( "TodoList" ); // todo |
46 | QPixmap config = Resource::loadPixmap( "today/config" ); // config icon | 46 | QPixmap config = Resource::loadPixmap( "today/config" ); // config icon |
47 | QPixmap mail = Resource::loadPixmap( "today/mail" ); // mail icon | 47 | QPixmap mail = Resource::loadPixmap( "today/mail" ); // mail icon |
48 | 48 | ||
49 | QPalette pal = this->palette(); | 49 | QPalette pal = this->palette(); |
50 | QColor col = pal.color(QPalette::Active, QColorGroup::Background); | 50 | QColor col = pal.color(QPalette::Active, QColorGroup::Background); |
51 | pal.setColor(QPalette::Active, QColorGroup::Button, col); | 51 | pal.setColor(QPalette::Active, QColorGroup::Button, col); |
52 | this->setPalette(pal); | 52 | this->setPalette(pal); |
53 | 53 | ||
54 | QWidget *d = QApplication::desktop(); | 54 | QWidget *d = QApplication::desktop(); |
55 | int w=d->width(); | 55 | int w=d->width(); |
56 | int h=d->height(); | 56 | int h=d->height(); |
57 | resize( w , h ); // not good, what happens on rotation | 57 | resize( w , h ); |
58 | 58 | ||
59 | // hehe, qt is ... | 59 | // hehe, qt is ... |
60 | getridoffuckingstrippeldlinesbutton = new QPushButton (this, "asdfsad" ); | 60 | getridoffuckingstrippeldlinesbutton = new QPushButton (this, "asdfsad" ); |
61 | getridoffuckingstrippeldlinesbutton->setGeometry( QRect( -5, 10, 0, 0 ) ); | 61 | getridoffuckingstrippeldlinesbutton->setGeometry( QRect( -5, 10, 0, 0 ) ); |
62 | 62 | ||
63 | |||
64 | |||
65 | QVBoxLayout * layout = new QVBoxLayout(this); | 63 | QVBoxLayout * layout = new QVBoxLayout(this); |
66 | 64 | ||
67 | |||
68 | |||
69 | // --- logo Section --- | 65 | // --- logo Section --- |
70 | QPalette pal2; | 66 | QPalette pal2; |
71 | QColorGroup cg; | 67 | QColorGroup cg; |
72 | cg.setColor( QColorGroup::Text, white ); | 68 | cg.setColor( QColorGroup::Text, white ); |
73 | cg.setBrush( QColorGroup::Background, QBrush( QColor( 238, 238, 230), logo ) ); | 69 | cg.setBrush( QColorGroup::Background, QBrush( QColor( 238, 238, 230), logo ) ); |
74 | pal2.setActive( cg ); | 70 | pal2.setActive( cg ); |
75 | // today logo | 71 | // today logo |
76 | Frame = new QLabel( this, "Frame" ); | 72 | Frame = new QLabel( this, "Frame" ); |
77 | Frame->setPalette( pal2 ); | 73 | Frame->setPalette( pal2 ); |
78 | Frame->setFrameShape( QFrame::StyledPanel ); | 74 | Frame->setFrameShape( QFrame::StyledPanel ); |
79 | Frame->setFrameShadow( QFrame::Raised ); | 75 | Frame->setFrameShadow( QFrame::Raised ); |
80 | Frame->setLineWidth( 0 ); | 76 | Frame->setLineWidth( 0 ); |
@@ -112,75 +108,69 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags fl ) | |||
112 | DatesButton->setPalette( pal ); | 108 | DatesButton->setPalette( pal ); |
113 | DatesButton->setPixmap( datebook ); | 109 | DatesButton->setPixmap( datebook ); |
114 | DatesButton->setFlat( TRUE ); | 110 | DatesButton->setFlat( TRUE ); |
115 | 111 | ||
116 | DatesField = new QLabel( sv1->viewport(), "DatesField" ); | 112 | DatesField = new QLabel( sv1->viewport(), "DatesField" ); |
117 | sv1->addChild(DatesField); | 113 | sv1->addChild(DatesField); |
118 | DatesField->setText( tr( "No appointments today" ) ); | 114 | DatesField->setText( tr( "No appointments today" ) ); |
119 | DatesField->setAlignment( int( QLabel::AlignTop | QLabel::AlignLeft ) ); | 115 | DatesField->setAlignment( int( QLabel::AlignTop | QLabel::AlignLeft ) ); |
120 | 116 | ||
121 | 117 | ||
122 | // --- mail section --- | 118 | // --- mail section --- |
123 | MailFrame = new QFrame( this ,"MailFrame" ); | 119 | MailFrame = new QFrame( this ,"MailFrame" ); |
124 | //MailFrame->setPalette( pal ); | ||
125 | MailFrame->setBackgroundOrigin( QScrollView::ParentOrigin ); | 120 | MailFrame->setBackgroundOrigin( QScrollView::ParentOrigin ); |
126 | //MailFrame->setFrameShape( QScrollView::StyledPanel ); | ||
127 | //MailFrame->setFrameShadow( QScrollView::Sunken ); | ||
128 | MailFrame->setGeometry (QRect( 0, 0, this->width() , 15) ); | 121 | MailFrame->setGeometry (QRect( 0, 0, this->width() , 15) ); |
129 | MailFrame->setFrameStyle( QFrame::NoFrame ); | 122 | MailFrame->setFrameStyle( QFrame::NoFrame ); |
130 | 123 | ||
131 | QFrame* Line1 = new QFrame( MailFrame); | 124 | QFrame* Line1 = new QFrame( MailFrame); |
132 | Line1->setGeometry( QRect( 0, 0, MailFrame->width(), 5 ) ); | 125 | Line1->setGeometry( QRect( -5, 0, MailFrame->width()+5, 5 ) ); |
133 | Line1->setFrameStyle( QFrame::HLine | QFrame::Sunken ); | 126 | Line1->setFrameStyle( QFrame::HLine | QFrame::Sunken ); |
134 | 127 | ||
135 | MailButton = new QPushButton (MailFrame, "MailButton" ); | 128 | MailButton = new QPushButton (MailFrame, "MailButton" ); |
136 | MailButton->setGeometry( QRect( 2, 3, 36, 19 ) ); | 129 | MailButton->setGeometry( QRect( 2, 3, 36, 19 ) ); |
137 | MailButton->setPalette( pal ); | 130 | MailButton->setPalette( pal ); |
138 | MailButton->setPixmap( mail ); | 131 | MailButton->setPixmap( mail ); |
139 | MailButton->setFlat( TRUE ); | 132 | MailButton->setFlat( TRUE ); |
140 | 133 | ||
141 | MailField = new QLabel( MailFrame, "MailField" ); | 134 | MailField = new QLabel( MailFrame, "MailField" ); |
142 | MailField->setGeometry( QRect( 40, 4, MailFrame->width(), 12) ); | 135 | MailField->setGeometry( QRect( 40, 4, MailFrame->width(), 12) ); |
143 | MailField->setText( tr( "Opiemail not installed" ) ); | 136 | MailField->setText( tr( "Opiemail not installed" ) ); |
144 | MailField->setAlignment( int( QLabel::AlignTop | QLabel::AlignLeft ) ); | 137 | MailField->setAlignment( int( QLabel::AlignTop | QLabel::AlignLeft ) ); |
145 | MailField->setMaximumHeight(40); | 138 | MailField->setMaximumHeight(40); |
146 | MailField->setMinimumHeight(15); | 139 | MailField->setMinimumHeight(15); |
147 | 140 | ||
148 | 141 | ||
149 | // --- todo section -- | 142 | // --- todo section -- |
150 | Frame15 = new QFrame( this, "Frame15" ); | 143 | Frame15 = new QFrame( this, "Frame15" ); |
151 | //Frame15->setFrameShape( QFrame::StyledPanel ); | ||
152 | //Frame15->setFrameShadow( QFrame::Sunken ); | ||
153 | Frame15->setFrameStyle( QFrame::NoFrame ); | 144 | Frame15->setFrameStyle( QFrame::NoFrame ); |
154 | Frame15->setGeometry (QRect( 40, 3, this->width() , this->height()) ); | 145 | Frame15->setGeometry (QRect( 40, 3, this->width() , this->height()) ); |
155 | 146 | ||
156 | QFrame* Line2 = new QFrame( Frame15); | 147 | QFrame* Line2 = new QFrame( Frame15); |
157 | Line2->setGeometry( QRect( 0, 0, MailFrame->width(), 5 ) ); | 148 | Line2->setGeometry( QRect( -5, 0, MailFrame->width()+5, 5 ) ); |
158 | Line2->setFrameStyle( QFrame::HLine | QFrame::Sunken ); | 149 | Line2->setFrameStyle( QFrame::HLine | QFrame::Sunken ); |
159 | 150 | ||
160 | TodoButton = new QPushButton (Frame15, "TodoButton" ); | 151 | TodoButton = new QPushButton (Frame15, "TodoButton" ); |
161 | TodoButton->setGeometry( QRect( 2, 4, 36, 32 ) ); | 152 | TodoButton->setGeometry( QRect( 2, 4, 36, 32 ) ); |
162 | TodoButton->setPalette( pal ); | 153 | TodoButton->setPalette( pal ); |
163 | TodoButton->setPixmap( todo ); | 154 | TodoButton->setPixmap( todo ); |
164 | TodoButton->setFlat( TRUE ); | 155 | TodoButton->setFlat( TRUE ); |
165 | 156 | ||
166 | QScrollView* sv2 = new QScrollView( Frame15 ); | 157 | QScrollView* sv2 = new QScrollView( Frame15 ); |
167 | sv2->setResizePolicy(QScrollView::AutoOneFit); | 158 | sv2->setResizePolicy(QScrollView::AutoOneFit); |
168 | sv2->setHScrollBarMode( QScrollView::AlwaysOff ); | 159 | sv2->setHScrollBarMode( QScrollView::AlwaysOff ); |
169 | sv2->setGeometry (QRect( 40, 3, Frame15->width()-40 , (Frame15->height()/3) ) ); | 160 | sv2->setGeometry (QRect( 40, 3, Frame15->width()-40 , (Frame15->height()/3) ) ); |
170 | sv2->setFrameShape(QFrame::NoFrame); | 161 | sv2->setFrameShape(QFrame::NoFrame); |
171 | 162 | ||
172 | TodoField = new QLabel( sv2->viewport(), "TodoField" ); | 163 | TodoField = new QLabel( sv2->viewport(), "TodoField" ); |
173 | sv2->addChild(TodoField); | 164 | sv2->addChild(TodoField); |
174 | //TodoField->setGeometry( QRect( 40, 4, 196, 120 ) ); | ||
175 | TodoField->setFrameShadow( QLabel::Plain ); | 165 | TodoField->setFrameShadow( QLabel::Plain ); |
176 | //TodoField->setText( tr( "No current todos" ) ); | 166 | //TodoField->setText( tr( "No current todos" ) ); |
177 | TodoField->setAlignment( int( QLabel::AlignTop | QLabel::AlignLeft ) ); | 167 | TodoField->setAlignment( int( QLabel::AlignTop | QLabel::AlignLeft ) ); |
178 | 168 | ||
179 | PushButton1 = new QPushButton (Frame15, "PushButton1" ); | 169 | PushButton1 = new QPushButton (Frame15, "PushButton1" ); |
180 | PushButton1->setGeometry( QRect( 2, 68, 25, 21 ) ); | 170 | PushButton1->setGeometry( QRect( 2, 68, 25, 21 ) ); |
181 | PushButton1->setPixmap( config ); | 171 | PushButton1->setPixmap( config ); |
182 | PushButton1->setPalette( pal ); | 172 | PushButton1->setPalette( pal ); |
183 | PushButton1->setAutoDefault( TRUE ); | 173 | PushButton1->setAutoDefault( TRUE ); |
184 | PushButton1->setFlat( TRUE ); | 174 | PushButton1->setFlat( TRUE ); |
185 | 175 | ||
186 | // -- layout -- | 176 | // -- layout -- |