-rw-r--r-- | core/pim/today/today.cpp | 22 | ||||
-rw-r--r-- | core/pim/today/today.h | 1 | ||||
-rw-r--r-- | core/pim/today/todaybase.cpp | 4 | ||||
-rw-r--r-- | core/pim/today/todaybase.h | 2 | ||||
-rw-r--r-- | core/pim/today/todayconfig.cpp | 13 | ||||
-rw-r--r-- | core/pim/today/todayconfig.h | 4 |
6 files changed, 39 insertions, 7 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 | |||
@@ -27,4 +27,5 @@ | |||
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> |
@@ -131,14 +132,31 @@ void Today::init() { | |||
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 ); |
diff --git a/core/pim/today/today.h b/core/pim/today/today.h index 3802feb..b28ac96 100644 --- a/core/pim/today/today.h +++ b/core/pim/today/today.h | |||
@@ -67,4 +67,5 @@ private slots: | |||
67 | int m_iconSize; | 67 | int m_iconSize; |
68 | int m_maxCharClip; | 68 | int m_maxCharClip; |
69 | int m_hideBanner; | ||
69 | }; | 70 | }; |
70 | 71 | ||
diff --git a/core/pim/today/todaybase.cpp b/core/pim/today/todaybase.cpp index da4efa3..a36ecaa 100644 --- a/core/pim/today/todaybase.cpp +++ b/core/pim/today/todaybase.cpp | |||
@@ -59,5 +59,5 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags ) | |||
59 | 59 | ||
60 | // Today text | 60 | // Today text |
61 | QLabel* TodayLabel = new QLabel( Frame, "TodayText" ); | 61 | TodayLabel = new QLabel( Frame, "TodayText" ); |
62 | TodayLabel->setGeometry( QRect( 10, 1, 168, 40 ) ); | 62 | TodayLabel->setGeometry( QRect( 10, 1, 168, 40 ) ); |
63 | QFont TodayLabel_font( TodayLabel->font() ); | 63 | QFont TodayLabel_font( TodayLabel->font() ); |
@@ -78,5 +78,5 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags ) | |||
78 | 78 | ||
79 | // Opiezilla | 79 | // Opiezilla |
80 | QLabel* Opiezilla = new QLabel( Frame, "OpieZilla" ); | 80 | Opiezilla = new QLabel( Frame, "OpieZilla" ); |
81 | Opiezilla->setPixmap( opiezilla ); | 81 | Opiezilla->setPixmap( opiezilla ); |
82 | Opiezilla->setGeometry( QApplication::desktop()->width()-50 ,1, 45, 47 ); | 82 | Opiezilla->setGeometry( QApplication::desktop()->width()-50 ,1, 45, 47 ); |
diff --git a/core/pim/today/todaybase.h b/core/pim/today/todaybase.h index 340c7a6..b0b2e14 100644 --- a/core/pim/today/todaybase.h +++ b/core/pim/today/todaybase.h | |||
@@ -44,4 +44,6 @@ public: | |||
44 | QLabel* DateLabel; | 44 | QLabel* DateLabel; |
45 | QFrame* Frame15; | 45 | QFrame* Frame15; |
46 | QLabel* Opiezilla; | ||
47 | QLabel* TodayLabel; | ||
46 | OClickableLabel* ConfigButton; | 48 | OClickableLabel* ConfigButton; |
47 | 49 | ||
diff --git a/core/pim/today/todayconfig.cpp b/core/pim/today/todayconfig.cpp index 0774ccb..a60f1d2 100644 --- a/core/pim/today/todayconfig.cpp +++ b/core/pim/today/todayconfig.cpp | |||
@@ -55,5 +55,5 @@ TodayConfig::TodayConfig( QWidget* parent, const char* name, bool modal ) | |||
55 | : QDialog( parent, name, modal, WStyle_ContextHelp ) { | 55 | : QDialog( parent, name, modal, WStyle_ContextHelp ) { |
56 | 56 | ||
57 | setCaption( tr( "Today config" ) ); | 57 | setCaption( tr( "Today Config" ) ); |
58 | 58 | ||
59 | QVBoxLayout *layout = new QVBoxLayout( this ); | 59 | QVBoxLayout *layout = new QVBoxLayout( this ); |
@@ -86,4 +86,12 @@ TodayConfig::TodayConfig( QWidget* parent, const char* name, bool modal ) | |||
86 | CheckBoxAuto = new QCheckBox( hbox_auto, "CheckBoxAuto" ); | 86 | CheckBoxAuto = new QCheckBox( hbox_auto, "CheckBoxAuto" ); |
87 | QWhatsThis::add( CheckBoxAuto, tr( "Check this if today should be autostarted on resume." ) ); | 87 | QWhatsThis::add( CheckBoxAuto, tr( "Check this if today should be autostarted on resume." ) ); |
88 | |||
89 | QHBox *hbox_hide = new QHBox( tab_3 ); | ||
90 | TextLabel4 = new QLabel( hbox_hide, "HideBanner" ); | ||
91 | TextLabel4->setText( tr( "Tiny Banner" ) ); | ||
92 | //QWhatsThis::add( TextLabel2 , tr( "Check this if today should be autostarted on resume." ) ); | ||
93 | CheckBoxHide = new QCheckBox( hbox_hide, "CheckBoxHide" ); | ||
94 | // QWhatsThis::add( CheckBoxAuto, tr( "Check this if today should be autostarted on resume." ) ); | ||
95 | |||
88 | QHBox *hbox_inactive = new QHBox( tab_3 ); | 96 | QHBox *hbox_inactive = new QHBox( tab_3 ); |
89 | TimeLabel = new QLabel( hbox_inactive, "TimeLabel" ); | 97 | TimeLabel = new QLabel( hbox_inactive, "TimeLabel" ); |
@@ -113,4 +121,5 @@ TodayConfig::TodayConfig( QWidget* parent, const char* name, bool modal ) | |||
113 | 121 | ||
114 | tab3Layout->addWidget( hbox_auto ); | 122 | tab3Layout->addWidget( hbox_auto ); |
123 | tab3Layout->addWidget( hbox_hide ); | ||
115 | tab3Layout->addWidget( hbox_inactive ); | 124 | tab3Layout->addWidget( hbox_inactive ); |
116 | tab3Layout->addWidget( hbox_iconSize ); | 125 | tab3Layout->addWidget( hbox_iconSize ); |
@@ -161,4 +170,5 @@ void TodayConfig::readConfig() { | |||
161 | SpinBoxIconSize->setValue( m_iconSize ); | 170 | SpinBoxIconSize->setValue( m_iconSize ); |
162 | SpinRefresh->setValue( cfg.readNumEntry( "checkinterval", 15000 ) / 1000 ); | 171 | SpinRefresh->setValue( cfg.readNumEntry( "checkinterval", 15000 ) / 1000 ); |
172 | CheckBoxHide->setChecked( cfg.readNumEntry( "HideBanner", 0 ) ); | ||
163 | 173 | ||
164 | 174 | ||
@@ -208,4 +218,5 @@ void TodayConfig::writeConfig() { | |||
208 | cfg.setGroup( "General" ); | 218 | cfg.setGroup( "General" ); |
209 | cfg.writeEntry( "IconSize", m_iconSize ); | 219 | cfg.writeEntry( "IconSize", m_iconSize ); |
220 | cfg.writeEntry( "HideBanner", CheckBoxHide->isChecked() ); | ||
210 | cfg.writeEntry( "checkinterval", SpinRefresh->value()*1000 ); | 221 | cfg.writeEntry( "checkinterval", SpinRefresh->value()*1000 ); |
211 | 222 | ||
diff --git a/core/pim/today/todayconfig.h b/core/pim/today/todayconfig.h index 68483c2..41bd44b 100644 --- a/core/pim/today/todayconfig.h +++ b/core/pim/today/todayconfig.h | |||
@@ -61,8 +61,8 @@ private: | |||
61 | 61 | ||
62 | QLabel* TextLabel2; | 62 | QLabel* TextLabel2; |
63 | QCheckBox* CheckBoxAuto; | 63 | QCheckBox* CheckBoxAuto, *CheckBoxHide; |
64 | QWidget* tab_2; | 64 | QWidget* tab_2; |
65 | QWidget* tab_3; | 65 | QWidget* tab_3; |
66 | QLabel* TextLabel1; | 66 | QLabel* TextLabel1, *TextLabel4; |
67 | QSpinBox* SpinBox7; | 67 | QSpinBox* SpinBox7; |
68 | QLabel* TimeLabel; | 68 | QLabel* TimeLabel; |