summaryrefslogtreecommitdiff
path: root/core/pim/today/today.cpp
Side-by-side diff
Diffstat (limited to 'core/pim/today/today.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/pim/today/today.cpp22
1 files changed, 20 insertions, 2 deletions
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp
index 5e5d373..0b61bf8 100644
--- a/core/pim/today/today.cpp
+++ b/core/pim/today/today.cpp
@@ -28,2 +28,3 @@
#include <qpe/contact.h>
+#include <qpe/timestring.h>
@@ -132,2 +133,3 @@ void Today::init() {
m_iconSize = cfg.readNumEntry( "IconSize", 18 );
+ m_hideBanner = cfg.readNumEntry( "HideBanner", 0 );
setRefreshTimer( cfg.readNumEntry( "checkinterval", 15000 ) );
@@ -136,4 +138,3 @@ void Today::init() {
QDate date = QDate::currentDate();
- QString time = ( tr( date.toString() ) );
- DateLabel->setText( QString( "<font color=#FFFFFF>" + time + "</font>" ) );
+ DateLabel->setText( QString( "<font color=#FFFFFF>" + TimeString::longDateString( date ) + "</font>" ) );
@@ -142,2 +143,19 @@ void Today::init() {
}
+
+ if ( m_hideBanner ) {
+ Opiezilla->hide();
+ TodayLabel->hide();
+ Frame->setMaximumHeight( 18 );
+ Frame->setMinimumHeight( 18 );
+ DateLabel->setGeometry( QRect( 10, 2, 168, 12 ) );
+ ConfigButton->setGeometry( QRect( QApplication::desktop()->width()-20, 0, 25, 20 ) );
+ } else {
+ Opiezilla->show();
+ TodayLabel->show();
+ Frame->setMaximumHeight( 50 );
+ Frame->setMinimumHeight( 50 );
+ DateLabel->setGeometry( QRect( 10, 35, 168, 12 ) );
+ ConfigButton->setGeometry( QRect( QApplication::desktop()->width()-80, 29, 25, 20 ) );
+ }
+
layout = new QVBoxLayout( this );