From 7a49d0610ae9bc1cadacf9d572c671009cb3c088 Mon Sep 17 00:00:00 2001 From: skyhusker Date: Sun, 10 Apr 2005 12:45:59 +0000 Subject: Added configuration option for max characters displayed in notes. Fixes bug 1635 --- (limited to 'core/pim') diff --git a/core/pim/today/plugins/datebook/datebookpluginconfig.cpp b/core/pim/today/plugins/datebook/datebookpluginconfig.cpp index 5fd5221..6b7c3ce 100644 --- a/core/pim/today/plugins/datebook/datebookpluginconfig.cpp +++ b/core/pim/today/plugins/datebook/datebookpluginconfig.cpp @@ -48,6 +48,8 @@ void DatebookPluginConfig::readConfig() { m_gui->CheckBox3->setChecked( m_only_later ); m_more_days = cfg.readNumEntry( "moredays", 0 ); m_gui->SpinBox2->setValue( m_more_days ); + m_maxCharClip = cfg.readNumEntry( "maxcharclip" , 38 ); + m_gui->SpinBox3->setValue( m_maxCharClip ); } @@ -66,6 +68,8 @@ void DatebookPluginConfig::writeConfig() { cfg.writeEntry( "onlylater", m_only_later ); m_more_days = m_gui->SpinBox2->value(); cfg.writeEntry( "moredays", m_more_days ); + m_maxCharClip = m_gui->SpinBox3->value(); + cfg.writeEntry( "maxcharclip", m_maxCharClip ); cfg.write(); } diff --git a/core/pim/today/plugins/datebook/datebookpluginconfig.h b/core/pim/today/plugins/datebook/datebookpluginconfig.h index 4f4e3f1..61e31e0 100644 --- a/core/pim/today/plugins/datebook/datebookpluginconfig.h +++ b/core/pim/today/plugins/datebook/datebookpluginconfig.h @@ -56,6 +56,7 @@ private: // should only later appointments be shown or all for the current day. int m_only_later; int m_more_days; + int m_maxCharClip; }; diff --git a/core/pim/today/plugins/datebook/datebookpluginconfigbase.ui b/core/pim/today/plugins/datebook/datebookpluginconfigbase.ui index 943e8ec..004204a 100644 --- a/core/pim/today/plugins/datebook/datebookpluginconfigbase.ui +++ b/core/pim/today/plugins/datebook/datebookpluginconfigbase.ui @@ -11,7 +11,7 @@ 0 0 - 228 + 224 267 @@ -23,7 +23,7 @@ whatsThis - + margin 11 @@ -32,7 +32,7 @@ spacing 6 - + QCheckBox name @@ -47,7 +47,7 @@ Check this if the location of an appointment should be shown for each one - + QCheckBox name @@ -62,7 +62,7 @@ Check this if the note attached to an appointment should be shown for each one - + QCheckBox name @@ -77,7 +77,7 @@ Check this if only appointments later then current time should be shown - + QCheckBox name @@ -88,7 +88,7 @@ Show time in extra line - + QLayoutWidget name @@ -138,7 +138,7 @@ - + QLayoutWidget name @@ -192,7 +192,42 @@ - + + QLayoutWidget + + name + Layout6 + + + + margin + 0 + + + spacing + 6 + + + QSpinBox + + name + SpinBox3 + + + + QLabel + + name + TextLabel1_2 + + + text + Clip line after X chars + + + + + name Spacer2 @@ -213,6 +248,6 @@ - + diff --git a/core/pim/today/plugins/datebook/datebookpluginwidget.cpp b/core/pim/today/plugins/datebook/datebookpluginwidget.cpp index 0820802..eb6d47a 100644 --- a/core/pim/today/plugins/datebook/datebookpluginwidget.cpp +++ b/core/pim/today/plugins/datebook/datebookpluginwidget.cpp @@ -54,6 +54,7 @@ void DatebookPluginWidget::readConfig() { m_onlyLater = cfg.readNumEntry( "onlylater", 1 ); m_moreDays = cfg.readNumEntry( "moredays", 0 ); m_timeExtraLine = cfg.readNumEntry( "timeextraline", 1 ); + m_maxCharClip = cfg.readNumEntry( "maxcharclip", 38 ); } void DatebookPluginWidget::reinitialize() { @@ -96,7 +97,7 @@ void DatebookPluginWidget::getDates() { if ( count < m_max_lines_meet ) { if ( !m_onlyLater ) { count++; - DateBookEvent *l = new DateBookEvent( *it, this, m_show_location, m_show_notes, m_timeExtraLine ); + DateBookEvent *l = new DateBookEvent( *it, this, m_show_location, m_show_notes, m_timeExtraLine, m_maxCharClip ); m_eventsList.append( l ); l->show(); QObject::connect ( l, SIGNAL( editEvent(const Event&) ), l, SLOT( editEventSlot(const Event&) ) ); diff --git a/core/pim/today/plugins/datebook/datebookpluginwidget.h b/core/pim/today/plugins/datebook/datebookpluginwidget.h index f8ed89e..65e060e 100644 --- a/core/pim/today/plugins/datebook/datebookpluginwidget.h +++ b/core/pim/today/plugins/datebook/datebookpluginwidget.h @@ -57,6 +57,8 @@ private: int m_moreDays; // true if time of an appointment should be an extra line bool m_timeExtraLine; + //max characters displayed in notes + int m_maxCharClip; }; #endif -- cgit v0.9.0.2