summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/today/plugins/datebook/datebookpluginconfig.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/pim/today/plugins/datebook/datebookpluginconfig.cpp b/core/pim/today/plugins/datebook/datebookpluginconfig.cpp
index dc6dee9..0477122 100644
--- a/core/pim/today/plugins/datebook/datebookpluginconfig.cpp
+++ b/core/pim/today/plugins/datebook/datebookpluginconfig.cpp
@@ -21,97 +21,97 @@
21 21
22#include <qlayout.h> 22#include <qlayout.h>
23#include <qlabel.h> 23#include <qlabel.h>
24#include <qhbox.h> 24#include <qhbox.h>
25#include <qwhatsthis.h> 25#include <qwhatsthis.h>
26#include <qvbox.h> 26#include <qvbox.h>
27 27
28DatebookPluginConfig::DatebookPluginConfig( QWidget* parent, const char* name) 28DatebookPluginConfig::DatebookPluginConfig( QWidget* parent, const char* name)
29 : TodayConfigWidget( parent, name ) { 29 : TodayConfigWidget( parent, name ) {
30 30
31 QVBoxLayout * layout = new QVBoxLayout( this ); 31 QVBoxLayout * layout = new QVBoxLayout( this );
32 layout->setMargin( 20 ); 32 layout->setMargin( 20 );
33 33
34 QHBox *box1 = new QHBox( this ); 34 QHBox *box1 = new QHBox( this );
35 QLabel* TextLabel4 = new QLabel( box1, "TextLabel4" ); 35 QLabel* TextLabel4 = new QLabel( box1, "TextLabel4" );
36 TextLabel4->setText( tr( "Show location" ) ); 36 TextLabel4->setText( tr( "Show location" ) );
37 CheckBox1 = new QCheckBox( box1, "CheckBox1" ); 37 CheckBox1 = new QCheckBox( box1, "CheckBox1" );
38 QWhatsThis::add( CheckBox1 , tr( "Check this if the location of an appointment should be shown for each one" ) ); 38 QWhatsThis::add( CheckBox1 , tr( "Check this if the location of an appointment should be shown for each one" ) );
39 39
40 QHBox *box2 = new QHBox( this ); 40 QHBox *box2 = new QHBox( this );
41 QLabel* TextLabel5 = new QLabel( box2 , "TextLabel5" ); 41 QLabel* TextLabel5 = new QLabel( box2 , "TextLabel5" );
42 TextLabel5->setText( tr( "Show notes" ) ); 42 TextLabel5->setText( tr( "Show notes" ) );
43 CheckBox2 = new QCheckBox( box2, "CheckBox2" ); 43 CheckBox2 = new QCheckBox( box2, "CheckBox2" );
44 QWhatsThis::add( CheckBox2 , tr( "Check this if the note attached to an appointment should be shown for each one" ) ); 44 QWhatsThis::add( CheckBox2 , tr( "Check this if the note attached to an appointment should be shown for each one" ) );
45 45
46 QHBox *box3 = new QHBox( this ); 46 QHBox *box3 = new QHBox( this );
47 QLabel* TextLabel6 = new QLabel( box3, "All Day"); 47 QLabel* TextLabel6 = new QLabel( box3, "All Day");
48 TextLabel6->setText( tr( "Show only later\n appointments") ); 48 TextLabel6->setText( tr( "Show only later\n appointments") );
49 CheckBox3 = new QCheckBox ( box3, "CheckBox3" ); 49 CheckBox3 = new QCheckBox ( box3, "CheckBox3" );
50 QWhatsThis::add( CheckBox3 , tr( "Check this if only appointments later then current time should be shown" ) ); 50 QWhatsThis::add( CheckBox3 , tr( "Check this if only appointments later then current time should be shown" ) );
51 51
52 52
53 53
54 QHBox *box4 = new QHBox( this ); 54 QHBox *box4 = new QHBox( this );
55 QLabel *TextLabel3 = new QLabel( box4, "TextLabel3" ); 55 QLabel *TextLabel3 = new QLabel( box4, "TextLabel3" );
56 TextLabel3->setText( tr( "How many \nappointment\n" 56 TextLabel3->setText( tr( "How many \nappointment\n"
57 "should be \nshown?" ) ); 57 "should be \nshown?" ) );
58 SpinBox1 = new QSpinBox( box4, "SpinBox1" ); 58 SpinBox1 = new QSpinBox( box4, "SpinBox1" );
59 QWhatsThis::add( SpinBox1 , tr( "How many appointments should be shown maximal. In chronical order" ) ); 59 QWhatsThis::add( SpinBox1 , tr( "How many appointments should be shown maximal. In chronical order" ) );
60 SpinBox1->setMaxValue( 10 ); 60 SpinBox1->setMaxValue( 10 );
61 SpinBox1->setValue( 5 ); 61 SpinBox1->setValue( 5 );
62 62
63 63
64 QHBox *box5 = new QHBox( this ); 64 QHBox *box5 = new QHBox( this );
65 QLabel *TextLabelDays = new QLabel( box5 ); 65 QLabel *TextLabelDays = new QLabel( box5 );
66 TextLabelDays->setText( tr( "How many more days" ) ); 66 TextLabelDays->setText( tr( "How many more days" ) );
67 SpinBox2 = new QSpinBox( box5, "SpinBox2" ); 67 SpinBox2 = new QSpinBox( box5, "SpinBox2" );
68 QWhatsThis::add( SpinBox2 , tr( "How many more days should be in the range" ) ); 68 QWhatsThis::add( SpinBox2 , tr( "How many more days should be in the range" ) );
69 SpinBox2->setMaxValue( 7 ); 69 SpinBox2->setMaxValue( 21 );
70 SpinBox2->setSuffix( tr( " day(s)" ) ); 70 SpinBox2->setSuffix( tr( " day(s)" ) );
71 SpinBox2->setSpecialValueText ( tr("only today") ); 71 SpinBox2->setSpecialValueText ( tr("only today") );
72 72
73 layout->addWidget( box1 ); 73 layout->addWidget( box1 );
74 layout->addWidget( box2 ); 74 layout->addWidget( box2 );
75 layout->addWidget( box3 ); 75 layout->addWidget( box3 );
76 layout->addWidget( box4 ); 76 layout->addWidget( box4 );
77 layout->addWidget( box5 ); 77 layout->addWidget( box5 );
78 78
79 readConfig(); 79 readConfig();
80} 80}
81 81
82void DatebookPluginConfig::readConfig() { 82void DatebookPluginConfig::readConfig() {
83 Config cfg( "todaydatebookplugin" ); 83 Config cfg( "todaydatebookplugin" );
84 cfg.setGroup( "config" ); 84 cfg.setGroup( "config" );
85 85
86 m_max_lines_meet = cfg.readNumEntry( "maxlinesmeet", 5 ); 86 m_max_lines_meet = cfg.readNumEntry( "maxlinesmeet", 5 );
87 SpinBox1->setValue( m_max_lines_meet ); 87 SpinBox1->setValue( m_max_lines_meet );
88 m_show_location = cfg.readNumEntry( "showlocation", 1 ); 88 m_show_location = cfg.readNumEntry( "showlocation", 1 );
89 CheckBox1->setChecked( m_show_location ); 89 CheckBox1->setChecked( m_show_location );
90 m_show_notes = cfg.readNumEntry( "shownotes", 0 ); 90 m_show_notes = cfg.readNumEntry( "shownotes", 0 );
91 CheckBox2->setChecked( m_show_notes ); 91 CheckBox2->setChecked( m_show_notes );
92 m_only_later = cfg.readNumEntry( "onlylater", 1 ); 92 m_only_later = cfg.readNumEntry( "onlylater", 1 );
93 CheckBox3->setChecked( m_only_later ); 93 CheckBox3->setChecked( m_only_later );
94 m_more_days = cfg.readNumEntry( "moredays", 0 ); 94 m_more_days = cfg.readNumEntry( "moredays", 0 );
95 SpinBox2->setValue( m_more_days ); 95 SpinBox2->setValue( m_more_days );
96} 96}
97 97
98 98
99void DatebookPluginConfig::writeConfig() { 99void DatebookPluginConfig::writeConfig() {
100 Config cfg( "todaydatebookplugin" ); 100 Config cfg( "todaydatebookplugin" );
101 cfg.setGroup( "config" ); 101 cfg.setGroup( "config" );
102 102
103 m_max_lines_meet = SpinBox1->value(); 103 m_max_lines_meet = SpinBox1->value();
104 cfg.writeEntry( "maxlinesmeet", m_max_lines_meet); 104 cfg.writeEntry( "maxlinesmeet", m_max_lines_meet);
105 m_show_location = CheckBox1->isChecked(); 105 m_show_location = CheckBox1->isChecked();
106 cfg.writeEntry( "showlocation", m_show_location); 106 cfg.writeEntry( "showlocation", m_show_location);
107 m_show_notes = CheckBox2->isChecked(); 107 m_show_notes = CheckBox2->isChecked();
108 cfg.writeEntry( "shownotes", m_show_notes ); 108 cfg.writeEntry( "shownotes", m_show_notes );
109 m_only_later = CheckBox3->isChecked(); 109 m_only_later = CheckBox3->isChecked();
110 cfg.writeEntry( "onlylater", m_only_later ); 110 cfg.writeEntry( "onlylater", m_only_later );
111 m_more_days = SpinBox2->value(); 111 m_more_days = SpinBox2->value();
112 cfg.writeEntry( "moredays", m_more_days ); 112 cfg.writeEntry( "moredays", m_more_days );
113 cfg.write(); 113 cfg.write();
114} 114}
115 115
116DatebookPluginConfig::~DatebookPluginConfig() { 116DatebookPluginConfig::~DatebookPluginConfig() {
117} 117}