author | harlekin <harlekin> | 2003-03-29 13:23:53 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2003-03-29 13:23:53 (UTC) |
commit | 7c43e678395bbf781195686b34cc596ea72aa512 (patch) (side-by-side diff) | |
tree | e201eb358c019ea5e116c704c49729d1fe9c0d91 | |
parent | 22e941e4cbc9e8906287d1e352b66092c6a84c0d (diff) | |
download | opie-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 )
-rw-r--r-- | core/pim/today/today.cpp | 24 | ||||
-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, 40 insertions, 8 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 ); @@ -321,3 +339,3 @@ void Today::startConfig() { - for ( int i = pluginList.count() - 1 ; i >= 0; i-- ) { + for ( int i = pluginList.count() - 1; i >= 0; i-- ) { plugin = pluginList[i]; 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 @@ -68,2 +68,3 @@ private slots: int m_maxCharClip; + int m_hideBanner; }; 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 @@ -60,3 +60,3 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags ) // Today text - QLabel* TodayLabel = new QLabel( Frame, "TodayText" ); + TodayLabel = new QLabel( Frame, "TodayText" ); TodayLabel->setGeometry( QRect( 10, 1, 168, 40 ) ); @@ -79,3 +79,3 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags ) // Opiezilla - QLabel* Opiezilla = new QLabel( Frame, "OpieZilla" ); + Opiezilla = new QLabel( Frame, "OpieZilla" ); Opiezilla->setPixmap( opiezilla ); 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 @@ -45,2 +45,4 @@ public: QFrame* Frame15; + QLabel* Opiezilla; + QLabel* TodayLabel; OClickableLabel* ConfigButton; 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 @@ -56,3 +56,3 @@ TodayConfig::TodayConfig( QWidget* parent, const char* name, bool modal ) - setCaption( tr( "Today config" ) ); + setCaption( tr( "Today Config" ) ); @@ -87,2 +87,10 @@ TodayConfig::TodayConfig( QWidget* parent, const char* name, bool modal ) QWhatsThis::add( CheckBoxAuto, tr( "Check this if today should be autostarted on resume." ) ); + + QHBox *hbox_hide = new QHBox( tab_3 ); + TextLabel4 = new QLabel( hbox_hide, "HideBanner" ); + TextLabel4->setText( tr( "Tiny Banner" ) ); + //QWhatsThis::add( TextLabel2 , tr( "Check this if today should be autostarted on resume." ) ); + CheckBoxHide = new QCheckBox( hbox_hide, "CheckBoxHide" ); + // QWhatsThis::add( CheckBoxAuto, tr( "Check this if today should be autostarted on resume." ) ); + QHBox *hbox_inactive = new QHBox( tab_3 ); @@ -114,2 +122,3 @@ TodayConfig::TodayConfig( QWidget* parent, const char* name, bool modal ) tab3Layout->addWidget( hbox_auto ); + tab3Layout->addWidget( hbox_hide ); tab3Layout->addWidget( hbox_inactive ); @@ -162,2 +171,3 @@ void TodayConfig::readConfig() { SpinRefresh->setValue( cfg.readNumEntry( "checkinterval", 15000 ) / 1000 ); + CheckBoxHide->setChecked( cfg.readNumEntry( "HideBanner", 0 ) ); @@ -209,2 +219,3 @@ void TodayConfig::writeConfig() { cfg.writeEntry( "IconSize", m_iconSize ); + cfg.writeEntry( "HideBanner", CheckBoxHide->isChecked() ); cfg.writeEntry( "checkinterval", SpinRefresh->value()*1000 ); 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 @@ -62,6 +62,6 @@ private: QLabel* TextLabel2; - QCheckBox* CheckBoxAuto; + QCheckBox* CheckBoxAuto, *CheckBoxHide; QWidget* tab_2; QWidget* tab_3; - QLabel* TextLabel1; + QLabel* TextLabel1, *TextLabel4; QSpinBox* SpinBox7; |