summaryrefslogtreecommitdiff
path: root/core/pim/today/today.cpp
authorharlekin <harlekin>2003-03-29 13:23:53 (UTC)
committer harlekin <harlekin>2003-03-29 13:23:53 (UTC)
commit7c43e678395bbf781195686b34cc596ea72aa512 (patch) (side-by-side diff)
treee201eb358c019ea5e116c704c49729d1fe9c0d91 /core/pim/today/today.cpp
parent22e941e4cbc9e8906287d1e352b66092c6a84c0d (diff)
downloadopie-7c43e678395bbf781195686b34cc596ea72aa512.zip
opie-7c43e678395bbf781195686b34cc596ea72aa512.tar.gz
opie-7c43e678395bbf781195686b34cc596ea72aa512.tar.bz2
added option to made the banner on top much smaller and also the date should adapt to local settings now ( hopefully )
Diffstat (limited to 'core/pim/today/today.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/today/today.cpp24
1 files changed, 21 insertions, 3 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 @@
#include <qpe/global.h>
#include <qpe/qpeapplication.h>
#include <qpe/contact.h>
+#include <qpe/timestring.h>
#include <qdir.h>
#include <qfile.h>
@@ -130,16 +131,33 @@ void Today::init() {
cfg.setGroup( "General" );
m_iconSize = cfg.readNumEntry( "IconSize", 18 );
+ m_hideBanner = cfg.readNumEntry( "HideBanner", 0 );
setRefreshTimer( cfg.readNumEntry( "checkinterval", 15000 ) );
// set the date in top label
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>" ) );
if ( layout ) {
delete layout;
}
+
+ 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 );
layout->addWidget( Frame );
layout->addWidget( OwnerField );
@@ -319,7 +337,7 @@ void Today::startConfig() {
TodayPlugin plugin;
QList<TodayConfigWidget> configWidgetList;
- for ( int i = pluginList.count() - 1 ; i >= 0; i-- ) {
+ for ( int i = pluginList.count() - 1; i >= 0; i-- ) {
plugin = pluginList[i];
// load the config widgets in the tabs