summaryrefslogtreecommitdiff
authorskyhusker <skyhusker>2005-04-10 12:45:59 (UTC)
committer skyhusker <skyhusker>2005-04-10 12:45:59 (UTC)
commit7a49d0610ae9bc1cadacf9d572c671009cb3c088 (patch) (side-by-side diff)
tree31d98c05af90dc9a3dce9eb01a5af51778ec64fc
parent713db174943e9184bfa68fa430123c52ad3c3b2b (diff)
downloadopie-7a49d0610ae9bc1cadacf9d572c671009cb3c088.zip
opie-7a49d0610ae9bc1cadacf9d572c671009cb3c088.tar.gz
opie-7a49d0610ae9bc1cadacf9d572c671009cb3c088.tar.bz2
Added configuration option for max characters displayed in notes. Fixes bug 1635
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/today/plugins/datebook/datebookpluginconfig.cpp4
-rw-r--r--core/pim/today/plugins/datebook/datebookpluginconfig.h1
-rw-r--r--core/pim/today/plugins/datebook/datebookpluginconfigbase.ui55
-rw-r--r--core/pim/today/plugins/datebook/datebookpluginwidget.cpp3
-rw-r--r--core/pim/today/plugins/datebook/datebookpluginwidget.h2
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
@@ -45,12 +45,14 @@ void DatebookPluginConfig::readConfig() {
m_gui->CheckBox2->setChecked( m_show_notes );
m_only_later = cfg.readNumEntry( "onlylater", 1 );
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() {
Config cfg( "todaydatebookplugin" );
cfg.setGroup( "config" );
@@ -63,11 +65,13 @@ void DatebookPluginConfig::writeConfig() {
cfg.writeEntry( "shownotes", m_show_notes );
m_only_later = m_gui->CheckBox3->isChecked();
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
@@ -53,11 +53,12 @@ private:
int m_show_location;
// if notes should be shown
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;
};
#endif
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
@@ -8,34 +8,34 @@
</property>
<property stdset="1">
<name>geometry</name>
<rect>
<x>0</x>
<y>0</y>
- <width>228</width>
+ <width>224</width>
<height>267</height>
</rect>
</property>
<property stdset="1">
<name>caption</name>
<string>DatebookPluginConfigBase</string>
</property>
<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>
</property>
<property stdset="1">
@@ -44,13 +44,13 @@
</property>
<property>
<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>
</property>
<property stdset="1">
@@ -59,13 +59,13 @@
</property>
<property>
<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>
</property>
<property stdset="1">
@@ -74,24 +74,24 @@
</property>
<property>
<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>
</property>
<property stdset="1">
<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>
</property>
<hbox>
@@ -135,13 +135,13 @@
<property>
<name>wordwrap</name>
</property>
</widget>
</hbox>
</widget>
- <widget>
+ <widget row="5" column="0" >
<class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
<cstring>Layout2</cstring>
</property>
<hbox>
@@ -189,13 +189,48 @@
<property>
<name>wordwrap</name>
</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>
<property stdset="1">
<name>orientation</name>
@@ -210,9 +245,9 @@
<size>
<width>20</width>
<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
@@ -51,12 +51,13 @@ void DatebookPluginWidget::readConfig() {
m_max_lines_meet = cfg.readNumEntry( "maxlinesmeet", 5 );
m_show_location = cfg.readNumEntry( "showlocation", 1 );
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();
refresh();
}
@@ -93,13 +94,13 @@ void DatebookPluginWidget::getDates() {
for ( QValueList<EffectiveEvent>::ConstIterator it = list.begin(); it != list.end(); ++it ) {
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 {
if ( ( QDateTime::currentDateTime() <= (*it).event().end() )
// Show events which span over many days and are not elapsed.
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
@@ -54,9 +54,11 @@ private:
bool m_show_notes;
// should only later appointments be shown or all for the current day.
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