-rw-r--r-- | core/pim/today/today.cpp | 22 |
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 | |||
@@ -23,12 +23,13 @@ | |||
23 | #include <qpe/config.h> | 23 | #include <qpe/config.h> |
24 | #include <qpe/qcopenvelope_qws.h> | 24 | #include <qpe/qcopenvelope_qws.h> |
25 | #include <qpe/resource.h> | 25 | #include <qpe/resource.h> |
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> |
32 | #include <qtimer.h> | 33 | #include <qtimer.h> |
33 | #include <qwhatsthis.h> | 34 | #include <qwhatsthis.h> |
34 | #include <qtranslator.h> | 35 | #include <qtranslator.h> |
@@ -127,22 +128,39 @@ void Today::init() { | |||
127 | cfg.setGroup( "Plugins" ); | 128 | cfg.setGroup( "Plugins" ); |
128 | m_excludeApplets = cfg.readListEntry( "ExcludeApplets", ',' ); | 129 | m_excludeApplets = cfg.readListEntry( "ExcludeApplets", ',' ); |
129 | m_allApplets = cfg.readListEntry( "AllApplets", ',' ); | 130 | m_allApplets = cfg.readListEntry( "AllApplets", ',' ); |
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 ); |
146 | } | 164 | } |
147 | 165 | ||
148 | /** | 166 | /** |