5 files changed, 54 insertions, 11 deletions
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 @@ -47,8 +47,10 @@ void DatebookPluginConfig::readConfig() { m_gui->CheckBox4->setChecked( cfg.readNumEntry( "timeextraline", 1 ) ); 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 ); } void DatebookPluginConfig::writeConfig() { @@ -65,8 +67,10 @@ void DatebookPluginConfig::writeConfig() { cfg.writeEntry( "timeextraline", m_gui->CheckBox4->isChecked() ); 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(); } DatebookPluginConfig::~DatebookPluginConfig() { 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 @@ -55,8 +55,9 @@ private: int m_show_notes; // 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 @@ -10,9 +10,9 @@ <name>geometry</name> <rect> <x>0</x> <y>0</y> - <width>228</width> + <width>224</width> <height>267</height> </rect> </property> <property stdset="1"> @@ -22,18 +22,18 @@ <property> <name>whatsThis</name> <string></string> </property> - <vbox> + <grid> <property stdset="1"> <name>margin</name> <number>11</number> </property> <property stdset="1"> <name>spacing</name> <number>6</number> </property> - <widget> + <widget row="0" column="0" > <class>QCheckBox</class> <property stdset="1"> <name>name</name> <cstring>CheckBox1</cstring> @@ -46,9 +46,9 @@ <name>whatsThis</name> <string>Check this if the location of an appointment should be shown for each one</string> </property> </widget> - <widget> + <widget row="1" column="0" > <class>QCheckBox</class> <property stdset="1"> <name>name</name> <cstring>CheckBox2</cstring> @@ -61,9 +61,9 @@ <name>whatsThis</name> <string>Check this if the note attached to an appointment should be shown for each one</string> </property> </widget> - <widget> + <widget row="2" column="0" > <class>QCheckBox</class> <property stdset="1"> <name>name</name> <cstring>CheckBox3</cstring> @@ -76,9 +76,9 @@ <name>whatsThis</name> <string>Check this if only appointments later then current time should be shown</string> </property> </widget> - <widget> + <widget row="3" column="0" > <class>QCheckBox</class> <property stdset="1"> <name>name</name> <cstring>CheckBox4</cstring> @@ -87,9 +87,9 @@ <name>text</name> <string>Show time in extra line</string> </property> </widget> - <widget> + <widget row="4" column="0" > <class>QLayoutWidget</class> <property stdset="1"> <name>name</name> <cstring>Layout3</cstring> @@ -137,9 +137,9 @@ </property> </widget> </hbox> </widget> - <widget> + <widget row="5" column="0" > <class>QLayoutWidget</class> <property stdset="1"> <name>name</name> <cstring>Layout2</cstring> @@ -191,9 +191,44 @@ </property> </widget> </hbox> </widget> - <spacer> + <widget row="6" column="0" > + <class>QLayoutWidget</class> + <property stdset="1"> + <name>name</name> + <cstring>Layout6</cstring> + </property> + <hbox> + <property stdset="1"> + <name>margin</name> + <number>0</number> + </property> + <property stdset="1"> + <name>spacing</name> + <number>6</number> + </property> + <widget> + <class>QSpinBox</class> + <property stdset="1"> + <name>name</name> + <cstring>SpinBox3</cstring> + </property> + </widget> + <widget> + <class>QLabel</class> + <property stdset="1"> + <name>name</name> + <cstring>TextLabel1_2</cstring> + </property> + <property stdset="1"> + <name>text</name> + <string>Clip line after X chars</string> + </property> + </widget> + </hbox> + </widget> + <spacer row="7" column="0" > <property> <name>name</name> <cstring>Spacer2</cstring> </property> @@ -212,7 +247,7 @@ <height>20</height> </size> </property> </spacer> - </vbox> + </grid> </widget> </UI> 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 @@ -53,8 +53,9 @@ void DatebookPluginWidget::readConfig() { m_show_notes = cfg.readNumEntry( "shownotes", 0 ); 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() { readConfig(); @@ -95,9 +96,9 @@ 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&) ) ); } else { 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 @@ -56,7 +56,9 @@ private: bool m_onlyLater; 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 |