-rw-r--r-- | core/pim/today/plugins/datebook/datebookpluginconfig.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/pim/today/plugins/datebook/datebookpluginconfig.cpp b/core/pim/today/plugins/datebook/datebookpluginconfig.cpp index 51be40e..0f60c28 100644 --- a/core/pim/today/plugins/datebook/datebookpluginconfig.cpp +++ b/core/pim/today/plugins/datebook/datebookpluginconfig.cpp | |||
@@ -1,79 +1,79 @@ | |||
1 | 1 | ||
2 | 2 | ||
3 | #include "datebookpluginconfig.h" | 3 | #include "datebookpluginconfig.h" |
4 | 4 | ||
5 | #include <qpe/config.h> | 5 | #include <qpe/config.h> |
6 | 6 | ||
7 | #include <qlayout.h> | 7 | #include <qlayout.h> |
8 | #include <qtoolbutton.h> | 8 | #include <qtoolbutton.h> |
9 | #include <qlabel.h> | 9 | #include <qlabel.h> |
10 | #include <qhbox.h> | 10 | #include <qhbox.h> |
11 | #include <qvbox.h> | 11 | #include <qvbox.h> |
12 | 12 | ||
13 | DatebookPluginConfig::DatebookPluginConfig( QWidget* parent, const char* name) | 13 | DatebookPluginConfig::DatebookPluginConfig( QWidget* parent, const char* name) |
14 | : ConfigWidget( parent, name ) { | 14 | : ConfigWidget( parent, name ) { |
15 | 15 | ||
16 | QVBoxLayout * layout = new QVBoxLayout( this ); | 16 | QVBoxLayout * layout = new QVBoxLayout( this ); |
17 | layout->setMargin( 20 ); | ||
17 | 18 | ||
18 | QHBox *box1 = new QHBox( this ); | 19 | QHBox *box1 = new QHBox( this ); |
19 | QLabel* TextLabel4 = new QLabel( box1, "TextLabel4" ); | 20 | QLabel* TextLabel4 = new QLabel( box1, "TextLabel4" ); |
20 | TextLabel4->setText( tr( "Show location" ) ); | 21 | TextLabel4->setText( tr( "Show location" ) ); |
21 | CheckBox1 = new QCheckBox( box1, "CheckBox1" ); | 22 | CheckBox1 = new QCheckBox( box1, "CheckBox1" ); |
22 | 23 | ||
23 | QHBox *box2 = new QHBox( this ); | 24 | QHBox *box2 = new QHBox( this ); |
24 | QLabel* TextLabel5 = new QLabel( box2 , "TextLabel5" ); | 25 | QLabel* TextLabel5 = new QLabel( box2 , "TextLabel5" ); |
25 | TextLabel5->setText( tr( "Show notes" ) ); | 26 | TextLabel5->setText( tr( "Show notes" ) ); |
26 | CheckBox2 = new QCheckBox( box2, "CheckBox2" ); | 27 | CheckBox2 = new QCheckBox( box2, "CheckBox2" ); |
27 | 28 | ||
28 | QHBox *box3 = new QHBox( this ); | 29 | QHBox *box3 = new QHBox( this ); |
29 | QLabel* TextLabel6 = new QLabel( box3, "All Day"); | 30 | QLabel* TextLabel6 = new QLabel( box3, "All Day"); |
30 | TextLabel6->setText( tr( "Show only later\n" | 31 | TextLabel6->setText( tr( "Show only later\n appointments") ); |
31 | "appointments") ); | ||
32 | CheckBox3 = new QCheckBox ( box3, "CheckBox3" ); | 32 | CheckBox3 = new QCheckBox ( box3, "CheckBox3" ); |
33 | 33 | ||
34 | QHBox *box4 = new QHBox( this ); | 34 | QHBox *box4 = new QHBox( this ); |
35 | QLabel *TextLabel3 = new QLabel( box4, "TextLabel3" ); | 35 | QLabel *TextLabel3 = new QLabel( box4, "TextLabel3" ); |
36 | TextLabel3->setText( tr( "How many \nappointment\n" | 36 | TextLabel3->setText( tr( "How many \nappointment\n" |
37 | "should be \nshown?" ) ); | 37 | "should be \nshown?" ) ); |
38 | SpinBox1 = new QSpinBox( box4, "SpinBox1" ); | 38 | SpinBox1 = new QSpinBox( box4, "SpinBox1" ); |
39 | SpinBox1->setMaxValue( 10 ); | 39 | SpinBox1->setMaxValue( 10 ); |
40 | SpinBox1->setValue( 5 ); | 40 | SpinBox1->setValue( 5 ); |
41 | 41 | ||
42 | layout->addWidget( box1 ); | 42 | layout->addWidget( box1 ); |
43 | layout->addWidget( box2 ); | 43 | layout->addWidget( box2 ); |
44 | layout->addWidget( box3 ); | 44 | layout->addWidget( box3 ); |
45 | layout->addWidget( box4 ); | 45 | layout->addWidget( box4 ); |
46 | 46 | ||
47 | readConfig(); | 47 | readConfig(); |
48 | } | 48 | } |
49 | 49 | ||
50 | void DatebookPluginConfig::readConfig() { | 50 | void DatebookPluginConfig::readConfig() { |
51 | Config cfg( "todaydatebookplugin" ); | 51 | Config cfg( "todaydatebookplugin" ); |
52 | cfg.setGroup( "config" ); | 52 | cfg.setGroup( "config" ); |
53 | 53 | ||
54 | m_max_lines_meet = cfg.readNumEntry( "maxlinesmeet", 5 ); | 54 | m_max_lines_meet = cfg.readNumEntry( "maxlinesmeet", 5 ); |
55 | SpinBox1->setValue( m_max_lines_meet ); | 55 | SpinBox1->setValue( m_max_lines_meet ); |
56 | m_show_location = cfg.readNumEntry( "showlocation", 1 ); | 56 | m_show_location = cfg.readNumEntry( "showlocation", 1 ); |
57 | CheckBox1->setChecked( m_show_location ); | 57 | CheckBox1->setChecked( m_show_location ); |
58 | m_show_notes = cfg.readNumEntry( "shownotes", 0 ); | 58 | m_show_notes = cfg.readNumEntry( "shownotes", 0 ); |
59 | CheckBox2->setChecked( m_show_notes ); | 59 | CheckBox2->setChecked( m_show_notes ); |
60 | m_only_later = cfg.readNumEntry( "onlylater", 1 ); | 60 | m_only_later = cfg.readNumEntry( "onlylater", 1 ); |
61 | CheckBox3->setChecked( m_only_later ); | 61 | CheckBox3->setChecked( m_only_later ); |
62 | } | 62 | } |
63 | 63 | ||
64 | 64 | ||
65 | void DatebookPluginConfig::writeConfig() { | 65 | void DatebookPluginConfig::writeConfig() { |
66 | Config cfg( "todaydatebookplugin" ); | 66 | Config cfg( "todaydatebookplugin" ); |
67 | cfg.setGroup( "config" ); | 67 | cfg.setGroup( "config" ); |
68 | 68 | ||
69 | m_max_lines_meet = SpinBox1->value(); | 69 | m_max_lines_meet = SpinBox1->value(); |
70 | cfg.writeEntry( "maxlinesmeet", m_max_lines_meet); | 70 | cfg.writeEntry( "maxlinesmeet", m_max_lines_meet); |
71 | m_show_location = CheckBox1->isChecked(); | 71 | m_show_location = CheckBox1->isChecked(); |
72 | cfg.writeEntry( "showlocation", m_show_location); | 72 | cfg.writeEntry( "showlocation", m_show_location); |
73 | m_show_notes = CheckBox2->isChecked(); | 73 | m_show_notes = CheckBox2->isChecked(); |
74 | cfg.writeEntry( "shownotes", m_show_notes ); | 74 | cfg.writeEntry( "shownotes", m_show_notes ); |
75 | m_only_later = CheckBox3->isChecked(); | 75 | m_only_later = CheckBox3->isChecked(); |
76 | cfg.writeEntry( "onlylater", m_only_later ); | 76 | cfg.writeEntry( "onlylater", m_only_later ); |
77 | cfg.write(); | 77 | cfg.write(); |
78 | } | 78 | } |
79 | 79 | ||