summaryrefslogtreecommitdiff
path: root/core/pim/today/today.cpp
Unidiff
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
@@ -26,6 +26,7 @@
26#include <qpe/global.h> 26#include <qpe/global.h>
27#include <qpe/qpeapplication.h> 27#include <qpe/qpeapplication.h>
28#include <qpe/contact.h> 28#include <qpe/contact.h>
29#include <qpe/timestring.h>
29 30
30#include <qdir.h> 31#include <qdir.h>
31#include <qfile.h> 32#include <qfile.h>
@@ -130,16 +131,33 @@ void Today::init() {
130 131
131 cfg.setGroup( "General" ); 132 cfg.setGroup( "General" );
132 m_iconSize = cfg.readNumEntry( "IconSize", 18 ); 133 m_iconSize = cfg.readNumEntry( "IconSize", 18 );
134 m_hideBanner = cfg.readNumEntry( "HideBanner", 0 );
133 setRefreshTimer( cfg.readNumEntry( "checkinterval", 15000 ) ); 135 setRefreshTimer( cfg.readNumEntry( "checkinterval", 15000 ) );
134 136
135 // set the date in top label 137 // set the date in top label
136 QDate date = QDate::currentDate(); 138 QDate date = QDate::currentDate();
137 QString time = ( tr( date.toString() ) ); 139 DateLabel->setText( QString( "<font color=#FFFFFF>" + TimeString::longDateString( date ) + "</font>" ) );
138 DateLabel->setText( QString( "<font color=#FFFFFF>" + time + "</font>" ) );
139 140
140 if ( layout ) { 141 if ( layout ) {
141 delete layout; 142 delete layout;
142 } 143 }
144
145 if ( m_hideBanner ) {
146 Opiezilla->hide();
147 TodayLabel->hide();
148 Frame->setMaximumHeight( 18 );
149 Frame->setMinimumHeight( 18 );
150 DateLabel->setGeometry( QRect( 10, 2, 168, 12 ) );
151 ConfigButton->setGeometry( QRect( QApplication::desktop()->width()-20, 0, 25, 20 ) );
152 } else {
153 Opiezilla->show();
154 TodayLabel->show();
155 Frame->setMaximumHeight( 50 );
156 Frame->setMinimumHeight( 50 );
157 DateLabel->setGeometry( QRect( 10, 35, 168, 12 ) );
158 ConfigButton->setGeometry( QRect( QApplication::desktop()->width()-80, 29, 25, 20 ) );
159 }
160
143 layout = new QVBoxLayout( this ); 161 layout = new QVBoxLayout( this );
144 layout->addWidget( Frame ); 162 layout->addWidget( Frame );
145 layout->addWidget( OwnerField ); 163 layout->addWidget( OwnerField );