Diffstat (limited to 'core/pim/today/plugins/addressbook') (more/less context) (ignore whitespace changes)
4 files changed, 19 insertions, 2 deletions
diff --git a/core/pim/today/plugins/addressbook/addresspluginconfig.cpp b/core/pim/today/plugins/addressbook/addresspluginconfig.cpp index 686d72c..f00cffe 100644 --- a/core/pim/today/plugins/addressbook/addresspluginconfig.cpp +++ b/core/pim/today/plugins/addressbook/addresspluginconfig.cpp @@ -63,2 +63,10 @@ AddressBookPluginConfig::AddressBookPluginConfig( QWidget *parent, const char* + QHBox *box4 = new QHBox( this ); + + QLabel* colorLabel = new QLabel( box4, "" ); + colorLabel->setText( tr( "Set Entry Color \n(restart Today \nafter change!)" ) ); + + entryColor = new OColorButton( box4, red, "entryColor" ); + QWhatsThis::add( entryColor , tr( "What color should be used for shown birthdays/anniversaries?" ) ); + layout->addWidget( box1 ); @@ -66,2 +74,3 @@ AddressBookPluginConfig::AddressBookPluginConfig( QWidget *parent, const char* layout->addWidget( box3 ); + layout->addWidget( box4 ); @@ -79,2 +88,3 @@ void AddressBookPluginConfig::readConfig() { SpinDaysClip->setValue( m_daysLookAhead ); + m_entryColor = cfg.readEntry( "entrycolor", Qt::red.name() ); } @@ -91,2 +101,4 @@ void AddressBookPluginConfig::writeConfig() { cfg.writeEntry( "dayslookahead", m_daysLookAhead ); + m_entryColor = entryColor->color().name(); + cfg.writeEntry( "entrycolor", m_entryColor ); cfg.write(); diff --git a/core/pim/today/plugins/addressbook/addresspluginconfig.h b/core/pim/today/plugins/addressbook/addresspluginconfig.h index 6f128d4..54c8b4f 100644 --- a/core/pim/today/plugins/addressbook/addresspluginconfig.h +++ b/core/pim/today/plugins/addressbook/addresspluginconfig.h @@ -25,2 +25,3 @@ #include <opie/todayconfigwidget.h> +#include <opie/ocolorbutton.h> @@ -45,2 +46,3 @@ private: QSpinBox* SpinDaysClip; + OColorButton* entryColor; @@ -52,3 +54,4 @@ private: int m_daysLookAhead; - + // Entry Color + QString m_entryColor; }; diff --git a/core/pim/today/plugins/addressbook/addresspluginwidget.cpp b/core/pim/today/plugins/addressbook/addresspluginwidget.cpp index 0d4cec8..c81beee 100644 --- a/core/pim/today/plugins/addressbook/addresspluginwidget.cpp +++ b/core/pim/today/plugins/addressbook/addresspluginwidget.cpp @@ -73,2 +73,3 @@ void AddressBookPluginWidget::readConfig() { m_daysLookAhead = cfg.readNumEntry( "dayslookahead", 14 ); + m_entryColor = cfg.readEntry("entrycolor", Qt::red.name() ); } @@ -117,3 +118,3 @@ void AddressBookPluginWidget::getAddress() { - output += "<font color=#e00000><b>-" + (*m_it).fullName() + output += "<font color=" + m_entryColor + "><b>-" + (*m_it).fullName() + " (" diff --git a/core/pim/today/plugins/addressbook/addresspluginwidget.h b/core/pim/today/plugins/addressbook/addresspluginwidget.h index 75e223a..fa464de 100644 --- a/core/pim/today/plugins/addressbook/addresspluginwidget.h +++ b/core/pim/today/plugins/addressbook/addresspluginwidget.h @@ -54,2 +54,3 @@ private: int m_daysLookAhead; + QString m_entryColor; }; |