summaryrefslogtreecommitdiff
path: root/core/pim/today/plugins/datebook/datebookpluginconfig.cpp
authorllornkcor <llornkcor>2003-11-05 10:50:43 (UTC)
committer llornkcor <llornkcor>2003-11-05 10:50:43 (UTC)
commit7f271d89922254226280f039ae53c5fee63ef94d (patch) (unidiff)
tree796b3b98bc7978bf460181d31032c78c0ea5bc51 /core/pim/today/plugins/datebook/datebookpluginconfig.cpp
parent8ae3f2f96308505b3a02f5acfedfd45a01fefe1c (diff)
downloadopie-7f271d89922254226280f039ae53c5fee63ef94d.zip
opie-7f271d89922254226280f039ae53c5fee63ef94d.tar.gz
opie-7f271d89922254226280f039ae53c5fee63ef94d.tar.bz2
fix compile. probably wont work. who knows.
Diffstat (limited to 'core/pim/today/plugins/datebook/datebookpluginconfig.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/today/plugins/datebook/datebookpluginconfig.cpp70
1 files changed, 15 insertions, 55 deletions
diff --git a/core/pim/today/plugins/datebook/datebookpluginconfig.cpp b/core/pim/today/plugins/datebook/datebookpluginconfig.cpp
index 0477122..54f820b 100644
--- a/core/pim/today/plugins/datebook/datebookpluginconfig.cpp
+++ b/core/pim/today/plugins/datebook/datebookpluginconfig.cpp
@@ -28,53 +28,11 @@
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 );
33 32
34 QHBox *box1 = new QHBox( this ); 33 m_gui = new DatebookPluginConfigBase( this );
35 QLabel* TextLabel4 = new QLabel( box1, "TextLabel4" );
36 TextLabel4->setText( tr( "Show location" ) );
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" ) );
39 34
40 QHBox *box2 = new QHBox( this ); 35 layout->addWidget( m_gui );
41 QLabel* TextLabel5 = new QLabel( box2 , "TextLabel5" );
42 TextLabel5->setText( tr( "Show notes" ) );
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" ) );
45
46 QHBox *box3 = new QHBox( this );
47 QLabel* TextLabel6 = new QLabel( box3, "All Day");
48 TextLabel6->setText( tr( "Show only later\n appointments") );
49 CheckBox3 = new QCheckBox ( box3, "CheckBox3" );
50 QWhatsThis::add( CheckBox3 , tr( "Check this if only appointments later then current time should be shown" ) );
51
52
53
54 QHBox *box4 = new QHBox( this );
55 QLabel *TextLabel3 = new QLabel( box4, "TextLabel3" );
56 TextLabel3->setText( tr( "How many \nappointment\n"
57 "should be \nshown?" ) );
58 SpinBox1 = new QSpinBox( box4, "SpinBox1" );
59 QWhatsThis::add( SpinBox1 , tr( "How many appointments should be shown maximal. In chronical order" ) );
60 SpinBox1->setMaxValue( 10 );
61 SpinBox1->setValue( 5 );
62
63
64 QHBox *box5 = new QHBox( this );
65 QLabel *TextLabelDays = new QLabel( box5 );
66 TextLabelDays->setText( tr( "How many more days" ) );
67 SpinBox2 = new QSpinBox( box5, "SpinBox2" );
68 QWhatsThis::add( SpinBox2 , tr( "How many more days should be in the range" ) );
69 SpinBox2->setMaxValue( 21 );
70 SpinBox2->setSuffix( tr( " day(s)" ) );
71 SpinBox2->setSpecialValueText ( tr("only today") );
72
73 layout->addWidget( box1 );
74 layout->addWidget( box2 );
75 layout->addWidget( box3 );
76 layout->addWidget( box4 );
77 layout->addWidget( box5 );
78 36
79 readConfig(); 37 readConfig();
80} 38}
@@ -84,15 +42,16 @@ void DatebookPluginConfig::readConfig() {
84 cfg.setGroup( "config" ); 42 cfg.setGroup( "config" );
85 43
86 m_max_lines_meet = cfg.readNumEntry( "maxlinesmeet", 5 ); 44 m_max_lines_meet = cfg.readNumEntry( "maxlinesmeet", 5 );
87 SpinBox1->setValue( m_max_lines_meet ); 45 m_gui->SpinBox1->setValue( m_max_lines_meet );
88 m_show_location = cfg.readNumEntry( "showlocation", 1 ); 46 m_show_location = cfg.readNumEntry( "showlocation", 1 );
89 CheckBox1->setChecked( m_show_location ); 47 m_gui->CheckBox1->setChecked( m_show_location );
90 m_show_notes = cfg.readNumEntry( "shownotes", 0 ); 48 m_show_notes = cfg.readNumEntry( "shownotes", 0 );
91 CheckBox2->setChecked( m_show_notes ); 49 m_gui->CheckBox2->setChecked( m_show_notes );
92 m_only_later = cfg.readNumEntry( "onlylater", 1 ); 50 m_only_later = cfg.readNumEntry( "onlylater", 1 );
93 CheckBox3->setChecked( m_only_later ); 51 m_gui->CheckBox4->setChecked( cfg.readNumEntry( "timeextraline", 1 ) );
52 m_gui->CheckBox3->setChecked( m_only_later );
94 m_more_days = cfg.readNumEntry( "moredays", 0 ); 53 m_more_days = cfg.readNumEntry( "moredays", 0 );
95 SpinBox2->setValue( m_more_days ); 54 m_gui->SpinBox2->setValue( m_more_days );
96} 55}
97 56
98 57
@@ -100,15 +59,16 @@ void DatebookPluginConfig::writeConfig() {
100 Config cfg( "todaydatebookplugin" ); 59 Config cfg( "todaydatebookplugin" );
101 cfg.setGroup( "config" ); 60 cfg.setGroup( "config" );
102 61
103 m_max_lines_meet = SpinBox1->value(); 62 m_max_lines_meet = m_gui->SpinBox1->value();
104 cfg.writeEntry( "maxlinesmeet", m_max_lines_meet); 63 cfg.writeEntry( "maxlinesmeet", m_max_lines_meet);
105 m_show_location = CheckBox1->isChecked(); 64 m_show_location = m_gui->CheckBox1->isChecked();
106 cfg.writeEntry( "showlocation", m_show_location); 65 cfg.writeEntry( "showlocation", m_show_location);
107 m_show_notes = CheckBox2->isChecked(); 66 m_show_notes = m_gui->CheckBox2->isChecked();
108 cfg.writeEntry( "shownotes", m_show_notes ); 67 cfg.writeEntry( "shownotes", m_show_notes );
109 m_only_later = CheckBox3->isChecked(); 68 m_only_later = m_gui->CheckBox3->isChecked();
69 cfg.writeEntry( "timeextraline", m_gui->CheckBox4->isChecked() );
110 cfg.writeEntry( "onlylater", m_only_later ); 70 cfg.writeEntry( "onlylater", m_only_later );
111 m_more_days = SpinBox2->value(); 71 m_more_days = m_gui->SpinBox2->value();
112 cfg.writeEntry( "moredays", m_more_days ); 72 cfg.writeEntry( "moredays", m_more_days );
113 cfg.write(); 73 cfg.write();
114} 74}